lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 13 Nov 2018 15:35:20 +0100
From:   Benjamin Block <bblock@...ux.ibm.com>
To:     Christoph Hellwig <hch@....de>
Cc:     axboe@...nel.dk, martin.petersen@...cle.com, ooo@...ctrozaur.com,
        Johannes Thumshirn <jthumshirn@...e.de>,
        Benjamin Block <bblock@...ux.vnet.ibm.com>,
        linux-scsi@...r.kernel.org, linux-block@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 6/8] bsg-lib: handle bidi requests without block layer
 help

On Sun, Nov 11, 2018 at 02:32:09PM +0100, Christoph Hellwig wrote:
> We can just stash away the second request in struct bsg_job instead
> of using the block layer req->next_rq field, allowing for the eventual
> removal of the latter.
> 
> Signed-off-by: Christoph Hellwig <hch@....de>
> ---
>  block/bsg-lib.c                   | 44 +++++++++++++++++++---
>  block/bsg.c                       | 62 ++++++-------------------------
>  drivers/scsi/scsi_transport_sas.c |  1 -
>  include/linux/bsg-lib.h           |  4 ++
>  4 files changed, 54 insertions(+), 57 deletions(-)
> 
> diff --git a/block/bsg-lib.c b/block/bsg-lib.c
> index 192129856342..005e2b75d775 100644
> --- a/block/bsg-lib.c
> +++ b/block/bsg-lib.c
> @@ -74,6 +74,9 @@ static int bsg_scsi_fill_hdr(struct request *rq, struct sg_io_v4 *hdr,
>  {
>  	struct scsi_request *sreq = scsi_req(rq);
> 
> +	if (hdr->dout_xfer_len && hdr->din_xfer_len)
> +		return -EOPNOTSUPP;
> +

This seems like a non-obvious user-breakage. So apart from removing the
in-kernel stuff that uses bidirectional commands you also forbid
userspace from every using them? That seems wrong to me.

There is other SCSI Command Sets than OSD that provide bidirectional
commands, even SBC has some (i.e.  X*WRITE*, COMPARE AND WRITE).



-- 
With Best Regards, Benjamin Block      /      Linux on IBM Z Kernel Development
IBM Systems & Technology Group   /  IBM Deutschland Research & Development GmbH
Vorsitz. AufsR.: Martina Koederitz       /      Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen / Registergericht: AmtsG Stuttgart, HRB 243294

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ