From 7d04f5715ee94e67a30c12e1a771c33e7dc5d236 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 17 Mar 2022 11:01:49 +0100 Subject: [PATCH] 5.10-stable patches added patches: arm64-kvm-fix-copy-and-paste-error-in-bhb-templates-for-v5.10-stable.patch --- ...or-in-bhb-templates-for-v5.10-stable.patch | 47 +++++++++++++++++++ queue-5.10/series | 1 + 2 files changed, 48 insertions(+) create mode 100644 queue-5.10/arm64-kvm-fix-copy-and-paste-error-in-bhb-templates-for-v5.10-stable.patch diff --git a/queue-5.10/arm64-kvm-fix-copy-and-paste-error-in-bhb-templates-for-v5.10-stable.patch b/queue-5.10/arm64-kvm-fix-copy-and-paste-error-in-bhb-templates-for-v5.10-stable.patch new file mode 100644 index 00000000000..0ffdf821724 --- /dev/null +++ b/queue-5.10/arm64-kvm-fix-copy-and-paste-error-in-bhb-templates-for-v5.10-stable.patch @@ -0,0 +1,47 @@ +From james.morse@arm.com Thu Mar 17 11:00:55 2022 +From: James Morse +Date: Tue, 15 Mar 2022 13:57:20 +0000 +Subject: arm64: kvm: Fix copy-and-paste error in bhb templates for v5.10 stable +To: stable@vger.kernel.org +Cc: gregkh@linuxfoundation.org, pavel@denx.de, catalin.marinas@arm.com, linux-kernel@vger.kernel.org, james.morse@arm.com +Message-ID: <20220315135720.1302143-1-james.morse@arm.com> + +From: James Morse + +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 +Link: https://lore.kernel.org/all/20220310234858.GB16308@amd/ +Signed-off-by: James Morse +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm64/kvm/hyp/smccc_wa.S | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- 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 diff --git a/queue-5.10/series b/queue-5.10/series index a2fb8b3cf9f..6719449a255 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -20,3 +20,4 @@ sfc-extend-the-locking-on-mcdi-seqno.patch bnx2-fix-an-error-message.patch kselftest-vm-fix-tests-build-with-old-libc.patch io_uring-return-back-safer-resurrect.patch +arm64-kvm-fix-copy-and-paste-error-in-bhb-templates-for-v5.10-stable.patch -- 2.47.3