summaryrefslogtreecommitdiffstats
path: root/kernel/entry/Makefile
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2020-07-22 23:59:56 +0200
committerThomas Gleixner <tglx@linutronix.de>2020-07-24 14:59:03 +0200
commit142781e108b13b2b0e8f035cfb5bfbbc8f14d887 (patch)
treee11ce626a38bf77bd2ec08499f2199534e2a9a15 /kernel/entry/Makefile
parent6823ecabf03031d610a6c5afe7ed4b4fd659a99f (diff)
downloadlinux-stable-142781e108b13b2b0e8f035cfb5bfbbc8f14d887.tar.gz
linux-stable-142781e108b13b2b0e8f035cfb5bfbbc8f14d887.tar.bz2
linux-stable-142781e108b13b2b0e8f035cfb5bfbbc8f14d887.zip
entry: Provide generic syscall entry functionality
On syscall entry certain work needs to be done: - Establish state (lockdep, context tracking, tracing) - Conditional work (ptrace, seccomp, audit...) This code is needlessly duplicated and different in all architectures. Provide a generic version based on the x86 implementation which has all the RCU and instrumentation bits right. As interrupt/exception entry from user space needs parts of the same functionality, provide a function for this as well. syscall_enter_from_user_mode() and irqentry_enter_from_user_mode() must be called right after the low level ASM entry. The calling code must be non-instrumentable. After the functions returns state is correct and the subsequent functions can be instrumented. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Kees Cook <keescook@chromium.org> Link: https://lkml.kernel.org/r/20200722220519.513463269@linutronix.de
Diffstat (limited to 'kernel/entry/Makefile')
-rw-r--r--kernel/entry/Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/kernel/entry/Makefile b/kernel/entry/Makefile
new file mode 100644
index 000000000000..c207d202bf3a
--- /dev/null
+++ b/kernel/entry/Makefile
@@ -0,0 +1,12 @@
+# SPDX-License-Identifier: GPL-2.0
+
+# Prevent the noinstr section from being pestered by sanitizer and other goodies
+# as long as these things cannot be disabled per function.
+KASAN_SANITIZE := n
+UBSAN_SANITIZE := n
+KCOV_INSTRUMENT := n
+
+CFLAGS_REMOVE_common.o = -fstack-protector -fstack-protector-strong
+CFLAGS_common.o += -fno-stack-protector
+
+obj-$(CONFIG_GENERIC_ENTRY) += common.o