From: Nikolay Borisov <nik.borisov@suse.com>
To: Daniel Sneddon <daniel.sneddon@linux.intel.com>,
Jonathan Corbet <corbet@lwn.net>,
Thomas Gleixner <tglx@linutronix.de>,
Borislav Petkov <bp@alien8.de>,
Peter Zijlstra <peterz@infradead.org>,
Josh Poimboeuf <jpoimboe@kernel.org>,
Ingo Molnar <mingo@redhat.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org
Cc: hpa@zytor.com, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, pawan.kumar.gupta@linux.intel.com
Subject: Re: [PATCH 6/6] x86/bugs: Clean-up verw mitigations
Date: Wed, 2 Oct 2024 17:54:14 +0300 [thread overview]
Message-ID: <b5093703-1c86-4706-9e54-b6d2d413c417@suse.com> (raw)
In-Reply-To: <fdda8f74-4d9a-4aff-ad5b-c7a1f2b0ab0b@linux.intel.com>
On 2.10.24 г. 17:46 ч., Daniel Sneddon wrote:
> On 10/2/24 07:20, Nikolay Borisov wrote:
>>> + if (boot_cpu_has_bug(X86_BUG_MDS)) {
>>> mds_mitigation = MDS_MITIGATION_FULL;
>>> mds_select_mitigation();
>>> + } else {
>>> + mds_mitigation = MDS_MITIGATION_OFF;
>>> }
>>
>> BUt with this logic if CONFIG_MITIGATION_MDS is deselected meaning
>> mds_mitigations will have the value MDS_MITIGATION_OFF, yet now you will
>> set it to _FULL thereby overriding the compile-time value of the user.
>> So shouldn't this condition be augmented to alsoo consider
>> CONFIG_MITIGATION_MDS compile time value?
>
> CONFIG_MITIGATION_MDS is used to set the value of the mds_mitigation variable.
> Same goes for all the other mitigations touched here. Those variables are
> checked in verw_mitigations_disabled() which is called just before this code. If
> all of them are configured off, we return without enabling any of the mitigations.
Ah, indeed.
Reviewed-by: Nikolay Borisov <nik.borisov@suse.com>
next prev parent reply other threads:[~2024-10-02 14:54 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-24 22:31 [PATCH 0/6] VERW based clean-up Daniel Sneddon
2024-09-24 22:31 ` [PATCH 1/6] x86/bugs: Create single parameter for VERW based mitigations Daniel Sneddon
2024-10-08 19:24 ` Kaplan, David
2024-10-09 16:17 ` Daniel Sneddon
2024-10-09 16:36 ` Kaplan, David
2024-10-09 16:39 ` Daniel Sneddon
2024-10-09 19:44 ` Daniel Sneddon
2024-10-09 20:02 ` Kaplan, David
2024-10-09 20:34 ` Daniel Sneddon
2024-10-10 4:52 ` Josh Poimboeuf
2024-10-10 14:57 ` Borislav Petkov
2024-10-14 15:42 ` Daniel Sneddon
2024-10-15 13:52 ` Borislav Petkov
2024-10-15 14:05 ` Daniel Sneddon
2024-09-24 22:31 ` [PATCH 2/6] x86/bugs: Remove MDS command line Daniel Sneddon
2024-09-24 22:34 ` Dave Hansen
2024-09-24 22:41 ` Daniel Sneddon
2024-09-24 22:31 ` [PATCH 3/6] x86/bugs: Remove TAA kernel parameter Daniel Sneddon
2024-09-24 22:31 ` [PATCH 4/6] x86/bugs: Remove MMIO " Daniel Sneddon
2024-09-24 22:31 ` [PATCH 5/6] x86/bugs: Remove RFDS " Daniel Sneddon
2024-09-24 22:31 ` [PATCH 6/6] x86/bugs: Clean-up verw mitigations Daniel Sneddon
2024-10-02 14:20 ` Nikolay Borisov
2024-10-02 14:46 ` Daniel Sneddon
2024-10-02 14:54 ` Nikolay Borisov [this message]
2024-10-07 19:37 ` Josh Poimboeuf
2024-10-08 16:17 ` Daniel Sneddon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b5093703-1c86-4706-9e54-b6d2d413c417@suse.com \
--to=nik.borisov@suse.com \
--cc=bp@alien8.de \
--cc=corbet@lwn.net \
--cc=daniel.sneddon@linux.intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jpoimboe@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pawan.kumar.gupta@linux.intel.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®