From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:57037) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqK69-0007J9-8n for qemu-devel@nongnu.org; Thu, 26 Jan 2012 02:50:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RqK63-0004WD-GO for qemu-devel@nongnu.org; Thu, 26 Jan 2012 02:50:21 -0500 Received: from mail-ey0-f173.google.com ([209.85.215.173]:43480) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqK63-0004W5-9g for qemu-devel@nongnu.org; Thu, 26 Jan 2012 02:50:15 -0500 Received: by eaad13 with SMTP id d13so106538eaa.4 for ; Wed, 25 Jan 2012 23:50:14 -0800 (PST) Sender: Paolo Bonzini Message-ID: <4F2105B1.7070706@redhat.com> Date: Thu, 26 Jan 2012 08:50:09 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <20120123171525.GM32632@akamai.com> <4F1EB7BF.8070104@redhat.com> <20120124171944.GD14494@akamai.com> In-Reply-To: <20120124171944.GD14494@akamai.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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: qemu-devel , Kevin Wolf 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. Paolo