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: <b9e73d06-bd95-7c54-3ff1-f9e43c9967a4@intel.com>
Date:   Wed, 11 Jan 2023 16:37:17 -0800
From:   Dave Hansen <dave.hansen@...el.com>
To:     "Chen, Yian" <yian.chen@...el.com>,
        Sohil Mehta <sohil.mehta@...el.com>,
        linux-kernel@...r.kernel.org, x86@...nel.org,
        Andy Lutomirski <luto@...nel.org>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Ravi Shankar <ravi.v.shankar@...el.com>,
        Tony Luck <tony.luck@...el.com>,
        Paul Lai <paul.c.lai@...el.com>
Subject: Re: [PATCH 3/7] x86/cpu: Disable kernel LASS when patching kernel
 alternatives

On 1/11/23 16:27, Chen, Yian wrote:
>> It seems we are implicitly relying on the on stac() and clac()
>> calls that are added for SMAP. Have you tried running with SMAP
>> disabled i.e "clearcpuid=smap"?
>> 
> Yes, I tested with clearcpuid=smap.
It works by accident, then.

clearcpuid=smap means that the kernel should be running as if
CPUID.(EAX=07H,ECX=0H):EBX.SMAP[bit 20]==0.  STAC/CLAC should #UD in
that case.

The only reason that it happens to work is that STAC/CLAC apparently
actually continue to work even if CR4.SMAP==0.

I'm actually a _bit_ surprised by this, but I bet there's a good reason
for it.

In any case, please just make LASS dependent on SMAP.  It's the right
thing to do on several levels.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ