diff options
author | David Howells <dhowells@redhat.com> | 2011-12-12 08:54:36 -0500 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2011-12-12 08:54:36 -0500 |
commit | 267aed9dfeb2225960043f89db1f58d8ab522797 (patch) | |
tree | 794f2cddcbed60292a838c13eb82f266a0075359 /include/linux/elf.h | |
parent | 070712c6cd8a02e57506ebf52d7c6056d7535b42 (diff) |
UAPI: elf_read_implies_exec() is a kernel-only feature - so hide from userspace
elf_read_implies_exec() is a kernel-only feature as the second parameter is a
constant that isn't exported to userspace. Not only that, but the
arch-specific overrides are not exported either.
So hide the macro from userspace.
Similarly, struct file should not be predeclared in userspace.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'include/linux/elf.h')
-rw-r--r-- | include/linux/elf.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/include/linux/elf.h b/include/linux/elf.h index 31f0508d7da7..999b4f52e8e5 100644 --- a/include/linux/elf.h +++ b/include/linux/elf.h | |||
@@ -7,15 +7,6 @@ | |||
7 | #include <asm/elf.h> | 7 | #include <asm/elf.h> |
8 | #endif | 8 | #endif |
9 | 9 | ||
10 | struct file; | ||
11 | |||
12 | #ifndef elf_read_implies_exec | ||
13 | /* Executables for which elf_read_implies_exec() returns TRUE will | ||
14 | have the READ_IMPLIES_EXEC personality flag set automatically. | ||
15 | Override in asm/elf.h as needed. */ | ||
16 | # define elf_read_implies_exec(ex, have_pt_gnu_stack) 0 | ||
17 | #endif | ||
18 | |||
19 | /* 32-bit ELF base types. */ | 10 | /* 32-bit ELF base types. */ |
20 | typedef __u32 Elf32_Addr; | 11 | typedef __u32 Elf32_Addr; |
21 | typedef __u16 Elf32_Half; | 12 | typedef __u16 Elf32_Half; |
@@ -414,6 +405,13 @@ typedef struct elf64_note { | |||
414 | } Elf64_Nhdr; | 405 | } Elf64_Nhdr; |
415 | 406 | ||
416 | #ifdef __KERNEL__ | 407 | #ifdef __KERNEL__ |
408 | #ifndef elf_read_implies_exec | ||
409 | /* Executables for which elf_read_implies_exec() returns TRUE will | ||
410 | have the READ_IMPLIES_EXEC personality flag set automatically. | ||
411 | Override in asm/elf.h as needed. */ | ||
412 | # define elf_read_implies_exec(ex, have_pt_gnu_stack) 0 | ||
413 | #endif | ||
414 | |||
417 | #if ELF_CLASS == ELFCLASS32 | 415 | #if ELF_CLASS == ELFCLASS32 |
418 | 416 | ||
419 | extern Elf32_Dyn _DYNAMIC []; | 417 | extern Elf32_Dyn _DYNAMIC []; |
@@ -437,6 +435,8 @@ extern Elf64_Dyn _DYNAMIC []; | |||
437 | #endif | 435 | #endif |
438 | 436 | ||
439 | /* Optional callbacks to write extra ELF notes. */ | 437 | /* Optional callbacks to write extra ELF notes. */ |
438 | struct file; | ||
439 | |||
440 | #ifndef ARCH_HAVE_EXTRA_ELF_NOTES | 440 | #ifndef ARCH_HAVE_EXTRA_ELF_NOTES |
441 | static inline int elf_coredump_extra_notes_size(void) { return 0; } | 441 | static inline int elf_coredump_extra_notes_size(void) { return 0; } |
442 | static inline int elf_coredump_extra_notes_write(struct file *file, | 442 | static inline int elf_coredump_extra_notes_write(struct file *file, |