lkml.org 
[lkml]   [2016]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 08/10] x86/xsaves: Fix PTRACE frames for XSAVES
From
Date
On 02/22/2016 12:48 PM, Yu-cheng Yu wrote:
> It should have been:
>
> xsave->header.xfeatures = xfeatures |
> (xsave->header.xfeatures & XFEATURE_MASK_SUPERVISOR);
>
> I'll fix it.

Can we break it out to make it more clear?

/*
* The state that came in from userspace was user-state only.
* Mask all the user states out of 'xfeatures'.
*/
xsave->header.xfeatures &= XFEATURE_MASK_SUPERVISOR;
/*
* add back in the features that came in from userspace
*/
xsave->header.xfeatures |= xfeatures

\
 
 \ /
  Last update: 2016-02-22 23:21    [W:0.060 / U:0.776 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site