mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [tip:x86/xsave] x86/xsaves: Clear reserved bits in xsave header
       [not found] <1401387164-43416-12-git-send-email-fenghua.yu@intel.com>
@ 2014-05-30 15:12 ` tip-bot for Fenghua Yu
  0 siblings, 0 replies; only message in thread
From: tip-bot for Fenghua Yu @ 2014-05-30 15:12 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, fenghua.yu, tglx, hpa

Commit-ID:  21e726c4a3625a1038e97795b7aad97109ba7e19
Gitweb:     http://git.kernel.org/tip/21e726c4a3625a1038e97795b7aad97109ba7e19
Author:     Fenghua Yu <fenghua.yu@intel.com>
AuthorDate: Thu, 29 May 2014 11:12:39 -0700
Committer:  H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Thu, 29 May 2014 14:33:00 -0700

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: 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>
---
 arch/x86/kernel/i387.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/i387.c b/arch/x86/kernel/i387.c
index d5dd808..a9a4229 100644
--- a/arch/x86/kernel/i387.c
+++ b/arch/x86/kernel/i387.c
@@ -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;
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-05-30 15:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1401387164-43416-12-git-send-email-fenghua.yu@intel.com>
2014-05-30 15:12 ` [tip:x86/xsave] x86/xsaves: Clear reserved bits in xsave header tip-bot for Fenghua Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®