Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 267aed9d authored by David Howells's avatar David Howells
Browse files

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: default avatarDavid Howells <dhowells@redhat.com>
parent 070712c6
Loading
Loading
Loading
Loading
+9 −9
Original line number Original line Diff line number Diff line
@@ -7,15 +7,6 @@
#include <asm/elf.h>
#include <asm/elf.h>
#endif
#endif


struct file;

#ifndef elf_read_implies_exec
  /* Executables for which elf_read_implies_exec() returns TRUE will
     have the READ_IMPLIES_EXEC personality flag set automatically.
     Override in asm/elf.h as needed.  */
# define elf_read_implies_exec(ex, have_pt_gnu_stack)	0
#endif

/* 32-bit ELF base types. */
/* 32-bit ELF base types. */
typedef __u32	Elf32_Addr;
typedef __u32	Elf32_Addr;
typedef __u16	Elf32_Half;
typedef __u16	Elf32_Half;
@@ -414,6 +405,13 @@ typedef struct elf64_note {
} Elf64_Nhdr;
} Elf64_Nhdr;


#ifdef __KERNEL__
#ifdef __KERNEL__
#ifndef elf_read_implies_exec
  /* Executables for which elf_read_implies_exec() returns TRUE will
     have the READ_IMPLIES_EXEC personality flag set automatically.
     Override in asm/elf.h as needed.  */
# define elf_read_implies_exec(ex, have_pt_gnu_stack)	0
#endif

#if ELF_CLASS == ELFCLASS32
#if ELF_CLASS == ELFCLASS32


extern Elf32_Dyn _DYNAMIC [];
extern Elf32_Dyn _DYNAMIC [];
@@ -437,6 +435,8 @@ extern Elf64_Dyn _DYNAMIC [];
#endif
#endif


/* Optional callbacks to write extra ELF notes. */
/* Optional callbacks to write extra ELF notes. */
struct file;

#ifndef ARCH_HAVE_EXTRA_ELF_NOTES
#ifndef ARCH_HAVE_EXTRA_ELF_NOTES
static inline int elf_coredump_extra_notes_size(void) { return 0; }
static inline int elf_coredump_extra_notes_size(void) { return 0; }
static inline int elf_coredump_extra_notes_write(struct file *file,
static inline int elf_coredump_extra_notes_write(struct file *file,