aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers/platform.c
diff options
context:
space:
mode:
authorPeter Zijlstra <[email protected]>2025-04-09 19:16:01 +0000
committerPeter Zijlstra <[email protected]>2025-04-09 19:29:11 +0000
commit1fac13956e9877483ece9d090a62239cdfe9deb7 (patch)
treef426ffb20b65b943526a5cb3cddaed426902ce5e /rust/helpers/platform.c
parentx86/cpu: Avoid running off the end of an AMD erratum table (diff)
downloadkernel-1fac13956e9877483ece9d090a62239cdfe9deb7.tar.gz
kernel-1fac13956e9877483ece9d090a62239cdfe9deb7.zip
x86/ibt: Fix hibernate
Todd reported, and Len confirmed, that commit 582077c94052 ("x86/cfi: Clean up linkage") broke S4 hiberate on a fair number of machines. Turns out these machines trip #CP when trying to restore the image. As it happens, the commit in question removes two ENDBR instructions in the hibernate code, and clearly got it wrong. Notably restore_image() does an indirect jump to relocated_restore_code(), which is a relocated copy of core_restore_code(). In turn, core_restore_code(), will at the end do an indirect jump to restore_jump_address (r8), which is pointing at a relocated restore_registers(). So both sites do indeed need to be ENDBR. Fixes: 582077c94052 ("x86/cfi: Clean up linkage") Reported-by: Todd Brandt <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Tested-by: Todd Brandt <[email protected]> Tested-by: Len Brown <[email protected]> Link: https://bugzilla.kernel.org/show_bug.cgi?id=219998 Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219998
Diffstat (limited to 'rust/helpers/platform.c')
0 files changed, 0 insertions, 0 deletions