[Bug 1085958] New: when nospectre_v2 be used spec_ctrl flags only disappear on Core0
http://bugzilla.suse.com/show_bug.cgi?id=1085958 Bug ID: 1085958 Summary: when nospectre_v2 be used spec_ctrl flags only disappear on Core0 Classification: openSUSE Product: openSUSE Distribution Version: Leap 42.3 Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Kernel Assignee: kernel-maintainers@forge.provo.novell.com Reporter: jnwang@suse.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- When I use nospectre_v2 on kernel cmdline, lscpu doesn't display spec_ctrl flags. but when I cat /proc/cpuinfo | grep spec_ctrl: I will see spec_ctrl flag on other logic core except core0. kernel version: 4.4.120-8.g7186d16-default http://download.opensuse.org/repositories/Kernel:/openSUSE-42.3/standard/ -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1085958
James Wang
http://bugzilla.suse.com/show_bug.cgi?id=1085958
Takashi Iwai
http://bugzilla.suse.com/show_bug.cgi?id=1085958
http://bugzilla.suse.com/show_bug.cgi?id=1085958#c1
Jiri Slaby
parse_early_param nospec <- if passed "nospec" parameter check_bugs identify_boot_cpu identify_cpu(boot_cpu_data) init_intel x86_spec_check -> non-upstream IBRS setup_force_cpu_cap(X86_FEATURE_SPEC_CTRL) apply_forced_caps spectre_v2_select_mitigation spectre_v2_parse_cmdline nospec -> set by "nospectre_v2" param setup_clear_cpu_cap(X86_FEATURE_SPEC_CTRL) rest_init kernel_init kernel_init_freeable smp_init -> distribute
So non-upstream spec v2 sets the forced flag, but later call to nospec won't help, as it does not remove forced flag to be cleared. So nospectre_v2 removes the flag only from the boot cpu. This should fix it: --- a/arch/x86/kernel/cpu/spec_ctrl.c +++ b/arch/x86/kernel/cpu/spec_ctrl.c @@ -100,3 +100,4 @@ int nospec(char *str) return 0; } early_param("nospec", nospec); +early_param("nospectre_v2", nospec); -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1085958
http://bugzilla.suse.com/show_bug.cgi?id=1085958#c2
--- Comment #2 from Jiri Slaby
http://bugzilla.suse.com/show_bug.cgi?id=1085958
http://bugzilla.suse.com/show_bug.cgi?id=1085958#c3
Borislav Petkov
http://bugzilla.suse.com/show_bug.cgi?id=1085958
Borislav Petkov
http://bugzilla.suse.com/show_bug.cgi?id=1085958
http://bugzilla.suse.com/show_bug.cgi?id=1085958#c6
Jiri Slaby
Check it once it's built.
Ping -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1085958
http://bugzilla.suse.com/show_bug.cgi?id=1085958#c7
--- Comment #7 from James Wang
http://bugzilla.suse.com/show_bug.cgi?id=1085958
http://bugzilla.suse.com/show_bug.cgi?id=1085958#c8
--- Comment #8 from James Wang
http://bugzilla.suse.com/show_bug.cgi?id=1085958
http://bugzilla.suse.com/show_bug.cgi?id=1085958#c9
James Wang
Building at:
https://build.opensuse.org/project/ monitor?project=home%3Ajirislaby%3Abnc1085958
Check it once it's built.
It works. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1085958
http://bugzilla.suse.com/show_bug.cgi?id=1085958#c10
--- Comment #10 from Jiri Slaby
http://bugzilla.suse.com/show_bug.cgi?id=1085958
http://bugzilla.suse.com/show_bug.cgi?id=1085958#c11
--- Comment #11 from James Wang
http://bugzilla.suse.com/show_bug.cgi?id=1085958
http://bugzilla.suse.com/show_bug.cgi?id=1085958#c12
--- Comment #12 from Jiri Slaby
http://bugzilla.suse.com/show_bug.cgi?id=1085958
SMASH SMASH
http://bugzilla.suse.com/show_bug.cgi?id=1085958
Swamp Workflow Management
http://bugzilla.suse.com/show_bug.cgi?id=1085958
Swamp Workflow Management
http://bugzilla.suse.com/show_bug.cgi?id=1085958
http://bugzilla.suse.com/show_bug.cgi?id=1085958#c13
--- Comment #13 from Swamp Workflow Management
http://bugzilla.suse.com/show_bug.cgi?id=1085958
Swamp Workflow Management
http://bugzilla.suse.com/show_bug.cgi?id=1085958
Swamp Workflow Management
http://bugzilla.suse.com/show_bug.cgi?id=1085958
Swamp Workflow Management
http://bugzilla.suse.com/show_bug.cgi?id=1085958
http://bugzilla.suse.com/show_bug.cgi?id=1085958#c14
--- Comment #14 from Swamp Workflow Management
http://bugzilla.suse.com/show_bug.cgi?id=1085958
http://bugzilla.suse.com/show_bug.cgi?id=1085958#c15
--- Comment #15 from Swamp Workflow Management
http://bugzilla.suse.com/show_bug.cgi?id=1085958
http://bugzilla.suse.com/show_bug.cgi?id=1085958#c20
Takashi Iwai
http://bugzilla.suse.com/show_bug.cgi?id=1085958
Andreas Hasenkopf
http://bugzilla.suse.com/show_bug.cgi?id=1085958
Swamp Workflow Management
participants (1)
-
bugzilla_noreply@novell.com