]> Git Repo - linux.git/commitdiff
x86/sev: Disable ftrace branch profiling in SEV startup code
authorArd Biesheuvel <[email protected]>
Tue, 7 Jan 2025 15:18:27 +0000 (16:18 +0100)
committerBorislav Petkov (AMD) <[email protected]>
Tue, 14 Jan 2025 18:10:32 +0000 (19:10 +0100)
Ftrace branch profiling inserts absolute references to its metadata at
call sites, and this implies that this kind of instrumentation cannot be
used while executing from the 1:1 mapping of memory.

Therefore, disable ftrace branch profiling in the SEV startup routines,
by disabling it for the entire SEV core source file.

Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Reported-by: kernel test robot <[email protected]>
Signed-off-by: Ard Biesheuvel <[email protected]>
Signed-off-by: Borislav Petkov (AMD) <[email protected]>
Acked-by: Tom Lendacky <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
arch/x86/coco/sev/core.c

index 86898547056e71e388edf525b03997cdd4584808..b5c6c4afd1cc6e8afd8dd3e388786981182ced67 100644 (file)
@@ -9,6 +9,8 @@
 
 #define pr_fmt(fmt)    "SEV: " fmt
 
+#define DISABLE_BRANCH_PROFILING
+
 #include <linux/sched/debug.h> /* For show_regs() */
 #include <linux/percpu-defs.h>
 #include <linux/cc_platform.h>
This page took 0.059818 seconds and 4 git commands to generate.