[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-arch
Subject:    Re: [PATCH 08/10] x86, pkeys: default to a restrictive init PKRU
From:       Andy Lutomirski <luto () amacapital ! net>
Date:       2016-07-29 19:44:24
Message-ID: CALCETrVW0taeuBjha1DEdafM5zZgbAHo=x1AJm=BafTEr++8Vg () mail ! gmail ! com
[Download RAW message or body]

On Fri, Jul 29, 2016 at 10:50 AM, Dave Hansen <dave.hansen@intel.com> wrote:
> On 07/29/2016 10:29 AM, Andy Lutomirski wrote:
>>> > In the end, this ensures that threads which do not know how to
>>> > manage their own pkey rights can not do damage to data which is
>>> > pkey-protected.
>> I think you missed the fpu__clear() caller in kernel/fpu/signal.c.
>>
>> ISTM it might be more comprehensible to change fpu__clear in general
>> and then special case things you want to behave differently.
>
> The code actually already patched the generic fpu__clear():
>
>         fpu__clear() ->
>         copy_init_fpstate_to_fpregs() ->
>         copy_init_pkru_to_fpregs()
>
> So I think it hit the case you are talking about.

Whoops, missed that.

-- 
Andy Lutomirski
AMA Capital Management, LLC
--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic