/[packages]/updates/8/kernel/current/SOURCES/x86-speculation-use-generic-retpoline-by-default-on-amd.patch
ViewVC logotype

Contents of /updates/8/kernel/current/SOURCES/x86-speculation-use-generic-retpoline-by-default-on-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: 1342 byte(s)
add current -stable queue
1 From foo@baz Tue Mar 8 07:37:56 PM CET 2022
2 From: Kim Phillips <kim.phillips@amd.com>
3 Date: Mon, 28 Feb 2022 11:23:15 -0600
4 Subject: x86/speculation: Use generic retpoline by default on AMD
5
6 From: Kim Phillips <kim.phillips@amd.com>
7
8 commit 244d00b5dd4755f8df892c86cab35fb2cfd4f14b upstream.
9
10 AMD retpoline may be susceptible to speculation. The speculation
11 execution window for an incorrect indirect branch prediction using
12 LFENCE/JMP sequence may potentially be large enough to allow
13 exploitation using Spectre V2.
14
15 By default, don't use retpoline,lfence on AMD. Instead, use the
16 generic retpoline.
17
18 Signed-off-by: Kim Phillips <kim.phillips@amd.com>
19 Signed-off-by: Borislav Petkov <bp@suse.de>
20 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 ---
22 arch/x86/kernel/cpu/bugs.c | 9 ---------
23 1 file changed, 9 deletions(-)
24
25 --- a/arch/x86/kernel/cpu/bugs.c
26 +++ b/arch/x86/kernel/cpu/bugs.c
27 @@ -941,15 +941,6 @@ static enum spectre_v2_mitigation __init
28 return SPECTRE_V2_NONE;
29 }
30
31 - if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD ||
32 - boot_cpu_data.x86_vendor == X86_VENDOR_HYGON) {
33 - if (!boot_cpu_has(X86_FEATURE_LFENCE_RDTSC)) {
34 - pr_err("LFENCE not serializing, switching to generic retpoline\n");
35 - return SPECTRE_V2_RETPOLINE;
36 - }
37 - return SPECTRE_V2_LFENCE;
38 - }
39 -
40 return SPECTRE_V2_RETPOLINE;
41 }
42

  ViewVC Help
Powered by ViewVC 1.1.30