Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-25 Thread Christoph Hellwig
On Thu, May 24, 2018 at 10:06:59AM -0700, Kees Cook wrote: > On Thu, May 24, 2018 at 1:00 AM, Christoph Hellwig wrote: > > On Wed, May 23, 2018 at 03:14:19PM -0600, Jens Axboe wrote: > >> Ugh, so that would necessitate a change there too. As I said before, > >> I don't really

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-24 Thread Kees Cook
On Thu, May 24, 2018 at 1:00 AM, Christoph Hellwig wrote: > On Wed, May 23, 2018 at 03:14:19PM -0600, Jens Axboe wrote: >> Ugh, so that would necessitate a change there too. As I said before, >> I don't really care where it lives. I know the SCSI folks seem bothered >> by

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-24 Thread Christoph Hellwig
On Wed, May 23, 2018 at 03:14:19PM -0600, Jens Axboe wrote: > Ugh, so that would necessitate a change there too. As I said before, > I don't really care where it lives. I know the SCSI folks seem bothered > by moving it, but in reality, it's not like this stuff will likely ever > really change. Of

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-24 Thread Christoph Hellwig
On Wed, May 23, 2018 at 02:17:14PM -0700, Kees Cook wrote: > > True, though I'm finding other robustness issues in the CDROM code. > They're probably all insane corner cases, but it seems like it'd be > nice to just fix them: > > diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c > index

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-23 Thread Randy Dunlap
On 05/23/2018 02:22 PM, Jens Axboe wrote: > On 5/23/18 3:20 PM, Randy Dunlap wrote: >> On 05/23/2018 02:14 PM, Jens Axboe wrote: >>> On 5/23/18 2:52 PM, Kees Cook wrote: On Wed, May 23, 2018 at 7:31 AM, Jens Axboe wrote: > On 5/23/18 8:25 AM, Christoph Hellwig wrote:

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-23 Thread Jens Axboe
On 5/23/18 3:20 PM, Randy Dunlap wrote: > On 05/23/2018 02:14 PM, Jens Axboe wrote: >> On 5/23/18 2:52 PM, Kees Cook wrote: >>> On Wed, May 23, 2018 at 7:31 AM, Jens Axboe wrote: On 5/23/18 8:25 AM, Christoph Hellwig wrote: > On Wed, May 23, 2018 at 08:13:56AM -0600,

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-23 Thread Randy Dunlap
On 05/23/2018 02:14 PM, Jens Axboe wrote: > On 5/23/18 2:52 PM, Kees Cook wrote: >> On Wed, May 23, 2018 at 7:31 AM, Jens Axboe wrote: >>> On 5/23/18 8:25 AM, Christoph Hellwig wrote: On Wed, May 23, 2018 at 08:13:56AM -0600, Jens Axboe wrote: >> Should I move to code to

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-23 Thread Kees Cook
On Wed, May 23, 2018 at 2:06 PM, Martin K. Petersen wrote: > > Kees, > >> obj-$(CONFIG_SCSI) += scsi/ >> >> So: this needs to live in block/ just like CONFIG_BLK_SCSI_REQUEST's >> scsi_ioctl.c. I will split it into CONFIG_BLK_SCSI_SENSE, but I'll >> still

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-23 Thread Jens Axboe
On 5/23/18 2:52 PM, Kees Cook wrote: > On Wed, May 23, 2018 at 7:31 AM, Jens Axboe wrote: >> On 5/23/18 8:25 AM, Christoph Hellwig wrote: >>> On Wed, May 23, 2018 at 08:13:56AM -0600, Jens Axboe wrote: > Should I move to code to a new drivers/scsi/scsi_sense.c and add it to

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-23 Thread Martin K. Petersen
Kees, > obj-$(CONFIG_SCSI) += scsi/ > > So: this needs to live in block/ just like CONFIG_BLK_SCSI_REQUEST's > scsi_ioctl.c. I will split it into CONFIG_BLK_SCSI_SENSE, but I'll > still need to move the code from drivers/scsi/ to block/. Is this > okay? The reason this sucks is

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-23 Thread Kees Cook
On Wed, May 23, 2018 at 7:31 AM, Jens Axboe wrote: > On 5/23/18 8:25 AM, Christoph Hellwig wrote: >> On Wed, May 23, 2018 at 08:13:56AM -0600, Jens Axboe wrote: Should I move to code to a new drivers/scsi/scsi_sense.c and add it to drivers/scsi/Makefile as:

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-23 Thread Jens Axboe
On 5/23/18 8:25 AM, Christoph Hellwig wrote: > On Wed, May 23, 2018 at 08:13:56AM -0600, Jens Axboe wrote: >>> Should I move to code to a new drivers/scsi/scsi_sense.c and add it to >>> drivers/scsi/Makefile as: >>> >>> obj-$(CONFIG_BLK_SCSI_REQUEST)+= scsi_sense.o >>> >>> Every place I want

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-23 Thread Christoph Hellwig
On Wed, May 23, 2018 at 08:13:56AM -0600, Jens Axboe wrote: > > Should I move to code to a new drivers/scsi/scsi_sense.c and add it to > > drivers/scsi/Makefile as: > > > > obj-$(CONFIG_BLK_SCSI_REQUEST)+= scsi_sense.o > > > > Every place I want to use the code is already covered by > >

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-23 Thread Jens Axboe
On 5/22/18 5:49 PM, Kees Cook wrote: > On Tue, May 22, 2018 at 4:42 PM, Jens Axboe wrote: >> On May 22, 2018, at 5:31 PM, Kees Cook wrote: >>> On Tue, May 22, 2018 at 12:16 PM, Jens Axboe wrote: > On 5/22/18 1:13 PM, Christoph

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Kees Cook
On Tue, May 22, 2018 at 4:42 PM, Jens Axboe wrote: > On May 22, 2018, at 5:31 PM, Kees Cook wrote: >> >>> On Tue, May 22, 2018 at 12:16 PM, Jens Axboe wrote: On 5/22/18 1:13 PM, Christoph Hellwig wrote: > On Tue, May 22, 2018 at

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Jens Axboe
On May 22, 2018, at 5:31 PM, Kees Cook wrote: > >> On Tue, May 22, 2018 at 12:16 PM, Jens Axboe wrote: >>> On 5/22/18 1:13 PM, Christoph Hellwig wrote: On Tue, May 22, 2018 at 01:09:41PM -0600, Jens Axboe wrote: I think Martin and Christoph are

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Randy Dunlap
On 05/22/2018 04:39 PM, Kees Cook wrote: > On Tue, May 22, 2018 at 4:34 PM, Randy Dunlap wrote: >> On 05/22/2018 04:31 PM, Kees Cook wrote: >>> On Tue, May 22, 2018 at 12:16 PM, Jens Axboe wrote: On 5/22/18 1:13 PM, Christoph Hellwig wrote: > On

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Randy Dunlap
On 05/22/2018 04:31 PM, Kees Cook wrote: > On Tue, May 22, 2018 at 12:16 PM, Jens Axboe wrote: >> On 5/22/18 1:13 PM, Christoph Hellwig wrote: >>> On Tue, May 22, 2018 at 01:09:41PM -0600, Jens Axboe wrote: I think Martin and Christoph are objecting to moving the code to

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Kees Cook
On Tue, May 22, 2018 at 12:16 PM, Jens Axboe wrote: > On 5/22/18 1:13 PM, Christoph Hellwig wrote: >> On Tue, May 22, 2018 at 01:09:41PM -0600, Jens Axboe wrote: >>> I think Martin and Christoph are objecting to moving the code to >>> block/scsi_ioctl.h. I don't care too much

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Jens Axboe
On 5/22/18 1:13 PM, Christoph Hellwig wrote: > On Tue, May 22, 2018 at 01:09:41PM -0600, Jens Axboe wrote: >> I think Martin and Christoph are objecting to moving the code to >> block/scsi_ioctl.h. I don't care too much about where the code is, but >> think it would be nice to have the definitions

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Christoph Hellwig
On Tue, May 22, 2018 at 01:09:41PM -0600, Jens Axboe wrote: > I think Martin and Christoph are objecting to moving the code to > block/scsi_ioctl.h. I don't care too much about where the code is, but > think it would be nice to have the definitions in a separate header. But > if they prefer just

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Jens Axboe
On 5/22/18 12:59 PM, Kees Cook wrote: > On Tue, May 22, 2018 at 11:50 AM, Martin K. Petersen > wrote: >> >> Christoph, >> >>> On Tue, May 22, 2018 at 11:15:09AM -0700, Kees Cook wrote: Both SCSI and ATAPI share the sense header. In preparation for using the

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Kees Cook
On Tue, May 22, 2018 at 11:50 AM, Martin K. Petersen wrote: > > Christoph, > >> On Tue, May 22, 2018 at 11:15:09AM -0700, Kees Cook wrote: >>> Both SCSI and ATAPI share the sense header. In preparation for using the >>> struct scsi_sense_hdr more widely, move this into

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Martin K. Petersen
Christoph, > On Tue, May 22, 2018 at 11:15:09AM -0700, Kees Cook wrote: >> Both SCSI and ATAPI share the sense header. In preparation for using the >> struct scsi_sense_hdr more widely, move this into a separate header and >> move the helper function to scsi_ioctl.c which is linked with

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Christoph Hellwig
On Tue, May 22, 2018 at 11:15:09AM -0700, Kees Cook wrote: > Both SCSI and ATAPI share the sense header. In preparation for using the > struct scsi_sense_hdr more widely, move this into a separate header and > move the helper function to scsi_ioctl.c which is linked with CONFIG_IDE > by way of

[PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Kees Cook
Both SCSI and ATAPI share the sense header. In preparation for using the struct scsi_sense_hdr more widely, move this into a separate header and move the helper function to scsi_ioctl.c which is linked with CONFIG_IDE by way of CONFIG_BLK_SCSI_REQUEST. Signed-off-by: Kees Cook