]>
Commit | Line | Data |
---|---|---|
1cd4ef76 SL |
1 | From 42471536684223f24c8733b0378145017b914389 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 | |
5 | ||
6 | [ Upstream commit 40ea97290b08be2e038b31cbb33097d1145e8169 ] | |
7 | ||
8 | New tooling noticed this mishap: | |
9 | ||
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 | |
12 | ||
13 | All the other instrumentation (KASAN,UBSAN) also have stack protector | |
14 | disabled. | |
15 | ||
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> | |
24 | --- | |
25 | kernel/Makefile | 1 + | |
26 | 1 file changed, 1 insertion(+) | |
27 | ||
28 | diff --git a/kernel/Makefile b/kernel/Makefile | |
29 | index 172d151d429c..3085141c055c 100644 | |
30 | --- a/kernel/Makefile | |
31 | +++ b/kernel/Makefile | |
32 | @@ -30,6 +30,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) | |
37 | ||
38 | # cond_syscall is currently not LTO compatible | |
39 | CFLAGS_sys_ni.o = $(DISABLE_LTO) | |
40 | -- | |
41 | 2.20.1 | |
42 |