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]
Message-ID: <20210222081658epcms2p4dcc6bfa0da7b6222cc4262a36374d3ad@epcms2p4>
Date:   Mon, 22 Feb 2021 17:16:58 +0900
From:   Daejun Park <daejun7.park@...sung.com>
To:     Avri Altman <Avri.Altman@....com>,
        Daejun Park <daejun7.park@...sung.com>,
        Greg KH <gregkh@...uxfoundation.org>,
        "jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
        "martin.petersen@...cle.com" <martin.petersen@...cle.com>,
        "asutoshd@...eaurora.org" <asutoshd@...eaurora.org>,
        "stanley.chu@...iatek.com" <stanley.chu@...iatek.com>,
        "cang@...eaurora.org" <cang@...eaurora.org>,
        "bvanassche@....org" <bvanassche@....org>,
        "huobean@...il.com" <huobean@...il.com>,
        ALIM AKHTAR <alim.akhtar@...sung.com>
CC:     "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        JinHwan Park <jh.i.park@...sung.com>,
        Javier Gonzalez <javier.gonz@...sung.com>,
        SEUNGUK SHIN <seunguk.shin@...sung.com>,
        Sung-Jun Park <sungjun07.park@...sung.com>,
        yongmyung lee <ymhungry.lee@...sung.com>,
        Jinyoung CHOI <j-young.choi@...sung.com>,
        BoRam Shin <boram.shin@...sung.com>
Subject: RE: RE: [PATCH v21 2/4] scsi: ufs: L2P map management for HPB read

> +static bool ufshpb_is_hpb_rsp_valid(struct ufs_hba *hba,
> > +                                        struct ufshcd_lrb *lrbp,
> > +                                        struct utp_hpb_rsp *rsp_field)
> > +{
> > +       if (be16_to_cpu(rsp_field->sense_data_len) != DEV_SENSE_SEG_LEN ||
> > +           rsp_field->desc_type != DEV_DES_TYPE ||
> > +           rsp_field->additional_len != DEV_ADDITIONAL_LEN ||
> > +           rsp_field->active_rgn_cnt > MAX_ACTIVE_NUM ||
> > +           rsp_field->inactive_rgn_cnt > MAX_INACTIVE_NUM ||
> > +           (rsp_field->hpb_op == HPB_RSP_REQ_REGION_UPDATE &&
> > +            !rsp_field->active_rgn_cnt && !rsp_field->inactive_rgn_cnt))
> > +               return false;
> > +
> > +       /* we cannot access HPB from other LU */
> > +       if (lrbp->lun != rsp_field->lun)
> > +               return false;
> Why not?
> Clearly this against the spec which allows to attach hpb sense crossed luns
>  
> > +
> > +       if (!ufshpb_is_general_lun(lrbp->lun)) {
> > +               dev_warn(hba->dev, "ufshpb: lun(%d) not supported\n",
> > +                        lrbp->lun);
> > +               return false;
> > +       }
> > +
> > +       return true;
> > +}
>  
>  
>  
>  
> > +void ufshpb_rsp_upiu(struct ufs_hba *hba, struct ufshcd_lrb *lrbp)
> > +{
> > +       struct ufshpb_lu *hpb = ufshpb_get_hpb_data(lrbp->cmd->device);
> > +       struct utp_hpb_rsp *rsp_field;
> > +       int data_seg_len;
> > +
> > +       if (!hpb)
> > +               return;
> Ditto

I fixed the code to support the crossed-hint.

Thanks,
Daejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ