From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de ([195.135.220.15]:40679 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753097AbdAKI0w (ORCPT ); Wed, 11 Jan 2017 03:26:52 -0500 Date: Wed, 11 Jan 2017 09:26:46 +0100 From: Johannes Thumshirn To: Christoph Hellwig Cc: Jens Axboe , Mike Snitzer , linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, dm-devel@redhat.com Subject: Re: [PATCH 01/15] virtio_blk: avoid DMA to stack for the sense buffer Message-ID: <20170111082646.GA6286@linux-x5ow.site> References: <1484060780-15592-1-git-send-email-hch@lst.de> <1484060780-15592-2-git-send-email-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 In-Reply-To: <1484060780-15592-2-git-send-email-hch@lst.de> Sender: linux-block-owner@vger.kernel.org List-Id: linux-block@vger.kernel.org On Tue, Jan 10, 2017 at 04:06:06PM +0100, Christoph Hellwig wrote: > Most users of BLOCK_PC requests allocate the sense buffer on the stack, > so to avoid DMA to the stack copy them to a field in the heap allocated > virtblk_req structure. Without that any attempt at SCSI passthrough I/O, > including the SG_IO ioctl from userspace will crash the kernel. Note that > this includes running tools like hdparm even when the host does not have > SCSI passthrough enabled. > > Signed-off-by: Christoph Hellwig > --- Isn't that one already queued in Jens' tree? Byte, Johannes -- Johannes Thumshirn Storage jthumshirn@suse.de +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N�rnberg GF: Felix Imend�rffer, Jane Smithard, Graham Norton HRB 21284 (AG N�rnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850