lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c5fa82d7-e5e9-4612-a238-3c58152c40d0@linux.intel.com>
Date: Tue, 29 Oct 2024 07:40:28 -0700
From: Daniel Sneddon <daniel.sneddon@...ux.intel.com>
To: Borislav Petkov <bp@...en8.de>
Cc: Jonathan Corbet <corbet@....net>, Thomas Gleixner <tglx@...utronix.de>,
 Peter Zijlstra <peterz@...radead.org>, Josh Poimboeuf <jpoimboe@...nel.org>,
 Ingo Molnar <mingo@...hat.com>, Dave Hansen <dave.hansen@...ux.intel.com>,
 x86@...nel.org, hpa@...or.com, linux-doc@...r.kernel.org,
 linux-kernel@...r.kernel.org, pawan.kumar.gupta@...ux.intel.com
Subject: Re: [PATCH 2/2] x86/bugs: Clean-up verw mitigations

On 10/29/24 04:37, Borislav Petkov wrote:
> On Mon, Oct 28, 2024 at 04:50:35PM -0700, Daniel Sneddon wrote:
>> @@ -599,20 +503,70 @@ static void __init verw_mitigations_check(void)
>>  	}
>>  }
>>  
>> -static void __init md_clear_select_mitigation(void)
>> +static bool __init verw_mitigations_disabled(void)
>>  {
>>  	verw_mitigations_check();
>> +	/*
>> +	 * TODO: Create a single mitigation variable that will allow for setting
> 
> A patch which introduces a TODO is basically telling me, it is not ready to go
> anywhere yet...
> 
>> +	 * the location of the mitigation, i.e.:
>> +	 *
>> +	 * kernel->user
>> +	 * kvm->guest
>> +	 * kvm->guest if device passthrough
>> +	 * kernel->idle
>> +	 */
>> +	return (mds_mitigation == MDS_MITIGATION_OFF &&
>> +		taa_mitigation == TAA_MITIGATION_OFF &&
>> +		mmio_mitigation == MMIO_MITIGATION_OFF &&
>> +		rfds_mitigation == RFDS_MITIGATION_OFF);
> 
> This should be used inside verw_mitigations_check() instead of repeated here,
> no?
> 
> Also, pls call verw_mitigations_check() "check_verw_mitigations" - the name
> should start with a verb.
> 
> Actually, you can merge verw_mitigations_check() and
> verw_mitigations_disabled(). Please do a *minimal* patch when cleaning this up
> - bugs.c is horrible. It should not get worse.
> 
I'll merge those two.

> What could also help is splitting this patch - it is hard to review as it
> is...
> 
Sure, I'll split this up as much as possible.
> Thx.
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ