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] [day] [month] [year] [list]
Message-ID: <20170802203652.GD32403@flask>
Date:   Wed, 2 Aug 2017 22:36:52 +0200
From:   Radim Krčmář <rkrcmar@...hat.com>
To:     David Matlack <dmatlack@...gle.com>
Cc:     Paolo Bonzini <pbonzini@...hat.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        kvm list <kvm@...r.kernel.org>,
        Jim Mattson <jmattson@...gle.com>
Subject: Re: [PATCH] KVM: nVMX: do not pin the VMCS12

2017-07-27 10:20-0700, David Matlack:
> On Thu, Jul 27, 2017 at 6:54 AM, Paolo Bonzini <pbonzini@...hat.com> wrote:
> > Since the current implementation of VMCS12 does a memcpy in and out
> > of guest memory, we do not need current_vmcs12 and current_vmcs12_page
> > anymore.  current_vmptr is enough to read and write the VMCS12.
> 
> This patch also fixes dirty tracking (memslot->dirty_bitmap) of the
> VMCS12 page by using kvm_write_guest. nested_release_page() only marks
> the struct page dirty.
> 
> >
> > Signed-off-by: Paolo Bonzini <pbonzini@...hat.com>
> > ---
> > diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> > @@ -7623,14 +7614,13 @@ static int handle_vmptrld(struct kvm_vcpu *vcpu)
> >                 }
> >
> >                 nested_release_vmcs12(vmx);
> > -               vmx->nested.current_vmcs12 = new_vmcs12;
> > -               vmx->nested.current_vmcs12_page = page;
> >                 /*
> >                  * Load VMCS12 from guest memory since it is not already
> >                  * cached.
> >                  */
> > -               memcpy(vmx->nested.cached_vmcs12,
> > -                      vmx->nested.current_vmcs12, VMCS12_SIZE);
> > +               memcpy(vmx->nested.cached_vmcs12, new_vmcs12, VMCS12_SIZE);
> > +               kunmap(page);
> 
> + nested_release_page_clean(page);

Added this and your note about the dirty bit when applying,

thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ