From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.hgst.iphmx.com ([216.71.153.141]:27203 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752503AbdEJPQ6 (ORCPT ); Wed, 10 May 2017 11:16:58 -0400 From: Bart Van Assche To: "nab@linux-iscsi.org" CC: "hch@lst.de" , "ddiss@suse.de" , "hare@suse.com" , "target-devel@vger.kernel.org" , "agrover@redhat.com" , "stable@vger.kernel.org" Subject: Re: [PATCH 06/19] target: Fix data buffer size for VERIFY and WRITE AND VERIFY commands Date: Wed, 10 May 2017 15:16:50 +0000 Message-ID: <1494429409.2578.4.camel@sandisk.com> References: <20170504225102.8931-1-bart.vanassche@sandisk.com> <20170504225102.8931-7-bart.vanassche@sandisk.com> <1494197384.30469.34.camel@haakon3.risingtidesystems.com> <1494266862.2591.14.camel@sandisk.com> <1494390488.16894.86.camel@haakon3.risingtidesystems.com> In-Reply-To: <1494390488.16894.86.camel@haakon3.risingtidesystems.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: On Tue, 2017-05-09 at 21:28 -0700, Nicholas A. Bellinger wrote: > Attempting to make 'size' in sbc_parse_cdb() enforce what the spec says, > instead of what it actually is in the received CDB is completely wrong. Please look again at e.g. the sg_verify source code. If it sets BYTCHK to zero it doesn't submit a Data-Out buffer. The only initiator that submits a Data-Out buffer and sets BYTCHK to zero is libiscsi when testing overflow behavior. Bart.=