lkml.org 
[lkml]   [2021]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2 01/23] x86/fpu: Extend fpu_xstate_prctl() with guest permissions
Date
On Fri, Dec 17 2021 at 19:45, Thomas Gleixner wrote:

> On Fri, Dec 17 2021 at 07:29, Jing Liu wrote:
>>
>> -static int __xstate_request_perm(u64 permitted, u64 requested)
>> +static int __xstate_request_perm(u64 permitted, u64 requested, bool guest)
>> {
>> /*
>> * This deliberately does not exclude !XSAVES as we still might
>> @@ -1605,6 +1605,7 @@ static int __xstate_request_perm(u64 permitted, u64 requested)
>> */
>> bool compacted = cpu_feature_enabled(X86_FEATURE_XSAVES);
>> struct fpu *fpu = &current->group_leader->thread.fpu;
>> + struct fpu_state_perm *perm;
>> unsigned int ksize, usize;
>> u64 mask;
>> int ret;
>
> needs to be
>
> int ret = 0;
>

Alternatively return 0 at the end of the function.

\
 
 \ /
  Last update: 2021-12-17 19:48    [W:0.896 / U:1.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site