[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aa150272-ffeb-fb8f-7303-0d9502cf9a71@kernel.dk>
Date: Wed, 23 May 2018 08:13:56 -0600
From: Jens Axboe <axboe@...nel.dk>
To: Kees Cook <keescook@...omium.org>
Cc: Christoph Hellwig <hch@...radead.org>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
James Bottomley <James.Bottomley@...senpartnership.com>,
Tejun Heo <tj@...nel.org>, Borislav Petkov <bp@...en8.de>,
"David S. Miller" <davem@...emloft.net>,
"Manoj N. Kumar" <manoj@...ux.vnet.ibm.com>,
"Matthew R. Ochs" <mrochs@...ux.vnet.ibm.com>,
Uma Krishnan <ukrishn@...ux.vnet.ibm.com>,
linux-block <linux-block@...r.kernel.org>,
linux-ide@...r.kernel.org, linux-scsi@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI
On 5/22/18 5:49 PM, Kees Cook wrote:
> On Tue, May 22, 2018 at 4:42 PM, Jens Axboe <axboe@...nel.dk> wrote:
>> On May 22, 2018, at 5:31 PM, Kees Cook <keescook@...omium.org> wrote:
>>>
>>>> On Tue, May 22, 2018 at 12:16 PM, Jens Axboe <axboe@...nel.dk> 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 about where the code is, but
>>>>>> think it would be nice to have the definitions in a separate header. But
>>>>>> if they prefer just pulling in all of SCSI for it, well then I guess
>>>>>> it's pointless to move the header bits. Seems very heavy handed to me,
>>>>>> though.
>>>>>
>>>>> It might be heavy handed for the 3 remaining users of drivers/ide,
>>>>
>>>> Brutal :-)
>>>
>>> Heh. I noticed a similar sense buffer use in drivers/cdrom/cdrom.c
>>> too. Is this okay under the same considerations?
>>
>> This is going from somewhat crazy to pretty nuts, imho. I guess in practical terms it doesn’t matter that much, since most folks would be using sr. I still think a split would be vastly superior. Just keep the scsi code in drivers/scsi/ and make it independently selectable.
>
> I had originally tied it to BLK_SCSI_REQUEST. Logically speaking,
> sense buffers are part of the request, and the CONFIG work is already
> done. This is roughly what I tried to do before, since scsi_ioctl.c is
> the only code pulled in for CONFIG_BLK_SCSI_REQUEST:
>
> $ git grep BLK_SCSI_REQUEST | grep Makefile
> block/Makefile:obj-$(CONFIG_BLK_SCSI_REQUEST) += scsi_ioctl.o
>
> 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
> CONFIG_BLK_SCSI_REQUEST, so it seems like I just need to know where to
> put the .c file. :P
I think this is so much saner than a SCSI select or dependency, so I'll
have to disagree with Martin and Christoph. Just put it in drivers/scsi,
if it's the location they care about.
--
Jens Axboe
Powered by blists - more mailing lists