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]
Date:   Mon, 5 Sep 2016 08:49:31 +0800
From:   Wanpeng Li <kernellwp@...il.com>
To:     Jan Dakinevich <jan.dakinevich@...il.com>
Cc:     kvm <kvm@...r.kernel.org>, Paolo Bonzini <pbonzini@...hat.com>,
        Radim Krcmar <rkrcmar@...hat.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        ynorov@...iumnetworks.com
Subject: Re: [PATCH] KVM: nVMX: pass valid guest linear-address to the L1

2016-09-05 2:22 GMT+08:00 Jan Dakinevich <jan.dakinevich@...il.com>:
> If EPT support is exposed to L1 hypervisor, guest linear-address field
> of VMCS should contain GVA of L2, the access to which caused EPT violation.
>
> Signed-off-by: Jan Dakinevich <jan.dakinevich@...il.com>
> ---
>  arch/x86/kvm/vmx.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index 5cede40..a4bb2bd 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -10500,6 +10500,9 @@ static void prepare_vmcs12(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12,
>                 vmcs12->guest_pdptr3 = vmcs_read64(GUEST_PDPTR3);
>         }
>
> +       if (nested_cpu_has_ept(vmcs12))
> +               vmcs12->guest_linear_address = vmcs_readl(GUEST_LINEAR_ADDRESS);
> +

No, nested_ept_inject_page_fault() will set
vmcs12->guest_linear_address after L0 walks L1's EPT page table and
finds that the mapping is invalid if nested EPT is enabled.
prepare_vmcs12() just copies the vmcs field that could have changed by
the L2 guest or the exit-information etc instead of all fields since
other fields are modified by L1 with VMWRITE, which already writes to
vmcs12 directly.

Regards,
Wanpeng Li

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ