summaryrefslogtreecommitdiffstats
path: root/fs/binfmt_elf.c
diff options
context:
space:
mode:
authorGabriel Krisman Bertazi <krisman@collabora.com>2020-10-04 05:25:31 +0200
committerThomas Gleixner <tglx@linutronix.de>2020-10-26 13:46:46 +0100
commitbc3d7bf61a9eaecccc84dc2ecc2a9a3fa4f5ec47 (patch)
tree989c432e32d5cc77386483be52b02cb4bff96bc1 /fs/binfmt_elf.c
parentx86/elf: Use e_machine to choose DLINFO in compat (diff)
downloadlinux-bc3d7bf61a9eaecccc84dc2ecc2a9a3fa4f5ec47.tar.xz
linux-bc3d7bf61a9eaecccc84dc2ecc2a9a3fa4f5ec47.zip
elf: Expose ELF header in compat_start_thread()
Like it is done for SET_PERSONALITY with x86, which requires the ELF header to select correct personality parameters, x86 requires the headers on compat_start_thread() to choose starting CS for ELF32 binaries, instead of relying on the going-away TIF_IA32/X32 flags. Add an indirection macro to ELF invocations of START_THREAD, that x86 can reimplement to receive the extra parameter just for ELF files. This requires no changes to other architectures who don't need the header information, they can continue to use the original start_thread for ELF and non-ELF binaries, and it prevents affecting non-ELF code paths for x86. Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20201004032536.1229030-6-krisman@collabora.com
Diffstat (limited to 'fs/binfmt_elf.c')
-rw-r--r--fs/binfmt_elf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index b6b3d052ca86..b23f7553fe9b 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -1307,7 +1307,7 @@ out_free_interp:
#endif
finalize_exec(bprm);
- start_thread(regs, elf_entry, bprm->p);
+ START_THREAD(elf_ex, regs, elf_entry, bprm->p);
retval = 0;
out:
return retval;