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: <53A2BC1A.4050702@gmail.com>
Date:	Thu, 19 Jun 2014 18:31:54 +0800
From:	"newtongao(高小明)" 
	<gxm.linux.kernel@...il.com>
To:	gleb@...nel.org, pbonzini@...hat.com, tglx@...utronix.de,
	mingo@...hat.com, hpa@...or.com
CC:	x86@...nel.org, kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] kvm: fix hyperv tsc page clear wrong address

>From 6010e24da995d4161cb879e98fda989e3cdb41c4 Mon Sep 17 00:00:00 2001
From: Xiaoming Gao <newtongao@...cent.com>
Date: Thu, 19 Jun 2014 17:46:05 +0800
Subject: [PATCH] kvm: fix hyperv tsc page clear wrong address

tsc page addr need clear the low HV_X64_MSR_TSC_REFERENCE_ADDRESS_SHIFT bits
before kvm_write_guest write the zero tsc_ref structure to guest, or it will lead
guest to get wrong clocksource.

windows guest will get strong impact, QueryPerformanceCounter will always return 0
,all things in windows rely on clock source will in serious chaos.

Signed-off-by: Xiaoming Gao <newtongao@...cnet.com>
---
 arch/x86/kvm/x86.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index f32a025..ed716cf 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -1898,6 +1898,7 @@ static int set_msr_hyperv_pw(struct kvm_vcpu *vcpu, u32 msr, u64 data)
 		if (!(data & HV_X64_MSR_TSC_REFERENCE_ENABLE))
 			break;
 		gfn = data >> HV_X64_MSR_TSC_REFERENCE_ADDRESS_SHIFT;
+		data &= ~((1 << HV_X64_MSR_TSC_REFERENCE_ADDRESS_SHIFT) - 1);
 		if (kvm_write_guest(kvm, data,
 			&tsc_ref, sizeof(tsc_ref)))
 			return 1;
-- 
1.7.1




View attachment "0001-kvm-fix-hyperv-tsc-page-clear-wrong-address.patch" of type "text/plain" (1197 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ