From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:56129) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqMii-00007a-M6 for qemu-devel@nongnu.org; Thu, 26 Jan 2012 05:38:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RqMic-0000nz-VE for qemu-devel@nongnu.org; Thu, 26 Jan 2012 05:38:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:4748) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqMic-0000na-Og for qemu-devel@nongnu.org; Thu, 26 Jan 2012 05:38:14 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q0QAcDXc018904 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 26 Jan 2012 05:38:13 -0500 Message-ID: <4F212DE2.2080202@redhat.com> Date: Thu, 26 Jan 2012 11:41:38 +0100 From: Kevin Wolf MIME-Version: 1.0 References: <20120123171525.GM32632@akamai.com> <4F1EB7BF.8070104@redhat.com> <20120124171944.GD14494@akamai.com> <4F2105B1.7070706@redhat.com> In-Reply-To: <4F2105B1.7070706@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] scsi: Guard against buflen exceeding req->cmd.xfer in scsi_disk_emulate_command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel Am 26.01.2012 08:50, schrieb Paolo Bonzini: > On 01/24/2012 06:19 PM, Thomas Higdon wrote: >> I agree that it's better to get this into a more general place. However, >> I wasn't willing to pull the MIN statement up into scsi_send_command >> because I don't understand the interplay between 'len' in that function >> and r->iov.iov_len. I couldn't see that there was a general relationship >> between these two variables that applied to both read/write commands and >> other commands. > > That's good enough, and it should fix also the bugs with GET > CONFIGURATION that Artyom reported. Two birds with a stone! > > Reviewed-by: Paolo Bonzini > > Kevin, shall I take this patch in the virtio-scsi series? I'll have to > resubmit anyway due to the QOM changes. I have picked it up for the block branch. If it conflicts with your changes, you can just rebase on top of that. Kevin