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: <DE8FD8AA-35C6-4E51-B1E0-CE9586892CB3@zytor.com>
Date: Thu, 04 Jul 2024 19:45:00 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Borislav Petkov <bp@...en8.de>
CC: Andrew Cooper <andrew.cooper3@...rix.com>, dave.hansen@...el.com,
        xin@...or.com, linux-kernel@...r.kernel.org, tglx@...utronix.de,
        mingo@...hat.com, dave.hansen@...ux.intel.com, x86@...nel.org,
        peterz@...radead.org, nik.borisov@...e.com,
        houwenlong.hwl@...group.com
Subject: Re: [PATCH v1 2/4] x86/fred: Write to FRED MSRs with wrmsrns()

On July 3, 2024 9:17:05 AM PDT, Borislav Petkov <bp@...en8.de> wrote:
>On Wed, Jul 03, 2024 at 09:06:55AM -0700, H. Peter Anvin wrote:
>> I believe tglx declared to use them unconditionally since FRED depends on
>> WRMSRNS (and the kernel enforces that.)
>> 
>> Using an alternative would make wrmsrns() a more useful construct in
>> general, though.
>
>We can't use them unconditionally and we don't need an alternative just for
>that - a simple
>
>	if (cpu_feature_enabled(X86_FEATURE_WRMSRNS))
>		wrmsrns()
>	else
>		wrmsr()
>
>would be perfectly fine.
>

Except that that would be more cleanly spelled wrmsrns()... let's just abstract the whole thing away and let the user use wrmsrns() whenever serialization is not necessary.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ