Skip to content

Commit 9efb74f

Browse files
bjackmanbp3tk0v
authored andcommitted
x86/sev: Disable GCOV on noinstr object
With Debian clang version 19.1.7 (3+build5) there are calls to kasan_check_write() from __sev_es_nmi_complete(), which violates noinstr. Fix it by disabling GCOV for the noinstr object, as has been done for previous such instrumentation issues. Note that this file already disables __SANITIZE_ADDRESS__ and __SANITIZE_THREAD__, thus calls like kasan_check_write() ought to be nops regardless of GCOV. This has been fixed in other patches. However, to avoid any other accidental instrumentation showing up, (and since, in principle GCOV is instrumentation and hence should be disabled for noinstr code anyway), disable GCOV overall as well. Signed-off-by: Brendan Jackman <jackmanb@google.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Acked-by: Marco Elver <elver@google.com> Link: https://patch.msgid.link/20251216-gcov-inline-noinstr-v3-3-10244d154451@google.com
1 parent 9ace475 commit 9efb74f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

arch/x86/coco/sev/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ UBSAN_SANITIZE_noinstr.o := n
88
# GCC may fail to respect __no_sanitize_address or __no_kcsan when inlining
99
KASAN_SANITIZE_noinstr.o := n
1010
KCSAN_SANITIZE_noinstr.o := n
11+
12+
GCOV_PROFILE_noinstr.o := n

0 commit comments

Comments
 (0)