From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47218) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLr0l-00039U-9r for qemu-devel@nongnu.org; Mon, 25 Aug 2014 05:56:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XLr0c-0005r2-99 for qemu-devel@nongnu.org; Mon, 25 Aug 2014 05:56:27 -0400 Received: from mx-v6.kamp.de ([2a02:248:0:51::16]:55847 helo=mx01.kamp.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLr0b-0005qo-Vd for qemu-devel@nongnu.org; Mon, 25 Aug 2014 05:56:18 -0400 Message-ID: <53FB083E.5010105@kamp.de> Date: Mon, 25 Aug 2014 11:56:14 +0200 From: Peter Lieven MIME-Version: 1.0 References: <00c425bd67fc66567dc683205f8f60f7.squirrel@ssl.dlhnet.de> <53F6F3DD.2090804@kamp.de> <20140822084246.GA32377@noname.redhat.com> <53FA1327.5020808@redhat.com> <53FA3D82.4090402@kamp.de> <53FAFA58.2090807@redhat.com> In-Reply-To: <53FAFA58.2090807@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Fwd: [PATCH v4 07/21] iscsi: Handle failure for potentially large allocations] List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , Kevin Wolf Cc: benoit.canet@irqsave.net, maxa@catit.be, qemu-devel@nongnu.org, stefanha@redhat.com On 25.08.2014 10:56, Paolo Bonzini wrote: > Il 24/08/2014 21:31, Peter Lieven ha scritto: >> Am 24.08.2014 um 18:30 schrieb Paolo Bonzini: >>> Il 22/08/2014 10:42, Kevin Wolf ha scritto: >>>>> Unfortunately, I missed that one. The zeroblock is typicalls 512 Byte or 4K depending >>>>> on the blocksize. >>>> I don't remember the details, but I think when I went through all >>>> drivers, I couldn't convince myself that a reasonable block size is >>>> enforced somewhere. So I just went ahead and converted the call to be on >>>> the safe side. It can never hurt anyway. >>> Yeah, a malicious iSCSI target could have unreasonable block sizes. >> Maybe we should just allow 512b or 4kb blocksize and refuse >> all other? > At least CDs and DVDs use 2kb blocksize. :) power of 2 && <= 4096 ? > > Paolo >