From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 2/2] KVM: Validate userspace_addr of memslot when registered Date: Mon, 09 May 2011 11:37:32 +0300 Message-ID: <4DC7A7CC.6020707@redhat.com> References: <20110507163136.69222696.takuya.yoshikawa@gmail.com> <20110507163538.aeea223b.takuya.yoshikawa@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: mtosatti@redhat.com, andi@firstfloor.org, kvm@vger.kernel.org, yoshikawa.takuya@oss.ntt.co.jp To: Takuya Yoshikawa Return-path: Received: from mx1.redhat.com ([209.132.183.28]:64896 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751850Ab1EIIho (ORCPT ); Mon, 9 May 2011 04:37:44 -0400 In-Reply-To: <20110507163538.aeea223b.takuya.yoshikawa@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: On 05/07/2011 10:35 AM, Takuya Yoshikawa wrote: > From: Takuya Yoshikawa > > This way, we can avoid checking the user space address many times when > we read the guest memory. > > Although we can do the same for write if we check which slots are > writable, we do not care write now: reading the guest memory happens > more often than writing. Thanks, applied. I changed VERIFY_READ to VERIFY_WRITE, since the checks are exactly the same. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.