lkml.org 
[lkml]   [2024]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] x86/fpu: verify xstate buffer size according with requested features
From
On 1/18/24 11:54, Thomas Gleixner wrote:
> On Thu, Jan 18 2024 at 10:27, Dave Hansen wrote:
>> If we have nice, reliable fault handling and then decide that we've got
>> XRSTOR's running amok reading random memory all over the place that need
>> a nicer error message, then we can add that code to predict the future.
>> If our "predict the future" code goes wrong, then we lose an error
>> message -- not a big deal.
> After staring more at it, it's arguable to pass fpstate->user_size to
> fault_in_readable() and ignore fx_sw->xstate_size completely.
>
> That's a guaranteed to be reliable size which prevents endless loops
> because arguably that's the maximum size which can be touched by XRSTOR,
> no?

I like it. It takes fx_sw completely out of the picture, which was the
root of the problem in the first place.

\
 
 \ /
  Last update: 2024-01-18 23:04    [W:0.277 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site