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, 11 Dec 2019 02:16:35 +0000
From:   "Kang, Luwei" <luwei.kang@...el.com>
To:     "Christopherson, Sean J" <sean.j.christopherson@...el.com>,
        Paolo Bonzini <pbonzini@...hat.com>
CC:     Vitaly Kuznetsov <vkuznets@...hat.com>,
        Wanpeng Li <wanpengli@...cent.com>,
        Jim Mattson <jmattson@...gle.com>,
        Joerg Roedel <joro@...tes.org>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Chao Peng <chao.p.peng@...ux.intel.com>
Subject: RE: [PATCH 1/2] KVM: VMX: Add non-canonical check on writes to RTIT
 address MSRs



> -----Original Message-----
> From: Christopherson, Sean J <sean.j.christopherson@...el.com>
> Sent: Wednesday, December 11, 2019 7:25 AM
> To: Paolo Bonzini <pbonzini@...hat.com>
> Cc: Christopherson, Sean J <sean.j.christopherson@...el.com>; Vitaly Kuznetsov <vkuznets@...hat.com>; Wanpeng Li
> <wanpengli@...cent.com>; Jim Mattson <jmattson@...gle.com>; Joerg Roedel <joro@...tes.org>; kvm@...r.kernel.org; linux-
> kernel@...r.kernel.org; Chao Peng <chao.p.peng@...ux.intel.com>; Kang, Luwei <luwei.kang@...el.com>
> Subject: [PATCH 1/2] KVM: VMX: Add non-canonical check on writes to RTIT address MSRs
> 
> Reject writes to RTIT address MSRs if the data being written is a non-canonical address as the MSRs are subject to canonical checks,
> e.g.
> KVM will trigger an unchecked #GP when loading the values to hardware during pt_guest_enter().
> 
> Cc: stable@...r.kernel.org
> Signed-off-by: Sean Christopherson <sean.j.christopherson@...el.com>
> ---
>  arch/x86/kvm/vmx/vmx.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c index 51e3b27f90ed..9aa2006dbe04 100644
> --- a/arch/x86/kvm/vmx/vmx.c
> +++ b/arch/x86/kvm/vmx/vmx.c
> @@ -2152,6 +2152,8 @@ static int vmx_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
>  			(index >= 2 * intel_pt_validate_cap(vmx->pt_desc.caps,
>  					PT_CAP_num_address_ranges)))
>  			return 1;
> +		if (is_noncanonical_address(data, vcpu))
> +			return 1;

Is this for live migrate a VM with 5 level page table to the VM with 4 level page table?

Thanks,
Luwei Kang

>  		if (index % 2)
>  			vmx->pt_desc.guest.addr_b[index / 2] = data;
>  		else
> --
> 2.24.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ