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: <8f7e0f4b-5100-67b5-fcb5-f7a968b96110@redhat.com>
Date:   Thu, 14 Nov 2019 12:53:32 -0500
From:   Waiman Long <longman@...hat.com>
To:     Borislav Petkov <bp@...en8.de>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
        linux-kernel@...r.kernel.org, Josh Poimboeuf <jpoimboe@...hat.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>,
        Mark Gross <mgross@...ux.intel.com>,
        Tony Luck <tony.luck@...el.com>
Subject: Re: [PATCH] x86/speculation: Fix incorrect MDS/TAA mitigation status

On 11/14/19 12:45 PM, Borislav Petkov wrote:
> On Wed, Nov 13, 2019 at 02:33:50PM -0500, Waiman Long wrote:
>> For MDS vulnerable processors with TSX support, enabling either MDS
>> or TAA mitigations will enable the use of VERW to flush internal
>> processor buffers at the right code path. IOW, they are either both
>> mitigated or both not mitigated. However, if the command line options
>> are inconsistent, the vulnerabilites sysfs files may not report the
>> mitigation status correctly.
>>
>> For example, with only the "mds=off" option:
>>
>>   vulnerabilities/mds:Vulnerable; SMT vulnerable
>>   vulnerabilities/tsx_async_abort:Mitigation: Clear CPU buffers; SMT vulnerable
>>
>> The mds vulnerabilities file has wrong status in this case.
>>
>> Change taa_select_mitigation() to sync up the two mitigation status
>> and have them turned off if both "mds=off" and "tsx_async_abort=off"
>> are present.
>>
>> Signed-off-by: Waiman Long <longman@...hat.com>
>> ---
>>  arch/x86/kernel/cpu/bugs.c | 17 +++++++++++++++--
>>  1 file changed, 15 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
>> index 4c7b0fa15a19..418d41c1fd0d 100644
>> --- a/arch/x86/kernel/cpu/bugs.c
>> +++ b/arch/x86/kernel/cpu/bugs.c
>> @@ -304,8 +304,12 @@ static void __init taa_select_mitigation(void)
>>  		return;
>>  	}
>>  
>> -	/* TAA mitigation is turned off on the cmdline (tsx_async_abort=off) */
>> -	if (taa_mitigation == TAA_MITIGATION_OFF)
>> +	/*
>> +	 * TAA mitigation via VERW is turned off if both
>> +	 * tsx_async_abort=off and mds=off are specified.
>> +	 */
> So this changes the dependency of switches so if anything, it should be
> properly documented first in all three:
>
> Documentation/admin-guide/hw-vuln/tsx_async_abort.rst
> Documentation/x86/tsx_async_abort.rst
> Documentation/admin-guide/kernel-parameters.txt
>
> However, before we do that, we need to agree on functionality:
I agree that the documentation needs to be updated. I am going to do
that once we have a consensus of what is the right thing to do.
> Will the mitigations be disabled only with *both* =off supplied on the
> command line or should the mitigations be disabled when *any* of the two
> =off is supplied?

The mitigation is disabled only with BOTH =off supplied or
"mitigations=off". This is the current behavior. This patch is just to
make sure that vulnerabilities files reflect the actual behavior. Of
course, we can change it to disable mitigation with either =off if this
is what the consensus turn out to be.

Cheers,
Longman

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ