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]
Message-ID: <71d9b9b824276ec8611fedb47e74903cd21648b9.camel@infradead.org>
Date:   Wed, 10 Feb 2021 21:04:39 +0000
From:   David Woodhouse <dwmw2@...radead.org>
To:     Sean Christopherson <seanjc@...gle.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,
        linux-kernel@...r.kernel.org
Subject: Re: [EXTERNAL] [PATCH 4/5] KVM: sefltests: Don't bother mapping GVA
 for Xen shinfo test

On Wed, 2021-02-10 at 10:26 -0800, Sean Christopherson wrote:
> Don't bother mapping the Xen shinfo pages into the guest, they don't need
> to be accessed using the GVAs and passing a define with "GPA" in the name
> to addr_gva2hpa() is confusing.
> 
> Cc: David Woodhouse <dwmw@...zon.co.uk>
> Signed-off-by: Sean Christopherson <seanjc@...gle.com>

Makes sense. We did actually use the mapping in an earlier iteration of
the test when it was still testing the runstate info, but I ripped that
out for the final merge because it needs more thought.

Reviewed-by: David Woodhouse <dwmw@...zon.co.uk>

> ---
>  tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c b/tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c
> index b2a3be9eba8e..9246ea310587 100644
> --- a/tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c
> +++ b/tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c
> @@ -80,7 +80,6 @@ int main(int argc, char *argv[])
>         /* Map a region for the shared_info page */
>         vm_userspace_mem_region_add(vm, VM_MEM_SRC_ANONYMOUS,
>                                     SHINFO_REGION_GPA, SHINFO_REGION_SLOT, 2, 0);
> -       virt_map(vm, SHINFO_REGION_GPA, SHINFO_REGION_GPA, 2, 0);
> 
>         struct kvm_xen_hvm_config hvmc = {
>                 .flags = KVM_XEN_HVM_CONFIG_INTERCEPT_HCALL,
> @@ -147,9 +146,9 @@ int main(int argc, char *argv[])
>         struct pvclock_wall_clock *wc;
>         struct pvclock_vcpu_time_info *ti, *ti2;
> 
> -       wc = addr_gva2hva(vm, SHINFO_REGION_GPA + 0xc00);
> -       ti = addr_gva2hva(vm, SHINFO_REGION_GPA + 0x40 + 0x20);
> -       ti2 = addr_gva2hva(vm, PVTIME_ADDR);
> +       wc = addr_gpa2hva(vm, SHINFO_REGION_GPA + 0xc00);
> +       ti = addr_gpa2hva(vm, SHINFO_REGION_GPA + 0x40 + 0x20);
> +       ti2 = addr_gpa2hva(vm, PVTIME_ADDR);
> 
>         vm_ts.tv_sec = wc->sec;
>         vm_ts.tv_nsec = wc->nsec;


Download attachment "smime.p7s" of type "application/x-pkcs7-signature" (5174 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ