1 From e59bc317814f6548a21fb3f146c6e6fadd9e6e30 Mon Sep 17 00:00:00 2001
2 From: Peter Zijlstra <peterz@infradead.org>
3 Date: Thu, 7 Mar 2019 19:54:25 +0100
4 Subject: x86/uaccess, kcov: Disable stack protector
6 [ Upstream commit 40ea97290b08be2e038b31cbb33097d1145e8169 ]
8 New tooling noticed this mishap:
10 kernel/kcov.o: warning: objtool: write_comp_data()+0x138: call to __stack_chk_fail() with UACCESS enabled
11 kernel/kcov.o: warning: objtool: __sanitizer_cov_trace_pc()+0xd9: call to __stack_chk_fail() with UACCESS enabled
13 All the other instrumentation (KASAN,UBSAN) also have stack protector
16 Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
17 Cc: Borislav Petkov <bp@alien8.de>
18 Cc: Josh Poimboeuf <jpoimboe@redhat.com>
19 Cc: Linus Torvalds <torvalds@linux-foundation.org>
20 Cc: Peter Zijlstra <peterz@infradead.org>
21 Cc: Thomas Gleixner <tglx@linutronix.de>
22 Signed-off-by: Ingo Molnar <mingo@kernel.org>
23 Signed-off-by: Sasha Levin <sashal@kernel.org>
26 1 file changed, 1 insertion(+)
28 diff --git a/kernel/Makefile b/kernel/Makefile
29 index 314e7d62f5f0..184fa9aa5802 100644
32 @@ -28,6 +28,7 @@ KCOV_INSTRUMENT_extable.o := n
33 # Don't self-instrument.
34 KCOV_INSTRUMENT_kcov.o := n
35 KASAN_SANITIZE_kcov.o := n
36 +CFLAGS_kcov.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector)
38 # cond_syscall is currently not LTO compatible
39 CFLAGS_sys_ni.o = $(DISABLE_LTO)