linux_dsm_epyc7002/arch/x86/entry
Andy Lutomirski bd49e16e33 x86/vsyscall: Add a new vsyscall=xonly mode
With vsyscall emulation on, a readable vsyscall page is still exposed that
contains syscall instructions that validly implement the vsyscalls.

This is required because certain dynamic binary instrumentation tools
attempt to read the call targets of call instructions in the instrumented
code.  If the instrumented code uses vsyscalls, then the vsyscall page needs
to contain readable code.

Unfortunately, leaving readable memory at a deterministic address can be
used to help various ASLR bypasses, so some hardening value can be gained
by disallowing vsyscall reads.

Given how rarely the vsyscall page needs to be readable, add a mechanism to
make the vsyscall page be execute only.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Kees Cook <keescook@chromium.org>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: Jann Horn <jannh@google.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Kernel Hardening <kernel-hardening@lists.openwall.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lkml.kernel.org/r/d17655777c21bc09a7af1bbcf74e6f2b69a51152.1561610354.git.luto@kernel.org
2019-06-28 00:04:38 +02:00
..
syscalls uapi, x86: Fix the syscall numbering of the mount API syscalls [ver #2] 2019-05-16 12:23:45 -04:00
vdso x86/vdso: Prevent segfaults due to hoisted vclock reads 2019-06-21 13:31:52 -07:00
vsyscall x86/vsyscall: Add a new vsyscall=xonly mode 2019-06-28 00:04:38 +02:00
calling.h jump_label: move 'asm goto' support test to Kconfig 2019-01-06 09:46:51 +09:00
common.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 257 2019-06-05 17:30:27 +02:00
entry_32.S Merge branch 'x86-entry-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-05-06 15:55:15 -07:00
entry_64_compat.S x86/entry/64/compat: Fix stack switching for XEN PV 2019-01-18 00:39:33 +01:00
entry_64.S The major changes in this tracing update includes: 2019-05-15 16:05:47 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
syscall_32.c syscalls/x86: Unconditionally enable 'struct pt_regs' based syscalls on x86_64 2018-04-05 16:59:38 +02:00
syscall_64.c syscalls/x86: Unconditionally enable 'struct pt_regs' based syscalls on x86_64 2018-04-05 16:59:38 +02:00
thunk_32.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 474 2019-06-19 17:09:11 +02:00
thunk_64.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 474 2019-06-19 17:09:11 +02:00