[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231012164814.oc3r3sovsfrldpop@treble>
Date: Thu, 12 Oct 2023 09:48:14 -0700
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: Borislav Petkov <bp@...en8.de>
Cc: Breno Leitao <leitao@...ian.org>, tglx@...utronix.de,
Ingo Molnar <mingo@...hat.com>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>,
Peter Zijlstra <peterz@...radead.org>,
Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>, leit@...a.com,
"open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4] x86/bugs: Add a separate config for each mitigation
On Thu, Oct 12, 2023 at 09:29:20AM +0200, Borislav Petkov wrote:
> On Wed, Oct 11, 2023 at 03:03:25PM -0700, Josh Poimboeuf wrote:
> > I wouldn't call it senseless churn. There are concrete benefits -- for
> > both users and developers -- of having all the mitigation config options
> > living in the same config namespace.
>
> I don't see it. What does the same namespace give you? So you see in the
> code a bunch of ifdeffery and some or all of them have
> CONFIG_MITIGATION_ prepended. To me it doesn't matter whether they're
> mitigations or not - it is just the next Kconfig symbol.
It adds clarity by making the options more self-documenting.
For users who care about such things it makes it easier to identify
which options they need to enable or disable. And it makes it clearer
what those options do without having to go read the docs.
For developers it helps code readability: "ah, this nasty code is for a
side channel mitigation". Also it makes it easier to grep for.
> > Sure, the change might cause pain for users who disable these options,
> > but do those users actually exist?
>
> Apparently there are use cases where people simply want to disable all
> that mitigation crap because they want their performance back. This
> thread being one. And I know of another one with a similar sentiment.
Right, but we have a global option for that. I was wondering if anybody
actually uses the individual options (though I agree with Linus they
should exist to help with code readability).
--
Josh
Powered by blists - more mailing lists