* [stable:PATCH v5.10.105] arm64: kvm: Fix copy-and-paste error in bhb templates for v5.10 stable
@ 2022-03-15 13:57 James Morse
2022-03-17 10:03 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: James Morse @ 2022-03-15 13:57 UTC (permalink / raw)
To: stable; +Cc: gregkh, pavel, catalin.marinas, linux-kernel, 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 <pavel@denx.de>
Link: https://lore.kernel.org/all/20220310234858.GB16308@amd/
Signed-off-by: James Morse <james.morse@arm.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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [stable:PATCH v5.10.105] arm64: kvm: Fix copy-and-paste error in bhb templates for v5.10 stable
2022-03-15 13:57 [stable:PATCH v5.10.105] arm64: kvm: Fix copy-and-paste error in bhb templates for v5.10 stable James Morse
@ 2022-03-17 10:03 ` Greg KH
2022-03-17 10:05 ` Pavel Machek
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2022-03-17 10:03 UTC (permalink / raw)
To: James Morse; +Cc: stable, pavel, catalin.marinas, linux-kernel
On Tue, Mar 15, 2022 at 01:57:20PM +0000, James Morse wrote:
> 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@denx.de>
> Link: https://lore.kernel.org/all/20220310234858.GB16308@amd/
> Signed-off-by: James Morse <james.morse@arm.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
>
Thanks, now queued up!
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [stable:PATCH v5.10.105] arm64: kvm: Fix copy-and-paste error in bhb templates for v5.10 stable
2022-03-17 10:03 ` Greg KH
@ 2022-03-17 10:05 ` Pavel Machek
0 siblings, 0 replies; 3+ messages in thread
From: Pavel Machek @ 2022-03-17 10:05 UTC (permalink / raw)
To: Greg KH; +Cc: James Morse, stable, pavel, catalin.marinas, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 835 bytes --]
Hi!
> > 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.
> > @@ -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
>
> Thanks, now queued up!
Thank you.
Reviewed-by: Pavel Machek <pavel@denx.de>
Pavel
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-03-17 10:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-15 13:57 [stable:PATCH v5.10.105] arm64: kvm: Fix copy-and-paste error in bhb templates for v5.10 stable James Morse
2022-03-17 10:03 ` Greg KH
2022-03-17 10:05 ` Pavel Machek
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.