Re: [PATCH v3 06/35] x86/bugs: Restructure mmio mitigation

From: Borislav Petkov
Date: Wed Feb 19 2025 - 13:21:21 EST


On Wed, Feb 12, 2025 at 03:16:46PM -0800, Josh Poimboeuf wrote:
> static bool __init verw_mitigation_enabled(void)
> {
> return mds_mitigation != MDS_MITIGATION_OFF ||
> (taa_mitigation != TAA_MITIGATION_OFF && taa_vulnerable()) ||
> (mmio_mitigation != MMIO_MITIGATION_OFF && mmio_needs_verw());
> (rfds_mitigation != RFDS_MITIGATION_OFF && !rfds_needs_ucode());
> }

Instead of turning it into a head-scratching madness, it might be a lot easier
if all the places which enable VERW mitigation, would do

verw_mitigation_enabled = true;

and then the code can simply check that static var...

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette