/[packages]/updates/8/kernel/current/SOURCES/x86-bugs-unconditionally-allow-spectre_v2-retpoline-amd.patch
ViewVC logotype

Contents of /updates/8/kernel/current/SOURCES/x86-bugs-unconditionally-allow-spectre_v2-retpoline-amd.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1789982 - (show annotations) (download)
Tue Mar 8 23:11:59 2022 UTC (2 years, 1 month ago) by tmb
File size: 1392 byte(s)
add current -stable queue
1 From foo@baz Tue Mar 8 07:37:56 PM CET 2022
2 From: Peter Zijlstra <peterz@infradead.org>
3 Date: Tue, 26 Oct 2021 14:01:46 +0200
4 Subject: x86,bugs: Unconditionally allow spectre_v2=retpoline,amd
5
6 From: Peter Zijlstra <peterz@infradead.org>
7
8 commit f8a66d608a3e471e1202778c2a36cbdc96bae73b upstream.
9
10 Currently Linux prevents usage of retpoline,amd on !AMD hardware, this
11 is unfriendly and gets in the way of testing. Remove this restriction.
12
13 Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
14 Reviewed-by: Borislav Petkov <bp@suse.de>
15 Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
16 Tested-by: Alexei Starovoitov <ast@kernel.org>
17 Link: https://lore.kernel.org/r/20211026120310.487348118@infradead.org
18 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19 ---
20 arch/x86/kernel/cpu/bugs.c | 7 -------
21 1 file changed, 7 deletions(-)
22
23 --- a/arch/x86/kernel/cpu/bugs.c
24 +++ b/arch/x86/kernel/cpu/bugs.c
25 @@ -882,13 +882,6 @@ static enum spectre_v2_mitigation_cmd __
26 return SPECTRE_V2_CMD_AUTO;
27 }
28
29 - if (cmd == SPECTRE_V2_CMD_RETPOLINE_AMD &&
30 - boot_cpu_data.x86_vendor != X86_VENDOR_HYGON &&
31 - boot_cpu_data.x86_vendor != X86_VENDOR_AMD) {
32 - pr_err("retpoline,amd selected but CPU is not AMD. Switching to AUTO select\n");
33 - return SPECTRE_V2_CMD_AUTO;
34 - }
35 -
36 spec_v2_print_cond(mitigation_options[i].option,
37 mitigation_options[i].secure);
38 return cmd;

  ViewVC Help
Powered by ViewVC 1.1.30