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>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220315135720.1302143-1-james.morse@arm.com>
Date:   Tue, 15 Mar 2022 13:57:20 +0000
From:   James Morse <james.morse@....com>
To:     stable@...r.kernel.org
Cc:     gregkh@...uxfoundation.org, pavel@...x.de, catalin.marinas@....com,
        linux-kernel@...r.kernel.org, james.morse@....com
Subject: [stable:PATCH v5.10.105] arm64: kvm: Fix copy-and-paste error in bhb templates for v5.10 stable

KVM's infrastructure for spectre mitigations in the vectors in v5.10 and
earlier is different, it uses templates which are used to build a set of
vectors at runtime.

There are two copy-and-paste errors in the templates: __spectre_bhb_loop_k24
should loop 24 times and __spectre_bhb_loop_k32 32.

Fix these.

Reported-by: Pavel Machek <pavel@...x.de>
Link: https://lore.kernel.org/all/20220310234858.GB16308@amd/
Signed-off-by: James Morse <james.morse@....com>
---
 arch/arm64/kvm/hyp/smccc_wa.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/kvm/hyp/smccc_wa.S b/arch/arm64/kvm/hyp/smccc_wa.S
index 24b281912463..533b0aa73256 100644
--- a/arch/arm64/kvm/hyp/smccc_wa.S
+++ b/arch/arm64/kvm/hyp/smccc_wa.S
@@ -68,7 +68,7 @@ SYM_DATA_START(__spectre_bhb_loop_k24)
 	esb
 	sub	sp, sp, #(8 * 2)
 	stp	x0, x1, [sp, #(8 * 0)]
-	mov	x0, #8
+	mov	x0, #24
 2:	b	. + 4
 	subs	x0, x0, #1
 	b.ne	2b
@@ -85,7 +85,7 @@ SYM_DATA_START(__spectre_bhb_loop_k32)
 	esb
 	sub	sp, sp, #(8 * 2)
 	stp	x0, x1, [sp, #(8 * 0)]
-	mov	x0, #8
+	mov	x0, #32
 2:	b	. + 4
 	subs	x0, x0, #1
 	b.ne	2b
-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ