Commit 21e726c4 authored by Fenghua Yu's avatar Fenghua Yu Committed by H. Peter Anvin

x86/xsaves: Clear reserved bits in xsave header

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: default avatarFenghua Yu <fenghua.yu@intel.com>
Link: http://lkml.kernel.org/r/1401387164-43416-12-git-send-email-fenghua.yu@intel.comSigned-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
parent facbf4d9
...@@ -375,7 +375,7 @@ int xstateregs_set(struct task_struct *target, const struct user_regset *regset, ...@@ -375,7 +375,7 @@ int xstateregs_set(struct task_struct *target, const struct user_regset *regset,
/* /*
* These bits must be zero. * These bits must be zero.
*/ */
xsave_hdr->reserved1[0] = xsave_hdr->reserved1[1] = 0; memset(xsave_hdr->reserved, 0, 48);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment