[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1511161413200.7097@tp.orcam.me.uk>
Date: Mon, 16 Nov 2015 14:34:27 +0000
From: "Maciej W. Rozycki" <macro@...tec.com>
To: <linux-mips@...ux-mips.org>
CC: Ralf Baechle <ralf@...ux-mips.org>,
Matthew Fortune <Matthew.Fortune@...tec.com>,
Daniel Sanders <Daniel.Sanders@...tec.com>,
Leonid Yegoshin <Leonid.Yegoshin@...tec.com>,
<linux-kernel@...r.kernel.org>
Subject: [RFC PATCH 1/4] ELF: Add platform-specific AT_FLAGS initialisation
support
Signed-off-by: Maciej W. Rozycki <macro@...tec.com>
---
linux-elf-at-flags.diff
Index: linux-sfr-test/fs/binfmt_elf.c
===================================================================
--- linux-sfr-test.orig/fs/binfmt_elf.c 2015-09-08 15:24:00.927208000 +0100
+++ linux-sfr-test/fs/binfmt_elf.c 2015-09-08 15:26:10.318310000 +0100
@@ -72,6 +72,10 @@ static int elf_core_dump(struct coredump
#define ELF_MIN_ALIGN PAGE_SIZE
#endif
+#ifndef ELF_FLAGS
+#define ELF_FLAGS 0
+#endif
+
#ifndef ELF_CORE_EFLAGS
#define ELF_CORE_EFLAGS 0
#endif
@@ -238,7 +242,7 @@ create_elf_tables(struct linux_binprm *b
NEW_AUX_ENT(AT_PHENT, sizeof(struct elf_phdr));
NEW_AUX_ENT(AT_PHNUM, exec->e_phnum);
NEW_AUX_ENT(AT_BASE, interp_load_addr);
- NEW_AUX_ENT(AT_FLAGS, 0);
+ NEW_AUX_ENT(AT_FLAGS, ELF_FLAGS);
NEW_AUX_ENT(AT_ENTRY, exec->e_entry);
NEW_AUX_ENT(AT_UID, from_kuid_munged(cred->user_ns, cred->uid));
NEW_AUX_ENT(AT_EUID, from_kuid_munged(cred->user_ns, cred->euid));
Index: linux-sfr-test/fs/binfmt_elf_fdpic.c
===================================================================
--- linux-sfr-test.orig/fs/binfmt_elf_fdpic.c 2015-09-08 15:24:00.950209000 +0100
+++ linux-sfr-test/fs/binfmt_elf_fdpic.c 2015-09-08 15:29:25.860980000 +0100
@@ -80,6 +80,10 @@ static int elf_fdpic_map_file_by_direct_
static int elf_fdpic_core_dump(struct coredump_params *cprm);
#endif
+#ifndef ELF_FLAGS
+#define ELF_FLAGS 0
+#endif
+
static struct linux_binfmt elf_fdpic_format = {
.module = THIS_MODULE,
.load_binary = load_elf_fdpic_binary,
@@ -616,7 +620,7 @@ static int create_elf_fdpic_tables(struc
NEW_AUX_ENT(AT_PHENT, sizeof(struct elf_phdr));
NEW_AUX_ENT(AT_PHNUM, exec_params->hdr.e_phnum);
NEW_AUX_ENT(AT_BASE, interp_params->elfhdr_addr);
- NEW_AUX_ENT(AT_FLAGS, 0);
+ NEW_AUX_ENT(AT_FLAGS, ELF_FLAGS);
NEW_AUX_ENT(AT_ENTRY, exec_params->entry_addr);
NEW_AUX_ENT(AT_UID, (elf_addr_t) from_kuid_munged(cred->user_ns, cred->uid));
NEW_AUX_ENT(AT_EUID, (elf_addr_t) from_kuid_munged(cred->user_ns, cred->euid));
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists