lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <171871930432.10875.16268210467052883074.tip-bot2@tip-bot2>
Date: Tue, 18 Jun 2024 14:01:44 -0000
From: "tip-bot2 for Nikolay Borisov" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Nikolay Borisov <nik.borisov@...e.com>,
 "Borislav Petkov (AMD)" <bp@...en8.de>, x86@...nel.org,
 linux-kernel@...r.kernel.org
Subject: [tip: x86/cc] x86/kexec: Remove spurious unconditional JMP from from
 identity_mapped()

The following commit has been merged into the x86/cc branch of tip:

Commit-ID:     54183d103d38e5efefce8500ec41dfbfaba9c19d
Gitweb:        https://git.kernel.org/tip/54183d103d38e5efefce8500ec41dfbfaba9c19d
Author:        Nikolay Borisov <nik.borisov@...e.com>
AuthorDate:    Wed, 29 May 2024 18:28:50 +03:00
Committer:     Borislav Petkov (AMD) <bp@...en8.de>
CommitterDate: Mon, 17 Jun 2024 17:45:19 +02:00

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@...e.com>
Signed-off-by: Borislav Petkov (AMD) <bp@...en8.de>
Link: https://lore.kernel.org/all/55bc0649-c017-49ab-905d-212f140a403f@citrix.com/
---
 arch/x86/kernel/relocate_kernel_64.S | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/arch/x86/kernel/relocate_kernel_64.S b/arch/x86/kernel/relocate_kernel_64.S
index 56cab1b..54e6200 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
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ