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, 17 Jun 2020 19:09:56 +0900
From:   Daejun Park <daejun7.park@...sung.com>
To:     Avri Altman <Avri.Altman@....com>,
        Daejun Park <daejun7.park@...sung.com>,
        ALIM AKHTAR <alim.akhtar@...sung.com>,
        "jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
        "martin.petersen@...cle.com" <martin.petersen@...cle.com>,
        "asutoshd@...eaurora.org" <asutoshd@...eaurora.org>,
        "beanhuo@...ron.com" <beanhuo@...ron.com>,
        "stanley.chu@...iatek.com" <stanley.chu@...iatek.com>,
        "cang@...eaurora.org" <cang@...eaurora.org>,
        "bvanassche@....org" <bvanassche@....org>,
        "tomas.winkler@...el.com" <tomas.winkler@...el.com>
CC:     "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Sang-yoon Oh <sangyoon.oh@...sung.com>,
        Sung-Jun Park <sungjun07.park@...sung.com>,
        yongmyung lee <ymhungry.lee@...sung.com>,
        Jinyoung CHOI <j-young.choi@...sung.com>,
        Adel Choi <adel.choi@...sung.com>,
        BoRam Shin <boram.shin@...sung.com>
Subject: RE: [RFC PATCH v2 2/5] scsi: ufs: Add UFS-feature layer

> > This patch is adding UFS feature layer to UFS core driver.
> > 
> > UFS Driver data structure (struct ufs_hba)
> >         │
> > ┌--------------┐
> > │ UFS feature  │ <-- HPB module
> > │    layer     │ <-- other extended feature module
> > └--------------┘
> > Each extended UFS-Feature module has a bus of ufs-ext feature type.
> > The UFS feature layer manages common APIs used by each extended feature
> > module. The APIs are set of UFS Query requests and UFS Vendor commands
> > related to each extended feature module.
> > 
> > Other extended features can also be implemented using the proposed APIs.
> > For example, in Write Booster, "prep_fn" can be used to guarantee the
> > lifetime of UFS by updating the amount of write IO.
> > And reset/reset_host/suspend/resume can be used to manage the kernel task
> > for checking lifetime of UFS.
> > 
> > The following 6 callback functions have been added to "ufshcd.c".
> > prep_fn: called after construct upiu structure
> > reset: called after proving hba
> > reset_host: called before ufshcd_host_reset_and_restore
> > suspend: called before ufshcd_suspend
> > resume: called after ufshcd_resume
> > rsp_upiu: called in ufshcd_transfer_rsp_status with SAM_STAT_GOOD state
> > 
> > Signed-off-by: Daejun Park <daejun7.park@...sung.com>
> > ---
> >  drivers/scsi/ufs/Makefile     |   2 +-
> >  drivers/scsi/ufs/ufsfeature.c | 148 ++++++++++++++++++++++++++++++++++
> >  drivers/scsi/ufs/ufsfeature.h |  69 ++++++++++++++++
> >  drivers/scsi/ufs/ufshcd.c     |  17 ++++
> >  drivers/scsi/ufs/ufshcd.h     |   3 +
> >  5 files changed, 238 insertions(+), 1 deletion(-)
> >  create mode 100644 drivers/scsi/ufs/ufsfeature.c
> >  create mode 100644 drivers/scsi/ufs/ufsfeature.h
> > 
> > diff --git a/drivers/scsi/ufs/Makefile b/drivers/scsi/ufs/Makefile
> > index 94c6c5d7334b..fe3a92b06c87 100644
> > --- a/drivers/scsi/ufs/Makefile
> > +++ b/drivers/scsi/ufs/Makefile
> > @@ -5,7 +5,7 @@ obj-$(CONFIG_SCSI_UFS_DWC_TC_PLATFORM) += tc-dwc-
> > g210-pltfrm.o ufshcd-dwc.o tc-d
> >  obj-$(CONFIG_SCSI_UFS_CDNS_PLATFORM) += cdns-pltfrm.o
> >  obj-$(CONFIG_SCSI_UFS_QCOM) += ufs-qcom.o
> >  obj-$(CONFIG_SCSI_UFSHCD) += ufshcd-core.o
> > -ufshcd-core-y                          += ufshcd.o ufs-sysfs.o
> > +ufshcd-core-y                          += ufshcd.o ufs-sysfs.o ufsfeature.o
> How about making it
> >  ufshcd-core-$(CONFIG_UFS_FEATURES)     += ufsfeature.o
> So that you won't check none-hpb driver on every response etc.

It's not a big problem because it only needs a simple checking.
In addition, I think that it is not necessary to separate them because the UFS feature is enabled in most of the user cases.

Thanks,
Daejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ