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: <87sg1owmth.ffs@nanos.tec.linutronix.de>
Date:   Fri, 11 Jun 2021 15:30:34 +0200
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Peter Zijlstra <peterz@...radead.org>,
        Andy Lutomirski <luto@...nel.org>
Cc:     x86@...nel.org, Dave Hansen <dave.hansen@...el.com>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] x86/fpu: Rename "dynamic" XSTATEs to "independent"

On Fri, Jun 11 2021 at 10:01, Peter Zijlstra wrote:
> On Thu, Jun 10, 2021 at 10:13:36PM -0700, Andy Lutomirski wrote:
> Yesterday tglx proposed the *save*_to_{user,kernel}() and
> *rstor*_from_{user,kernel}() namespace for pretty much every other such
> function.
>
> And while I agree that independent_supervisor beats dynamic_supervisor
> for a name, they're both stupid long :-(
>
> I don't suppose we can simply use xsaves_to_kernel()
> xstrors_from_kernel() and add some magic to their respective mask
> handling to ensure that a mask belongs to only 1 (of 3) types.
>
> 	int types = 0;
>
> 	if (mask & xfeatures_mask_user())
> 		type++;
> 	if (mask & xfeatures_mask_supervisor())
> 		types++;
> 	if (mask & xfeatures_mask_independent())
> 		types++;
>
> 	if (WARN_ON_ONCE(type != 1))
> 		return;

We basically have only two sets which are exclusive:

Features which end up in task->fpu.state.xstate and those independent
ones. Let me add something like this to the pile I have anyway.

I pick up the rename of the mask bits though, as this dynamic naming is
really bad. I'm not too happy with that independent name either, but
it's at least better.

Thanks,

        tglx


    

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ