summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikolay Borisov <nik.borisov@suse.com>2024-05-29 18:28:50 +0300
committerBorislav Petkov (AMD) <bp@alien8.de>2024-06-17 17:45:19 +0200
commit54183d103d38e5efefce8500ec41dfbfaba9c19d (patch)
treea6c855cc5c0ce9f54c4c8cfe8a1abd933a87849c
parentf385f024639431bec3e70c33cdbc9563894b3ee5 (diff)
downloadlinux-54183d103d38e5efefce8500ec41dfbfaba9c19d.tar.gz
linux-54183d103d38e5efefce8500ec41dfbfaba9c19d.tar.bz2
linux-54183d103d38e5efefce8500ec41dfbfaba9c19d.zip
x86/kexec: Remove spurious unconditional JMP from from identity_mapped()
This seemingly straightforward JMP was introduced in the initial version of the the 64bit kexec code without any explanation. It turns out (check accompanying Link) it's likely a copy/paste artefact from 32-bit code, where such a JMP could be used as a serializing instruction for the 486's prefetch queue. On x86_64 that's not needed because there's already a preceding write to cr4 which itself is a serializing operation. [ bp: Typos. Let's try this and see what cries out. If it does, reverting it is trivial. ] Signed-off-by: Nikolay Borisov <nik.borisov@suse.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/all/55bc0649-c017-49ab-905d-212f140a403f@citrix.com/
-rw-r--r--arch/x86/kernel/relocate_kernel_64.S3
1 files changed, 0 insertions, 3 deletions
diff --git a/arch/x86/kernel/relocate_kernel_64.S b/arch/x86/kernel/relocate_kernel_64.S
index 56cab1bb25f5..54e620021c7e 100644
--- a/arch/x86/kernel/relocate_kernel_64.S
+++ b/arch/x86/kernel/relocate_kernel_64.S
@@ -153,9 +153,6 @@ SYM_CODE_START_LOCAL_NOALIGN(identity_mapped)
1:
movq %rax, %cr4
- jmp 1f
-1:
-
/* Flush the TLB (needed?) */
movq %r9, %cr3