Skip to content

Commit

Permalink
x86/xsaves: Clear reserved bits in xsave header
Browse files Browse the repository at this point in the history
The reserved bits (128~511) in the xsave header must be zero according to
X86 SDM. Clear the bits in this patch.

Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Link: http://lkml.kernel.org/r/1401387164-43416-12-git-send-email-fenghua.yu@intel.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
  • Loading branch information
Fenghua Yu authored and H. Peter Anvin committed May 29, 2014
1 parent facbf4d commit 21e726c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kernel/i387.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ int xstateregs_set(struct task_struct *target, const struct user_regset *regset,
/*
* These bits must be zero.
*/
xsave_hdr->reserved1[0] = xsave_hdr->reserved1[1] = 0;
memset(xsave_hdr->reserved, 0, 48);

return ret;
}
Expand Down

0 comments on commit 21e726c

Please sign in to comment.