summaryrefslogtreecommitdiffstats
path: root/fs/compat_binfmt_elf.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-06-05 22:45:21 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2020-06-05 22:45:21 +0200
commitac7b34218a0021bafd1d4c11c54217b930f516b0 (patch)
tree5c680376493f805d3c7e2b3de5ce6293c01800f9 /fs/compat_binfmt_elf.c
parentMerge tag 'powerpc-5.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/po... (diff)
parentarm64/elf: Disable automatic READ_IMPLIES_EXEC for 64-bit address spaces (diff)
downloadlinux-ac7b34218a0021bafd1d4c11c54217b930f516b0.tar.xz
linux-ac7b34218a0021bafd1d4c11c54217b930f516b0.zip
Merge tag 'core_core_updates_for_5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull READ_IMPLIES_EXEC changes from Borislav Petkov: "Split the old READ_IMPLIES_EXEC workaround from executable PT_GNU_STACK now that toolchains long support PT_GNU_STACK marking and there's no need anymore to force modern programs into having all its user mappings executable instead of only the stack and the PROT_EXEC ones. Disable that automatic READ_IMPLIES_EXEC forcing on x86-64 and arm64. Add tables documenting how READ_IMPLIES_EXEC is handled on x86-64, arm and arm64. By Kees Cook" * tag 'core_core_updates_for_5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: arm64/elf: Disable automatic READ_IMPLIES_EXEC for 64-bit address spaces arm32/64/elf: Split READ_IMPLIES_EXEC from executable PT_GNU_STACK arm32/64/elf: Add tables to document READ_IMPLIES_EXEC x86/elf: Disable automatic READ_IMPLIES_EXEC on 64-bit x86/elf: Split READ_IMPLIES_EXEC from executable PT_GNU_STACK x86/elf: Add table to document READ_IMPLIES_EXEC
Diffstat (limited to 'fs/compat_binfmt_elf.c')
-rw-r--r--fs/compat_binfmt_elf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/compat_binfmt_elf.c b/fs/compat_binfmt_elf.c
index e61f3fe8e32a..2d24c765cbd7 100644
--- a/fs/compat_binfmt_elf.c
+++ b/fs/compat_binfmt_elf.c
@@ -117,6 +117,11 @@
#define arch_setup_additional_pages compat_arch_setup_additional_pages
#endif
+#ifdef compat_elf_read_implies_exec
+#undef elf_read_implies_exec
+#define elf_read_implies_exec compat_elf_read_implies_exec
+#endif
+
/*
* Rename a few of the symbols that binfmt_elf.c will define.
* These are all local so the names don't really matter, but it