diff options
author | Peter Zijlstra <peterz@infradead.org> | 2020-06-12 16:05:26 +0200 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2020-06-18 17:36:33 +0200 |
commit | 0f1441b44e823a74f3f3780902a113e07c73fbf6 (patch) | |
tree | 5ef3755754810974096c758d5878dc31d23d7c20 /arch | |
parent | fdabdd0b05e0bdf232340d5da86563ed142a99a7 (diff) | |
download | linux-0f1441b44e823a74f3f3780902a113e07c73fbf6.tar.bz2 |
objtool: Fix noinstr vs KCOV
Since many compilers cannot disable KCOV with a function attribute,
help it to NOP out any __sanitizer_cov_*() calls injected in noinstr
code.
This turns:
12: e8 00 00 00 00 callq 17 <lockdep_hardirqs_on+0x17>
13: R_X86_64_PLT32 __sanitizer_cov_trace_pc-0x4
into:
12: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
13: R_X86_64_NONE __sanitizer_cov_trace_pc-0x4
Just like recordmcount does.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Dmitry Vyukov <dvyukov@google.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/Kconfig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 6a0cc524882d..883da0abf779 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -67,7 +67,7 @@ config X86 select ARCH_HAS_FILTER_PGPROT select ARCH_HAS_FORTIFY_SOURCE select ARCH_HAS_GCOV_PROFILE_ALL - select ARCH_HAS_KCOV if X86_64 + select ARCH_HAS_KCOV if X86_64 && STACK_VALIDATION select ARCH_HAS_MEM_ENCRYPT select ARCH_HAS_MEMBARRIER_SYNC_CORE select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE |