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: <20200311161152.GF21852@linux.intel.com>
Date:   Wed, 11 Mar 2020 09:11:52 -0700
From:   Sean Christopherson <sean.j.christopherson@...el.com>
To:     Peter Xu <peterx@...hat.com>
Cc:     linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
        Yan Zhao <yan.y.zhao@...el.com>,
        Jason Wang <jasowang@...hat.com>,
        Alex Williamson <alex.williamson@...hat.com>,
        Vitaly Kuznetsov <vkuznets@...hat.com>,
        "Dr . David Alan Gilbert" <dgilbert@...hat.com>,
        Christophe de Dinechin <dinechin@...hat.com>,
        "Michael S . Tsirkin" <mst@...hat.com>,
        Kevin Tian <kevin.tian@...el.com>,
        Paolo Bonzini <pbonzini@...hat.com>
Subject: Re: [PATCH v6 03/14] KVM: X86: Don't track dirty for
 KVM_SET_[TSS_ADDR|IDENTITY_MAP_ADDR]

On Wed, Mar 11, 2020 at 12:01:19PM -0400, Peter Xu wrote:
> On Tue, Mar 10, 2020 at 08:06:37AM -0700, Sean Christopherson wrote:
> > On Mon, Mar 09, 2020 at 05:44:13PM -0400, Peter Xu wrote:
> > > -	idx = srcu_read_lock(&kvm->srcu);
> > > -	fn = to_kvm_vmx(kvm)->tss_addr >> PAGE_SHIFT;
> > > -	r = kvm_clear_guest_page(kvm, fn, 0, PAGE_SIZE);
> > > -	if (r < 0)
> > > -		goto out;
> > > +	for (idx = 0; idx < 3; idx++) {
> > > +		r = __copy_to_user(ua + PAGE_SIZE * idx, zero_page, PAGE_SIZE);
> > > +		if (r)
> > > +			return -EFAULT;
> > > +	}
> > 
> > Can this be done in a single __copy_to_user(), or do those helpers not like
> > crossing page boundaries?
> 
> Maybe because the zero_page is only PAGE_SIZE long? :)

Ha, yeah, that'd be a good reason to loop.

> [...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ