aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-05-05 14:26:11 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2019-05-05 14:26:11 -0700
commit13369e831173251e2bc3bc2a78f67c387e8d9609 (patch)
tree808ee4905d77f516403baaa9fd461a4b2bcceaf3 /lib
parentMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs (diff)
parentx86/mm/mem_encrypt: Disable all instrumentation for early SME setup (diff)
downloadlinux-dev-13369e831173251e2bc3bc2a78f67c387e8d9609.tar.xz
linux-dev-13369e831173251e2bc3bc2a78f67c387e8d9609.zip
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fix from Ingo Molnar: "Disable function tracing during early SME setup to fix a boot crash on SME-enabled kernels running distro kernels (some of which have function tracing enabled)" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm/mem_encrypt: Disable all instrumentation for early SME setup
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Makefile b/lib/Makefile
index 3b08673e8881..18c2be516ab4 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -17,6 +17,17 @@ KCOV_INSTRUMENT_list_debug.o := n
KCOV_INSTRUMENT_debugobjects.o := n
KCOV_INSTRUMENT_dynamic_debug.o := n
+# Early boot use of cmdline, don't instrument it
+ifdef CONFIG_AMD_MEM_ENCRYPT
+KASAN_SANITIZE_string.o := n
+
+ifdef CONFIG_FUNCTION_TRACER
+CFLAGS_REMOVE_string.o = -pg
+endif
+
+CFLAGS_string.o := $(call cc-option, -fno-stack-protector)
+endif
+
lib-y := ctype.o string.o vsprintf.o cmdline.o \
rbtree.o radix-tree.o timerqueue.o xarray.o \
idr.o int_sqrt.o extable.o \