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: <535E734E.3020307@redhat.com>
Date:	Mon, 28 Apr 2014 17:27:10 +0200
From:	Paolo Bonzini <pbonzini@...hat.com>
To:	Oleg Nesterov <oleg@...hat.com>,
	Andrea Arcangeli <aarcange@...hat.com>
CC:	Avi Kivity <avi.kivity@...il.com>, Gleb Natapov <gleb@...nel.org>,
	Dominik Dingel <dingel@...ux.vnet.ibm.com>,
	Christian Borntraeger <borntraeger@...ibm.com>,
	kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/2] KVM: async_pf: change async_pf_execute() to use get_user_pages(tsk
 => NULL)

Il 28/04/2014 17:03, Oleg Nesterov ha scritto:
> async_pf_execute() passes tsk == current to gup(), this is doesn't
> hurt but unnecessary and misleading. "tsk" is only used to account
> the number of faults and current is the random workqueue thread.
>
> Signed-off-by: Oleg Nesterov <oleg@...hat.com>
> ---
>  virt/kvm/async_pf.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/virt/kvm/async_pf.c b/virt/kvm/async_pf.c
> index 0ced4f3..62f4223 100644
> --- a/virt/kvm/async_pf.c
> +++ b/virt/kvm/async_pf.c
> @@ -81,7 +81,7 @@ static void async_pf_execute(struct work_struct *work)
>  	might_sleep();
>
>  	down_read(&mm->mmap_sem);
> -	get_user_pages(current, mm, addr, 1, 1, 0, NULL, NULL);
> +	get_user_pages(NULL, mm, addr, 1, 1, 0, NULL, NULL);
>  	up_read(&mm->mmap_sem);
>  	kvm_async_page_present_sync(vcpu, apf);
>
>

Thanks, added a Suggested-by for Andrea and applied together with 1/2 to 
kvm/queue.

(Actually, I'm back from a longish vacation and I have a pretty large 
queue, so I haven't even compile tested these for now.  Once I get round 
to at least smoke-test them, I'll really push to kvm/queue).

Paolo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ