lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1446800423-21622-1-git-send-email-huaitong.han@intel.com>
Date:	Fri,  6 Nov 2015 17:00:23 +0800
From:	Huaitong Han <huaitong.han@...el.com>
To:	tglx@...utronix.de, mingo@...hat.com, hpa@...or.com
Cc:	dave.hansen@...el.com, x86@...nel.org,
	linux-kernel@...r.kernel.org, Huaitong Han <huaitong.han@...el.com>
Subject: [PATCH] x86/fpu: Fix get_xsave_addr which returns error pointer to KVM

when KVM uses the get_xsave_addr, xsave parameter belongs to guest vcpu, if
xsave is replaced with current task (host) xsave, get_xsave_addr will return error
xsave addr to KVM.

Signed-off-by: Huaitong Han <huaitong.han@...el.com>
---
 arch/x86/kernel/fpu/xstate.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/x86/kernel/fpu/xstate.c b/arch/x86/kernel/fpu/xstate.c
index 62fc001..2c4ac07 100644
--- a/arch/x86/kernel/fpu/xstate.c
+++ b/arch/x86/kernel/fpu/xstate.c
@@ -402,7 +402,6 @@ void *get_xsave_addr(struct xregs_state *xsave, int xstate_feature)
 	if (!boot_cpu_has(X86_FEATURE_XSAVE))
 		return NULL;
 
-	xsave = &current->thread.fpu.state.xsave;
 	/*
 	 * We should not ever be requesting features that we
 	 * have not enabled.  Remember that pcntxt_mask is
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ