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: <1ec9dd62-7299-1662-3907-bf73ea56fa7d@intel.com>
Date:   Tue, 29 Mar 2022 15:34:46 -0700
From:   Dave Hansen <dave.hansen@...el.com>
To:     Borislav Petkov <bp@...en8.de>
Cc:     Matthias Welwarsky <matthias.welwarsky@...go.com>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        linux-kernel@...r.kernel.org, x86-ml <x86@...nel.org>
Subject: Re: x86, possible bug in __memmove() alternatives patching

On 3/26/22 01:27, Borislav Petkov wrote:
> So, more to the point, it is about this chunk:
> 
>         /*
>          * If fast string is not enabled in IA32_MISC_ENABLE for any reason,
>          * clear the fast string and enhanced fast string CPU capabilities.
>          */
>         if (c->x86 > 6 || (c->x86 == 6 && c->x86_model >= 0xd)) {
>                 rdmsrl(MSR_IA32_MISC_ENABLE, misc_enable);
>                 if (!(misc_enable & MSR_IA32_MISC_ENABLE_FAST_STRING)) {
>                         pr_info("Disabled fast string operations\n");
>                         setup_clear_cpu_cap(X86_FEATURE_REP_GOOD);
>                         setup_clear_cpu_cap(X86_FEATURE_ERMS);
>                 }
>         }
> 
> we already check whether fast strings was disabled, regardless of HV or
> not. Question is, should we clear X86_FEATURE_FSRM there too. I wanna
> say yes.

I don't think it would hurt to clear it.

> Or is it that, *if* MSR_IA32_MISC_ENABLE_FAST_STRING is clear, the FSRM
> CPUID bit was not set either so nothing to clear...

I don't think there's really any direct connection between the CPUID bit
and MSR_IA32_MISC_ENABLE_FAST_STRING.  The CPUID bit definitely doesn't
appear to be cleared by the CPU if MSR_IA32_MISC_ENABLE_FAST_STRING is
clear.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ