summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-05-17 11:40:18 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2026-05-17 11:40:18 -0700
commite7f24a388e703e505a7f8d014a428308b35e8f94 (patch)
tree4bea6bab9b976c75bc8e156af145e52d756311f3
parent46cd5b22e58805b5651dfc732cd23615e940ac8d (diff)
parent786a45757dcdf8f2beb9d4a6db605db16c18b2b4 (diff)
downloadlwn-e7f24a388e703e505a7f8d014a428308b35e8f94.tar.gz
lwn-e7f24a388e703e505a7f8d014a428308b35e8f94.zip
Merge tag 'x86-urgent-2026-05-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fix from Ingo Molnar: - Fix x86 boot crash for non-kjump kexecs (David Woodhouse) * tag 'x86-urgent-2026-05-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/kexec: Push kjump return address even for non-kjump kexec
-rw-r--r--arch/x86/kernel/relocate_kernel_64.S8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/kernel/relocate_kernel_64.S b/arch/x86/kernel/relocate_kernel_64.S
index 4ffba68dc57b..eaeb77464c06 100644
--- a/arch/x86/kernel/relocate_kernel_64.S
+++ b/arch/x86/kernel/relocate_kernel_64.S
@@ -136,6 +136,14 @@ SYM_CODE_START_LOCAL_NOALIGN(identity_mapped)
* %r13 original CR4 when relocate_kernel() was invoked
*/
+ /*
+ * Set return address to 0 if not preserving context. The purgatory
+ * shipped in kexec-tools will unconditionally look for the return
+ * address on the stack and set a kexec_jump_back_entry= command
+ * line option if it's non-zero. There's no other way that it can
+ * tell a preserve-context (kjump) kexec from a normal one.
+ */
+ pushq $0
/* store the start address on the stack */
pushq %rdx