diff options
| author | Arjan van de Ven <arjan@infradead.org> | 2005-02-12 18:14:10 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-02-12 18:14:10 -0800 |
| commit | b74956dfb7deab9f6b4516c6dc9f9dd8b582e386 (patch) | |
| tree | bdb22a176d0c43a2def7bdeba55ca0ecae215238 /include | |
| parent | 735a58f4223e4e53f22e07f4589810290ec55579 (diff) | |
[PATCH] Allow heap to be marked executable too
This makes it possible to mark binaries to have both an executable stack
and heap, allowing for a NX system to disable NX on a per-binary level.
Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-i386/elf.h | 2 | ||||
| -rw-r--r-- | include/asm-ia64/elf.h | 4 | ||||
| -rw-r--r-- | include/asm-x86_64/elf.h | 9 |
3 files changed, 4 insertions, 11 deletions
diff --git a/include/asm-i386/elf.h b/include/asm-i386/elf.h index 2a24503b253a..130bdc8c68cf 100644 --- a/include/asm-i386/elf.h +++ b/include/asm-i386/elf.h @@ -123,7 +123,7 @@ typedef struct user_fxsr_struct elf_fpxregset_t; * An executable for which elf_read_implies_exec() returns TRUE will * have the READ_IMPLIES_EXEC personality flag set automatically. */ -#define elf_read_implies_exec(ex, have_pt_gnu_stack) (!(have_pt_gnu_stack)) +#define elf_read_implies_exec(ex, executable_stack) (executable_stack != EXSTACK_DISABLE_X) extern int dump_task_regs (struct task_struct *, elf_gregset_t *); extern int dump_task_fpu (struct task_struct *, elf_fpregset_t *); diff --git a/include/asm-ia64/elf.h b/include/asm-ia64/elf.h index 8373c39909d9..7d4ccc4b976e 100644 --- a/include/asm-ia64/elf.h +++ b/include/asm-ia64/elf.h @@ -186,8 +186,8 @@ extern void ia64_elf_core_copy_regs (struct pt_regs *src, elf_gregset_t dst); #ifdef __KERNEL__ #define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX) -#define elf_read_implies_exec(ex, have_pt_gnu_stack) \ - (!(have_pt_gnu_stack) && ((ex).e_flags & EF_IA_64_LINUX_EXECUTABLE_STACK) != 0) +#define elf_read_implies_exec(ex, executable_stack) \ + ((executable_stack!=EXSTACK_DISABLE_X) && ((ex).e_flags & EF_IA_64_LINUX_EXECUTABLE_STACK) != 0) struct task_struct; diff --git a/include/asm-x86_64/elf.h b/include/asm-x86_64/elf.h index cfeec4e555ab..a60a35e79222 100644 --- a/include/asm-x86_64/elf.h +++ b/include/asm-x86_64/elf.h @@ -147,14 +147,7 @@ extern void set_personality_64bit(void); * An executable for which elf_read_implies_exec() returns TRUE will * have the READ_IMPLIES_EXEC personality flag set automatically. */ -#define elf_read_implies_exec(ex, have_pt_gnu_stack) (!(have_pt_gnu_stack)) - -/* - * An executable for which elf_read_implies_exec() returns TRUE will - * have the READ_IMPLIES_EXEC personality flag set automatically. - */ -#define elf_read_implies_exec_binary(ex, have_pt_gnu_stack) \ - (!(have_pt_gnu_stack)) +#define elf_read_implies_exec(ex, executable_stack) (executable_stack != EXSTACK_DISABLE_X) extern int dump_task_regs (struct task_struct *, elf_gregset_t *); extern int dump_task_fpu (struct task_struct *, elf_fpregset_t *); |
