]> www.infradead.org Git - users/dwmw2/linux.git/commit
x86/kexec: Add CFI type information to relocate_kernel()
authorDavid Woodhouse <dwmw@amazon.co.uk>
Mon, 16 Dec 2024 10:26:24 +0000 (10:26 +0000)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Tue, 18 Mar 2025 15:53:34 +0000 (15:53 +0000)
commit1bbed9c611fd286b68e2c459320910c4fefd4a22
tree246b389bea69ebbed3c9e63539cd655af23f5159
parent14c010ca2017789e650380fa8a1fef8751be4416
x86/kexec: Add CFI type information to relocate_kernel()

A previous commit added __nocfi to machine_kexec() because it makes an
indirect call to relocate_kernel() which lacked CFI type information,
and caused the system to crash.

Use SYM_TYPED_FUNC_START() to ensure that the type information is
present, and remove the __nocfi tag. And emit the *actual* type
signature (0x19835999) because by default, asm code uses the type
signature emitted by the *caller*, which is never going to differ!

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
arch/x86/kernel/machine_kexec_64.c
arch/x86/kernel/relocate_kernel_64.S