From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [PATCH v2 0/9] block: Consolidate scsi sense buffer usage To: Kees Cook Cc: Christoph Hellwig , "Martin K. Petersen" , "James E.J. Bottomley" , Tejun Heo , Borislav Petkov , "David S. Miller" , "Manoj N. Kumar" , "Matthew R. Ochs" , Uma Krishnan , "Nicholas A. Bellinger" , Thomas Gleixner , Philippe Ombredanne , Stephen Boyd , Cyrille Pitchen , Juergen Gross , Viresh Kumar , =?UTF-8?Q?Uwe_Kleine-K=c3=b6nig?= , Sagar Dharia , Randy Dunlap , Vinod Koul , David Kershner , linux-block@vger.kernel.org, linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180731195155.46664-1-keescook@chromium.org> From: Jens Axboe Message-ID: <50e0f257-60d9-73c8-b4ac-a93c7bdccb57@kernel.dk> Date: Thu, 2 Aug 2018 15:24:47 -0600 MIME-Version: 1.0 In-Reply-To: <20180731195155.46664-1-keescook@chromium.org> Content-Type: text/plain; charset=utf-8 List-ID: On 7/31/18 1:51 PM, Kees Cook wrote: > This is a follow-up to commit f7068114d45e ("sr: pass down correctly > sized SCSI sense buffer") which further cleans up and removes needless > sense character array buffers and "struct request_sense" usage in favor > of the common "struct scsi_sense_hdr". > > First, drop a bunch of unused sense buffers: > [PATCH 1/9] ide-cd: Drop unused sense buffers > [PATCH 2/9] scsi: cxlflash: Drop unused sense buffers > > Next, allow the sense buffer to be usable outside SCSI tree: > [PATCH 3/9] scsi: build scsi_common.o for all scsi passthrough request users > [PATCH 4/9] target: don't depend on SCSI > > Then move all request_sense usage to scsi_sense_hdr: > [PATCH 5/9] block: Switch struct packet_command to use struct scsi_sense_hdr > > And do some further cleanups for scsi_sense_hdr now that we can: > [PATCH 6/9] ide-cd: Remove redundant sense buffer > [PATCH 7/9] cdrom: Use struct scsi_sense_hdr internally > > Finally add a build-time check to make sure we don't pass bad buffer sizes: > [PATCH 8/9] libata-scsi: Move sense buffers onto stack > [PATCH 9/9] scsi: Check sense buffer size at build time Thanks Kees, applied for 4.19. Note that I hand applied patch #5 and #9, since they did not apply directly to the block tree. -- Jens Axboe From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jens Axboe Subject: Re: [PATCH v2 0/9] block: Consolidate scsi sense buffer usage Date: Thu, 2 Aug 2018 15:24:47 -0600 Message-ID: <50e0f257-60d9-73c8-b4ac-a93c7bdccb57@kernel.dk> References: <20180731195155.46664-1-keescook@chromium.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20180731195155.46664-1-keescook@chromium.org> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: Kees Cook Cc: Christoph Hellwig , "Martin K. Petersen" , "James E.J. Bottomley" , Tejun Heo , Borislav Petkov , "David S. Miller" , "Manoj N. Kumar" , "Matthew R. Ochs" , Uma Krishnan , "Nicholas A. Bellinger" , Thomas Gleixner , Philippe Ombredanne , Stephen Boyd , Cyrille Pitchen , Juergen Gross , Viresh Kumar , =?UTF-8?Q?Uwe_Kleine-K=c3=b6nig?= , Sagar Dharia List-Id: linux-ide@vger.kernel.org On 7/31/18 1:51 PM, Kees Cook wrote: > This is a follow-up to commit f7068114d45e ("sr: pass down correctly > sized SCSI sense buffer") which further cleans up and removes needless > sense character array buffers and "struct request_sense" usage in favor > of the common "struct scsi_sense_hdr". > > First, drop a bunch of unused sense buffers: > [PATCH 1/9] ide-cd: Drop unused sense buffers > [PATCH 2/9] scsi: cxlflash: Drop unused sense buffers > > Next, allow the sense buffer to be usable outside SCSI tree: > [PATCH 3/9] scsi: build scsi_common.o for all scsi passthrough request users > [PATCH 4/9] target: don't depend on SCSI > > Then move all request_sense usage to scsi_sense_hdr: > [PATCH 5/9] block: Switch struct packet_command to use struct scsi_sense_hdr > > And do some further cleanups for scsi_sense_hdr now that we can: > [PATCH 6/9] ide-cd: Remove redundant sense buffer > [PATCH 7/9] cdrom: Use struct scsi_sense_hdr internally > > Finally add a build-time check to make sure we don't pass bad buffer sizes: > [PATCH 8/9] libata-scsi: Move sense buffers onto stack > [PATCH 9/9] scsi: Check sense buffer size at build time Thanks Kees, applied for 4.19. Note that I hand applied patch #5 and #9, since they did not apply directly to the block tree. -- Jens Axboe From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jens Axboe Date: Thu, 02 Aug 2018 21:24:47 +0000 Subject: Re: [PATCH v2 0/9] block: Consolidate scsi sense buffer usage Message-Id: <50e0f257-60d9-73c8-b4ac-a93c7bdccb57@kernel.dk> List-Id: References: <20180731195155.46664-1-keescook@chromium.org> In-Reply-To: <20180731195155.46664-1-keescook@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Kees Cook Cc: Christoph Hellwig , "Martin K. Petersen" , "James E.J. Bottomley" , Tejun Heo , Borislav Petkov , "David S. Miller" , "Manoj N. Kumar" , "Matthew R. Ochs" , Uma Krishnan , "Nicholas A. Bellinger" , Thomas Gleixner , Philippe Ombredanne , Stephen Boyd , Cyrille Pitchen , Juergen Gross , Viresh Kumar , =?UTF-8?Q?Uwe_Kleine-K=c3=b6nig?= , Sagar Dharia , Randy Dunlap , Vinod Koul , David Kershner , linux-block@vger.kernel.org, linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-kernel@vger.kernel.org On 7/31/18 1:51 PM, Kees Cook wrote: > This is a follow-up to commit f7068114d45e ("sr: pass down correctly > sized SCSI sense buffer") which further cleans up and removes needless > sense character array buffers and "struct request_sense" usage in favor > of the common "struct scsi_sense_hdr". > > First, drop a bunch of unused sense buffers: > [PATCH 1/9] ide-cd: Drop unused sense buffers > [PATCH 2/9] scsi: cxlflash: Drop unused sense buffers > > Next, allow the sense buffer to be usable outside SCSI tree: > [PATCH 3/9] scsi: build scsi_common.o for all scsi passthrough request users > [PATCH 4/9] target: don't depend on SCSI > > Then move all request_sense usage to scsi_sense_hdr: > [PATCH 5/9] block: Switch struct packet_command to use struct scsi_sense_hdr > > And do some further cleanups for scsi_sense_hdr now that we can: > [PATCH 6/9] ide-cd: Remove redundant sense buffer > [PATCH 7/9] cdrom: Use struct scsi_sense_hdr internally > > Finally add a build-time check to make sure we don't pass bad buffer sizes: > [PATCH 8/9] libata-scsi: Move sense buffers onto stack > [PATCH 9/9] scsi: Check sense buffer size at build time Thanks Kees, applied for 4.19. Note that I hand applied patch #5 and #9, since they did not apply directly to the block tree. -- Jens Axboe