public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/6] bsg: fix regression resulting in panics when sending commands via BSG and some sanity cleanups
@ 2017-08-09 14:11 Benjamin Block
       [not found] ` <cover.1502120928.git.bblock-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
  2017-08-09 14:11 ` [RFC PATCH 3/6] bsg: scsi-transport: add compile-tests to prevent reply-buffer overflows Benjamin Block
  0 siblings, 2 replies; 31+ messages in thread
From: Benjamin Block @ 2017-08-09 14:11 UTC (permalink / raw)
  To: James E . J . Bottomley, Martin K . Petersen, Jens Axboe
  Cc: Benjamin Block, linux-block, linux-kernel, linux-scsi,
	Johannes Thumshirn, Christoph Hellwig, Steffen Maier, open-iscsi

Hello all,

Steffen noticed recently that we have a regression in the BSG code that
prevents us from sending any traffic over this interface. After I
researched this a bit, it turned out that this affects not only zFCP, but
likely all LLDs that implements the BSG API. This was introduced in 4.11
(details in Patch 1 of this series).

I imagine the regression happened because of some very "unfortunate"
variable- namings. I can not fix them, as they involve the base struct
request, but I tried to add some cleanups that should make the
relationships between stuff more visible in the future I hope.

Patch 1   - Regression Fix; Also tagged for stable
Patch 2-6 - Cleanups

I tagged this as RFC. Patches 2-6 are a 'nice to have' IMO, Patch 1 is
obviously necessary, and if it is OK, I can re-send it separately if
necessary. If you don't like the changes in the other patches, I don't mind
dropping them.

I am not sure about Patch 4. It certainly works, but it changes
user-visible behavior, in what I believe is within the behavior described
by the SG interface. It makes the different methods of how BSG passes
commands down to the LLDs more conform with each other - even though I
can't make them the exact same. More details in the patch description.

I rebased the series on Jens' for-next and I have function-tested the
series on s390x's zFCP with the tools provided in the zfcp HBA API library
(https://www.ibm.com/developerworks/linux/linux390/zfcp-hbaapi.html) and
some custom code to test the read/write interface of BSG.

Reviews are more than welcome :)


                                                Beste Grüße / Best regards,
                                                  - Benjamin Block

Benjamin Block (6):
  bsg: fix kernel panic resulting from missing allocation of a
    reply-buffer
  bsg: assign sense_len instead of fixed SCSI_SENSE_BUFFERSIZE
  bsg: scsi-transport: add compile-tests to prevent reply-buffer
    overflows
  bsg: refactor ioctl to use regular BSG-command infrastructure for
    SG_IO
  bsg: reduce unecessary arguments for bsg_map_hdr()
  bsg: reduce unecessary arguments for blk_complete_sgv4_hdr_rq()

 block/bsg-lib.c                     |  4 +-
 block/bsg.c                         | 90 ++++++++++++++++++++++---------------
 drivers/scsi/scsi_transport_fc.c    |  3 ++
 drivers/scsi/scsi_transport_iscsi.c |  3 ++
 include/linux/bsg-lib.h             |  2 +
 5 files changed, 65 insertions(+), 37 deletions(-)

--
2.12.2

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2017-08-16 10:53 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-09 14:11 [RFC PATCH 0/6] bsg: fix regression resulting in panics when sending commands via BSG and some sanity cleanups Benjamin Block
     [not found] ` <cover.1502120928.git.bblock-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2017-08-09 14:11   ` [RFC PATCH 1/6] bsg: fix kernel panic resulting from missing allocation of a reply-buffer Benjamin Block
     [not found]     ` <9e67ce3fc2f3cd42e9e05b2753b00d6676f46ee1.1502120928.git.bblock-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2017-08-10  9:32       ` Christoph Hellwig
2017-08-10 22:10         ` Benjamin Block
2017-08-10 22:45           ` Benjamin Block
2017-08-11  8:38           ` Christoph Hellwig
2017-08-11  9:14             ` Christoph Hellwig
2017-08-11 13:49               ` Benjamin Block
2017-08-11 14:36                 ` Christoph Hellwig
2017-08-11 15:32                   ` Benjamin Block
2017-08-11 15:35                     ` Christoph Hellwig
2017-08-11 16:01                       ` Benjamin Block
2017-08-13 14:39                         ` Christoph Hellwig
2017-08-14 16:33                           ` Benjamin Block
2017-08-14 16:32                         ` Benjamin Block
2017-08-16 10:53                           ` Christoph Hellwig
2017-08-09 14:11   ` [RFC PATCH 2/6] bsg: assign sense_len instead of fixed SCSI_SENSE_BUFFERSIZE Benjamin Block
     [not found]     ` <2dd8381929af2037a6eec3086256f54f55c01e78.1502120928.git.bblock-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2017-08-10  9:32       ` Christoph Hellwig
2017-08-09 14:11   ` [RFC PATCH 4/6] bsg: refactor ioctl to use regular BSG-command infrastructure for SG_IO Benjamin Block
2017-08-10  8:24     ` Johannes Thumshirn
2017-08-10  9:34       ` Christoph Hellwig
2017-08-10 22:12       ` Benjamin Block
2017-08-09 14:11   ` [RFC PATCH 5/6] bsg: reduce unnecessary arguments for bsg_map_hdr() Benjamin Block
     [not found]     ` <6d4d39222a4b76f9b39ec52e0aca5b01a3fac9e1.1502120928.git.bblock-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2017-08-10  8:26       ` Johannes Thumshirn
2017-08-10  9:35     ` Christoph Hellwig
     [not found]       ` <20170810093531.GP24539-jcswGhMUV9g@public.gmane.org>
2017-08-10 22:19         ` Benjamin Block
2017-08-09 14:11   ` [RFC PATCH 6/6] bsg: reduce unnecessary arguments for blk_complete_sgv4_hdr_rq() Benjamin Block
2017-08-10  8:27     ` Johannes Thumshirn
     [not found]     ` <d95177abfa703a4f77a3d8ddb218eaead465f5ec.1502120928.git.bblock-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2017-08-10  9:35       ` Christoph Hellwig
2017-08-09 14:11 ` [RFC PATCH 3/6] bsg: scsi-transport: add compile-tests to prevent reply-buffer overflows Benjamin Block
     [not found]   ` <0f448e7771f438025de755530778691ff535e36c.1502120928.git.bblock-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2017-08-10  9:32     ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox