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  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:   Sat, 30 May 2020 19:43:11 +0000
From:   Avri Altman <Avri.Altman@....com>
To:     Bean Huo <huobean@...il.com>,
        "alim.akhtar@...sung.com" <alim.akhtar@...sung.com>,
        "asutoshd@...eaurora.org" <asutoshd@...eaurora.org>,
        "jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
        "martin.petersen@...cle.com" <martin.petersen@...cle.com>,
        "stanley.chu@...iatek.com" <stanley.chu@...iatek.com>,
        "beanhuo@...ron.com" <beanhuo@...ron.com>,
        "bvanassche@....org" <bvanassche@....org>,
        "tomas.winkler@...el.com" <tomas.winkler@...el.com>,
        "cang@...eaurora.org" <cang@...eaurora.org>
CC:     "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v4 4/4] scsi: ufs: add compatibility with 3.1 UFS unit
 descriptor length

 
> Avri,
> 
> 
> On Sat, 2020-05-30 at 06:56 +0000, Avri Altman wrote:
> >
> > >
> > > From: Bean Huo <beanhuo@...ron.com>
> > >
> > > For UFS 3.1, the normal unit descriptor is 10 bytes larger
> > > than the RPMB unit, however, both descriptors share the same
> > > desc_idn, to cover both unit descriptors with one length, we
> > > choose the normal unit descriptor length by desc_index.
> >
> > This is not what your code is doing.
> > For RPMB - desc size will not be 0x2d but remain 256.
> 
> sorry, I'm afraid I didn't quite get your point here.
> would you go over it again in detail please?
> 
> 
> >
> > Your strategy is still correct IMO - if you assign the larger size,
> > The device will not reply with error, but with the proper buffer.
> >
> > You can also rely that reading the rpmb unit descriptor will not
> > happen before
> > Reading regular luns, because this is happening in the first
> > slave_alloc.
> >
> 
> On my side, I saw the Well-know LU descriptor is read before
> regulaer/normal LU descritptor. see ufshcd_add_lus();
> 
> I did further debug to verify my patch, and the unit descriptor read
> sequence:
> 
> 1. read RPMB descriptor: desc_id 2, desc_index 0xc4
> 2. read LU 0 descriptor: desc_id 2, desc_index 0
> 3. read LU 0 descriptor: desc_id 2, desc_index 1
> 4. read LU 0 descriptor: desc_id 2, desc_index 2
> 5. read LU 0 descriptor: desc_id 2, desc_index 4
> ....
> 
> > Hence, I think you can drop the extra if, and just add the comment.
> >
> 
> so, this 'if' is still needed. otherwise, LU descriptor length will be
> initialized as 0x23(RPMB descriptor length).
> 
Ahha, ok.  I see your point now,
Fair enough.

Reviewed-by: Avri Altman <avri.altman@....com>

Powered by blists - more mailing lists