summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-08-30 10:10:31 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2023-08-30 10:10:31 -0700
commit87fa732dc5ff9ea6a2e75b630f7931899e845eb1 (patch)
treee6a5e9223b3c45daa8179d859feb6234ab060055 /include
parent9855922705630a63a6f27621fab1a248dfb5bfc0 (diff)
parentb65413768abd27a55af74945aec58127a52b30a8 (diff)
downloadlinux-87fa732dc5ff9ea6a2e75b630f7931899e845eb1.tar.gz
linux-87fa732dc5ff9ea6a2e75b630f7931899e845eb1.tar.bz2
linux-87fa732dc5ff9ea6a2e75b630f7931899e845eb1.zip
Merge tag 'x86-core-2023-08-30-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 core updates from Thomas Gleixner: - Prevent kprobes on compiler generated CFI checking code. The compiler generates an instruction sequence for indirect call checks. If this sequence is modified with a kprobe, then the check fails. So the instructions must be protected against probing. - A few minor cleanups for the SMP code * tag 'x86-core-2023-08-30-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/kprobes: Prohibit probing on compiler generated CFI checking code x86/smpboot: Change smp_store_boot_cpu_info() to static x86/smp: Remove a non-existent function declaration x86/smpboot: Remove a stray comment about CPU hotplug
Diffstat (limited to 'include')
-rw-r--r--include/linux/cfi.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/cfi.h b/include/linux/cfi.h
index 5e134f4ce8b7..3552ec82b725 100644
--- a/include/linux/cfi.h
+++ b/include/linux/cfi.h
@@ -19,11 +19,13 @@ static inline enum bug_trap_type report_cfi_failure_noaddr(struct pt_regs *regs,
{
return report_cfi_failure(regs, addr, NULL, 0);
}
+#endif /* CONFIG_CFI_CLANG */
#ifdef CONFIG_ARCH_USES_CFI_TRAPS
bool is_cfi_trap(unsigned long addr);
+#else
+static inline bool is_cfi_trap(unsigned long addr) { return false; }
#endif
-#endif /* CONFIG_CFI_CLANG */
#ifdef CONFIG_MODULES
#ifdef CONFIG_ARCH_USES_CFI_TRAPS