From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjQDW-0008Fy-5D for qemu-devel@nongnu.org; Wed, 29 Oct 2014 06:11:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XjQDJ-0008Ds-9E for qemu-devel@nongnu.org; Wed, 29 Oct 2014 06:11:02 -0400 Received: from mail-wi0-x234.google.com ([2a00:1450:400c:c05::234]:45236) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjQDJ-0008DY-1s for qemu-devel@nongnu.org; Wed, 29 Oct 2014 06:10:49 -0400 Received: by mail-wi0-f180.google.com with SMTP id hi2so4083675wib.13 for ; Wed, 29 Oct 2014 03:10:48 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5450BD24.3050608@redhat.com> Date: Wed, 29 Oct 2014 11:10:44 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1414569232-21357-1-git-send-email-hare@suse.de> <1414569232-21357-5-git-send-email-hare@suse.de> <5450B07A.8060103@redhat.com> <5450B8F4.4050101@suse.de> In-Reply-To: <5450B8F4.4050101@suse.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 04/17] scsi: fixup lba calculation for 6 byte CDBs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hannes Reinecke , qemu-devel@nongnu.org Cc: Andreas Faerber , Alexander Graf On 10/29/2014 10:52 AM, Hannes Reinecke wrote: >> > Because without this patch we end up with having a (basically random) > value in cmd.lba, and we're ending up here: > > if (cmd.lba != -1) { > trace_scsi_req_parsed_lba(d->id, d->lun, tag, buf[0], cmd.lba); } Yeah, this is ugly but not fatal. > and causing a buffer overflow when printing out the cdb. Where exactly? This is the part I don't understand. Paolo