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: <4111AC83-7A7C-4268-B294-3AB75C0EC451@oracle.com>
Date: Thu, 7 Nov 2024 23:56:08 +0000
From: Aruna Ramakrishna <aruna.ramakrishna@...cle.com>
To: Dave Hansen <dave.hansen@...el.com>
CC: Rudi Horn <rudi.horn@...cle.com>, Thomas Gleixner <tglx@...utronix.de>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "dave.hansen@...ux.intel.com"
	<dave.hansen@...ux.intel.com>,
        "x86@...nel.org" <x86@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Joe Jin
	<joe.jin@...cle.com>, Jeff Xu <jeffxu@...omium.org>
Subject: Re: [RFC] Restore PKRU to user-defined value after signal handling


> On Nov 7, 2024, at 7:56 AM, Dave Hansen <dave.hansen@...el.com> wrote:
> 
> The question still stands as to whether the new XSTATE_BV value should
> be calculated by the kernel or read directly from the userspace buffer.

If it is calcuated by the kernel, is there a chance that we could inadvertently
set XINUSE[i] to 1 for more components other than just PKRU? Since it is 
possible that some other component was set to its init state by XSAVE, but
we’d be overwriting it with:

       xstate_bv = mask | XFEATURE_MASK_PKRU;

It seems safer to read userspace buffer and write it back, so that we do not
modify any other XSTATE_BV bits.

Apologies if I’m wildly off base.

Thanks,
Aruna

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ