aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/intel/pmt/class.c
diff options
context:
space:
mode:
authorDavid Woodhouse <[email protected]>2025-01-09 14:04:18 +0000
committerBorislav Petkov (AMD) <[email protected]>2025-01-14 12:02:40 +0000
commit2114796ca041f0d3e79e5dd165219b940b23c540 (patch)
tree7895b729c1430a2299e2fea85efdf2428021d517 /drivers/platform/x86/intel/pmt/class.c
parentx86/kexec: Fix location of relocate_kernel with -ffunction-sections (diff)
downloadkernel-2114796ca041f0d3e79e5dd165219b940b23c540.tar.gz
kernel-2114796ca041f0d3e79e5dd165219b940b23c540.zip
x86/kexec: Mark machine_kexec() with __nocfi
A recent commit caused the relocate_kernel() function to be invoked through a function pointer, but it does not have CFI information. The resulting trap occurs after the IDT and GDT have been invalidated, leading to a triple-fault if CONFIG_CFI_CLANG is enabled. Using SYM_TYPED_FUNC_START() to provide the CFI information looks like it will require a prolonged battle with objtool. And is fairly pointless anyway, as the actual signature comes from a __kcfi_typeid_… symbol emitted from the C code based on the function prototype it thinks that relocate_kernel has, rendering the check somewhat tautological. The simple fix is just to mark machine_kexec() with __nocfi. Fixes: eeebbde57113 ("x86/kexec: Invoke copy of relocate_kernel() instead of the original") Reported-by: Nathan Chancellor <[email protected]> Suggested-by: Nathan Chancellor <[email protected]> Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: Borislav Petkov (AMD) <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'drivers/platform/x86/intel/pmt/class.c')
0 files changed, 0 insertions, 0 deletions