[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250418213336.GIaALFMKSwKKGw7tTd@fat_crate.local>
Date: Fri, 18 Apr 2025 23:33:36 +0200
From: Borislav Petkov <bp@...en8.de>
To: Ingo Molnar <mingo@...nel.org>
Cc: David Kaplan <david.kaplan@....com>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Josh Poimboeuf <jpoimboe@...nel.org>,
Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>,
Ingo Molnar <mingo@...hat.com>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H . Peter Anvin" <hpa@...or.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 00/16] Attack vector controls (part 1)
On Fri, Apr 18, 2025 at 10:03:42PM +0200, Ingo Molnar wrote:
> /* Select the proper CPU mitigations before patching alternatives: */
> mitigation_select_spectre_v1();
> mitigation_select_spectre_v2();
> mitigation_select_retbleed();
> mitigation_select_spectre_v2_user();
> mitigation_select_ssb();
> mitigation_select_l1tf();
> mitigation_select_mds();
> mitigation_update_taa();
> mitigation_select_taa();
> mitigation_select_mmio();
> mitigation_select_rfds();
> mitigation_select_srbds();
> mitigation_select_l1d_flush();
> mitigation_select_srso();
> mitigation_select_gds();
> mitigation_select_bhi();
The bad side of that is that you have a whole set of letters
- "mitigation_select" - before the *actual* name which is the only thing one
is interested in. With the vectors, one is now interested in the operation too
- select, update or apply.
I'd make *which* mitigation is a lot more visible instead of that useless
amassing of letters - especially since all those functions are internal.
spectre_v1_select()
spectre_v2_select()
...
then
...
spectre_v1_update()
...
mmio_update()
and then
...
srso_apply()
l1tf_apply()
...
and so on. Short, sweet, not a lot of bla, that useless "mitigation"
regurgitating is gone and the code is readable again.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists