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-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 1 Feb 2017 16:13:36 -0800
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Radim Krčmář <rkrcmar@...hat.com>,
        linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
        stable <stable@...r.kernel.org>
Subject: Re: [PATCH] KVM: x86: do not save guest-unsupported XSAVE state



On 01/02/2017 05:19, Radim Krčmář wrote:
> Saving unsupported state prevents migration when the new host does not
> support a XSAVE feature of the original host, even if the feature is not
> exposed to the guest.
> 
> We've masked host features with guest-visible features before, with
> 4344ee981e21 ("KVM: x86: only copy XSAVE state for the supported
> features") and dropped it when implementing XSAVES.  Do it again.
> 
> Fixes: df1daba7d1cb ("KVM: x86: support XSAVES usage in the host")
> Signed-off-by: Radim Krčmář <rkrcmar@...hat.com>

Cc: stable@...r.kernel.org
Reviewed-by: Paolo Bonzini <pbonzini@...hat.com>

Please apply to kvm/master and send it yourself to Linus since I don't
have access to my machine this week.

Paolo

> ---
>  arch/x86/kvm/x86.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 96dd7dd13ee6..5f013ad89b57 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -3221,6 +3221,7 @@ static void fill_xsave(u8 *dest, struct kvm_vcpu *vcpu)
>  	memcpy(dest, xsave, XSAVE_HDR_OFFSET);
>  
>  	/* Set XSTATE_BV */
> +	xstate_bv &= vcpu->arch.guest_supported_xcr0 | XFEATURE_MASK_FPSSE;
>  	*(u64 *)(dest + XSAVE_HDR_OFFSET) = xstate_bv;
>  
>  	/*
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ