From james.morse@arm.com Thu Mar 17 11:00:55 2022
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>
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gbp-Pq: Topic bugfix/arm64
Gbp-Pq: Name arm64-kvm-fix-copy-and-paste-error-in-bhb-templates-for-v5.10-stable.patch
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
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