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:   Wed, 28 Sep 2022 08:33:35 +0000
From:   Arthur Simchaev <Arthur.Simchaev@....com>
To:     "martin.petersen@...cle.com" <martin.petersen@...cle.com>,
        "beanhuo@...ron.com" <beanhuo@...ron.com>
CC:     "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Daniil Lunev <dlunev@...omium.org>,
        Avri Altman <Avri.Altman@....com>,
        Avi Shchislowski <Avi.Shchislowski@....com>
Subject: RE: [PATCH] scsi: ufs-bsg: Remove ufs_bsg_get_query_desc_size
 function

Hi Bean

In case you don't have any comments I will appreciate if you will add "reviewed by" to the patch.

Regards
Arthur

> -----Original Message-----
> From: Arthur Simchaev
> Sent: Wednesday, September 21, 2022 12:53 PM
> To: Bean Huo <huobean@...il.com>; James@...r.kernel.org;
> E.J.Bottomley@...r.kernel.org; jejb@...ux.vnet.ibm.com;
> Martin@...r.kernel.org; K.Petersen@...r.kernel.org;
> martin.petersen@...cle.com
> Cc: linux-scsi@...r.kernel.org; linux-kernel@...r.kernel.org;
> Bean@...r.kernel.org; Huo@...r.kernel.org; beanhuo@...ron.com
> Subject: RE: [PATCH] scsi: ufs-bsg: Remove ufs_bsg_get_query_desc_size
> function
> 
> Thank you Bean
> 
> > UFS descriptor size is no longer hardcoded (defined in the driver), the
> > size of the descriptor is reported by UFS itself, check the latest
> > kernel.
> >
> Invokes ufshcd_map_desc_id_to_length from bsg code, still problematic
> also in the latest kernel. The function limited the ufs bsg functionality.
> For example FBO descriptor published in Jedec UFS 4.0 spec and already exist
> in some UFS devices.
> Or others reserved descriptors (RFU_0/1) which can be used as vendor's
> descriptor. The function returns len =0
> We should be able to read any UFS descriptor of any size (up to
> QUERY_DESC_MAX_SIZE) or idn.
> According to the spec, the device will return the actual size.
> 
> The ufs bsg driver should not impose any such limitation. It's one of its design
> guidelines.
> E.g. as done for the attributes, flags the kernel doesn't check it size(for
> attributes is the max - 4 bytes),
> nor access (read/write).
> And just returns an appropriate error code should an error occur.
> 
> > This UFS driver is in the wrong location, I assume you are using an
> > older kernel version?
> Done
> 
> Regards
> Arthur
> 
> > -----Original Message-----
> > From: Bean Huo <huobean@...il.com>
> > Sent: Tuesday, September 20, 2022 12:38 PM
> > To: Arthur Simchaev <Arthur.Simchaev@....com>; James@...r.kernel.org;
> > E.J.Bottomley@...r.kernel.org; jejb@...ux.vnet.ibm.com;
> > Martin@...r.kernel.org; K.Petersen@...r.kernel.org;
> > martin.petersen@...cle.com
> > Cc: linux-scsi@...r.kernel.org; linux-kernel@...r.kernel.org;
> > Bean@...r.kernel.org; Huo@...r.kernel.org; beanhuo@...ron.com
> > Subject: Re: [PATCH] scsi: ufs-bsg: Remove ufs_bsg_get_query_desc_size
> > function
> >
> > CAUTION: This email originated from outside of Western Digital. Do not click
> > on links or open attachments unless you recognize the sender and know
> that
> > the content is safe.
> >
> >
> > Hi Arthur,
> >
> >
> > On Mon, 2022-06-20 at 15:26 +0300, Arthur Simchaev wrote:
> > > The bsg driver allows user space to send device management commands.
> > > As such, it is often used by field application engineers to debug
> > > various problems,
> > > and as a test bed for new features as well.
> > >
> > > Let's not bound ourself to hard coded descriptor sizes, as the new
> >
> > UFS descriptor size is no longer hardcoded (defined in the driver), the
> > size of the descriptor is reported by UFS itself, check the latest
> > kernel.
> >
> >
> > > Descriptors that supports new features are not defined yet.
> > >
> > > Signed-off-by: Arthur Simchaev <Arthur.Simchaev@....com>
> > > ---
> > >  drivers/scsi/ufs/ufs_bsg.c | 28 ++++------------------------
> > >  1 file changed, 4 insertions(+), 24 deletions(-)
> > >
> > > diff --git a/drivers/scsi/ufs/ufs_bsg.c b/drivers/scsi/ufs/ufs_bsg.c
> >
> > This UFS driver is in the wrong location, I assume you are using an
> > older kernel version?
> >
> > Kind regards,
> > Bean

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ