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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4D2F1ED1.1020001@siemens.com>
Date:	Thu, 13 Jan 2011 16:48:33 +0100
From:	Jan Kiszka <jan.kiszka@...mens.com>
To:	Joerg Roedel <joerg.roedel@....com>
CC:	Avi Kivity <avi@...hat.com>, Marcelo Tosatti <mtosatti@...hat.com>,
	kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
	stable@...nel.org
Subject: Re: [PATCH 1/2] KVM: SVM: Fix NMI path when NMI happens in guest
 mode

Am 13.01.2011 16:22, Joerg Roedel wrote:
> The vmexit path on SVM needs to restore the KERNEL_GS_BASE
> MSR in order to savely execute the NMI handler. Otherwise a
> pending NMI can occur after the STGI instruction and crash
> the machine.
> This makes it impossible to run perf and kvm in parallel on
> an AMD machine in a stable way.
> 
> Cc: stable@...nel.org
> Signed-off-by: Joerg Roedel <joerg.roedel@....com>
> ---
>  arch/x86/kvm/svm.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
> index 25bd1bc..8b9bc72 100644
> --- a/arch/x86/kvm/svm.c
> +++ b/arch/x86/kvm/svm.c
> @@ -3637,6 +3637,7 @@ static void svm_vcpu_run(struct kvm_vcpu *vcpu)
>  
>  #ifdef CONFIG_X86_64
>  	wrmsrl(MSR_GS_BASE, svm->host.gs_base);
> +	wrmsrl(MSR_KERNEL_GS_BASE, current->thread.gs);
>  #else
>  	loadsegment(fs, svm->host.fs);
>  #endif

Doesn't this also obsolete the wrmsrl(MSR_KERNEL_GS_BASE) in svm_vcpu_put?

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
--
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