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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 30 Oct 2021 09:15:19 +0200
From:   Bean Huo <huobean@...il.com>
To:     Avri Altman <avri.altman@....com>,
        "James E . J . Bottomley" <jejb@...ux.vnet.ibm.com>,
        "Martin K . Petersen" <martin.petersen@...cle.com>
Cc:     linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
        Bart Van Assche <bvanassche@....org>,
        Adrian Hunter <adrian.hunter@...el.com>,
        Bean Huo <beanhuo@...ron.com>,
        Daejun Park <daejun7.park@...sung.com>,
        James Bottomley <James.Bottomley@...senPartnership.com>
Subject: Re: [PATCH v3] scsi: ufshpb: Opt out pre-reqs from HPB2.0 flows

On Sat, 2021-10-30 at 09:23 +0300, Avri Altman wrote:
> v1 -> v2:
> 
>  - forgot to remove ufshpb_set_write_buf_cmd
> 
> 
> 
> v2 -> v3:
> 
>  - restore bMAX_ DATA_SIZE_FOR_HPB_SINGLE_CMD
> 
>  - remove read_id - it is now always 0
> 
>  - Ignore ufshpb_prep returned error - does not return -EAGAIN no
> more
> 
> 
> 
> HPB allows its read commands to carry the physical addresses along
> with
> 
> the LBAs, thus allowing less internal L2P-table switches in the
> device.
> 
> HPB1.0 allowed a single LBA, while HPB2.0 increases this capacity up
> to
> 
> 255 blocks.
> 
> 
> 
> Carrying more than a single record, the read operation is no longer
> 
> of type "read" per-se, but some sort of a "hybrid" command - writing
> the
> 
> physical address to the device and reading the required payload.
> 
> 
> 
> The HPB JEDEC spec came-up with a dual-command for that operation:
> 
> HPB-WRITE-BUFFER (0x2) to write the physical addresses to device, and
> 
> HPB-READ to read the payload.
> 
> 
> 
> Alas, the current HPB driver design - a single-scsi-LLD-module, has
> no
> 
> other alternative but to spawn the READ10 command into 2 commands:
> 
> HPB-WRITE-BUFFER and HPB-READ.
> 
> This causes a grat deal of aggrevation to the block layer guys, up to
> a
> 
> point, in which that they were willing to revert the entire HPB
> driver,
> 
> regardless of the huge amount of corporate effort already inversted
> in
> 
> it.
> 
> 
> 
> Therefore, remove the pre-req API for now, as a matter of urgency to
> get
> 
> it done before the closing of the merge window.
> 
> 
> 
> Signed-off-by: James Bottomley <James.Bottomley@...senPartnership.com
> >
> 
> Signed-off-by: Avri Altman <avri.altman@....com>
> 
> Tested-by: Avri Altman <avri.altman@....com>
> 
> Reviewed-by: Bart Van Assche <bvanassche@....org>
> 
> ---
> 
>  drivers/scsi/ufs/ufshcd.c |   7 +-
> 
>  drivers/scsi/ufs/ufshpb.c | 283 +-----------------------------------
> --
> 
>  drivers/scsi/ufs/ufshpb.h |   2 -
> 
>  3 files changed, 4 insertions(+), 288 deletions(-)
> 
> 
> 
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> 
> index f5ba8f953b87..470affdec426 100644
> 
> --- a/drivers/scsi/ufs/ufshcd.c
> 
> +++ b/drivers/scsi/ufs/ufshcd.c
> 
> @@ -2767,12 +2767,7 @@ static int ufshcd_queuecommand(struct
> Scsi_Host *host, struct scsi_cmnd *cmd)
> 
>  
> 
>         lrbp->req_abort_skip = false;
> 
>  
> 
> -       err = ufshpb_prep(hba, lrbp);
> 
> -       if (err == -EAGAIN) {
> 
> -               lrbp->cmd = NULL;
> 
> -               ufshcd_release(hba);
> 
> -               goto out;
> 
> -       }
> 
> +       ufshpb_prep(hba, lrbp);


it is better to add one line comment to highlight that HPB preperation
failure will not impact original read request.

Reviewed-by: Bean Huo <beanhuo@...ron.com>
Tested-by: Bean Huo <beanhuo@...ron.com>


Bean


 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ