You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
2.6 KiB
56 lines
2.6 KiB
# --- SDE-COPYRIGHT-NOTE-BEGIN --- |
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
# |
|
# Filename: package/.../paxctl/patches/glibc-2.5-pt_pax-1.patch |
|
# Copyright (C) 2008 The OpenSDE Project |
|
# |
|
# More information can be found in the files COPYING and README. |
|
# |
|
# This patch file is dual-licensed. It is available under the license the |
|
# patched project is licensed under, as long as it is an OpenSource license |
|
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms |
|
# of the GNU General Public License as published by the Free Software |
|
# Foundation; either version 2 of the License, or (at your option) any later |
|
# version. |
|
# --- SDE-COPYRIGHT-NOTE-END --- |
|
|
|
Submitted By: Robert Connolly <robert at linuxfromscratch dot org> (ashes) |
|
Date: 2006-10-11 |
|
Initial Package Version: 2.5 |
|
Upstream Status: Not submitted - PaX specific. Will not be accepted upstream. |
|
Origin: http://www.gtlib.cc.gatech.edu/pub/gentoo/gentoo-x86-portage/sys-libs/ \ |
|
glibc/files/2.3.3/glibc-2.3.3_pre20040117-pt_pax.diff |
|
Description: This is needed for Pax. http://pax.grsecurity.net/ |
|
Also see: |
|
http://www.linuxfromscratch.org/hlfs/ |
|
|
|
diff -Naur glibc-2.5.orig/elf/elf.h glibc-2.5/elf/elf.h |
|
--- glibc-2.5.orig/elf/elf.h 2006-07-10 21:54:02.000000000 +0000 |
|
+++ glibc-2.5/elf/elf.h 2006-10-11 21:30:02.000000000 +0000 |
|
@@ -569,6 +569,7 @@ |
|
#define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */ |
|
#define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */ |
|
#define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */ |
|
+#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */ |
|
#define PT_LOSUNW 0x6ffffffa |
|
#define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */ |
|
#define PT_SUNWSTACK 0x6ffffffb /* Stack segment */ |
|
@@ -582,6 +583,18 @@ |
|
#define PF_X (1 << 0) /* Segment is executable */ |
|
#define PF_W (1 << 1) /* Segment is writable */ |
|
#define PF_R (1 << 2) /* Segment is readable */ |
|
+#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */ |
|
+#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */ |
|
+#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */ |
|
+#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */ |
|
+#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */ |
|
+#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */ |
|
+#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */ |
|
+#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */ |
|
+#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */ |
|
+#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */ |
|
+#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */ |
|
+#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */ |
|
#define PF_MASKOS 0x0ff00000 /* OS-specific */ |
|
#define PF_MASKPROC 0xf0000000 /* Processor-specific */ |
|
|
|
|