On 12/09/2018 17:24, Andy Lutomirski wrote:
>> I think you can go a step further and exclude PKRU state from
>> copy_kernel_to_fpregs altogether; you just use RDPKRU/WRPKRU.  This also
>> means you don't need to call __fpregs_* functions in write_pkru.
>>
>>
> Except that the signal ABI has PKRU in the xstate. So we’d need to fake it or 
> do something special for signals.

The signal ABI is already special because it uses the non-compacted
format.  As long as copy_fpregs_to_sigframe includes the PKRU state
(i.e. EDX:EAX=-1), and PKRU value is okay (which it is because it's
switched eagerly), everything should work...

Paolo

Reply via email to