Re: [PATCH v2 3/9] scsi: build scsi_common.o for all scsi passthrough request users

From: Kees Cook
Date: Wed Aug 01 2018 - 15:50:31 EST


On Tue, Jul 31, 2018 at 1:18 PM, Bart Van Assche <Bart.VanAssche@xxxxxxx> wrote:
> On Tue, 2018-07-31 at 13:12 -0700, hch@xxxxxxxxxxxxx wrote:
>> It shouldn't. All these are built into scsi_mod.o, which is only built
>> when CONFIG_SCSI is set. Under what circumstances do you see them built?
>
> Although I think you are right, I still prefer that the scsi_common.c file
> would be moved to a new directory. That will prevent confusion later on for
> people who want to add additional code. This patch makes it nontrivial to
> figure out which code is built when SCSI target functionality is enabled but
> SCSI initiator functionality is not selected. I think moving scsi_common.c
> into a new directory would make it much easier to figure out which code is
> built depending on the kernel configuration.

While I don't disagree with you, this series is the result of several
back-and-forth discussions where that option was seemingly rejected.
Christoph's approach seemed to satisfy Jens. If you can convince them,
sure! I'll do whatever the consensus is. :)

-Kees

--
Kees Cook
Pixel Security