|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] x86/kexec: Replace CALL+UD2 pattern with JMP
commit 8b7a72f4d3a5a5e13e42b2e89261a2f733299f9f
Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Fri Dec 5 15:22:38 2025 +0000
Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Wed Dec 10 14:48:45 2025 +0000
x86/kexec: Replace CALL+UD2 pattern with JMP
Linux jumps to the target image rather than calling it. Switch to using
JMP,
and drop the trailing UD2s.
Linux does have a mode, named CONFIG_KEXEC_JUMP, where the target image can
be
returned from, but that involves extra metadata and setting up a stack
within
the target image which Xen doesn't support at the moment.
No functional change.
Reported-by: Jan Beulich <jbeulich@xxxxxxxx>
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
---
xen/arch/x86/x86_64/kexec_reloc.S | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/xen/arch/x86/x86_64/kexec_reloc.S
b/xen/arch/x86/x86_64/kexec_reloc.S
index 50ba454abd..b52d31a654 100644
--- a/xen/arch/x86/x86_64/kexec_reloc.S
+++ b/xen/arch/x86/x86_64/kexec_reloc.S
@@ -75,10 +75,8 @@ FUNC(kexec_reloc, PAGE_SIZE)
testq $KEXEC_RELOC_FLAG_COMPAT, %r8
jnz .L_call_32_bit
-.L_call_64_bit:
- /* Call the image entry point. This should never return. */
- callq *%rbp
- ud2
+ /* Jump to the image entry point */
+ jmp *%rbp
.L_call_32_bit:
/* Setup IDT. */
@@ -170,9 +168,8 @@ FUNC_LOCAL(compatibility_mode)
xorl %eax, %eax
movl %eax, %cr4
- /* Call the image entry point. This should never return. */
- call *%ebp
- ud2
+ /* Jump to the image entry point. */
+ jmp *%ebp
END(compatibility_mode)
/* Separate code and data into into different cache lines */
--
generated by git-patchbot for /home/xen/git/xen.git#staging
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |