lkml.org 
[lkml]   [2021]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v5 14/28] x86/fpu/xstate: Prevent unauthorised use of dynamic user state
From
Date
On 6/29/21 12:13 PM, Bae, Chang Seok wrote:
>>
>> Is it actually important to make sure that they are dynamic features?
>> Is there *any* case where a feature (dynamic or not) can have XFD armed
>> and be out of its init state?
> In this AMX series, XFD is only used for the xstate buffer management. The
> code is made in a such way that XFD and dynamic states are a bit coupled.
>
> But I think XFD can be extended for other usages in the future. Then, yes.
> (This warning is also for future code changes.)
>
> So, reading the MSR is just simple and clean here, but it consumes cycles. Or,
> a task may have a field for XFD value per se unless this conversion is
> acceptable.

I'm not following.

All that I see here is that you made what could be a very generic check:

Thou shalt never XSAVE a xfeature which is XFD-armed

and made it more specific:

Thou shalt never XSAVE a *dynamic* xfeature which is XFD-armed

I'm just saying that I don't see the value in a less-broad check. Let's
make the sanity check as broad as possible. That actually makes the
code simpler.

\
 
 \ /
  Last update: 2021-06-29 21:28    [W:0.082 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site