]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - lib/Makefile
x86/mm/mem_encrypt: Disable all instrumentation for early SME setup
[mirror_ubuntu-bionic-kernel.git] / lib / Makefile
index 1903d61e61fed852ac398185ad84767921681159..62ae814c1f91811b5cc61b9a2aae4d395bca466a 100644 (file)
@@ -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 dump_stack.o timerqueue.o\
         idr.o int_sqrt.o extable.o \