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: <20200425111056.GA3384@infradead.org>
Date:   Sat, 25 Apr 2020 04:10:56 -0700
From:   Christoph Hellwig <hch@...radead.org>
To:     Jose Abreu <Jose.Abreu@...opsys.com>
Cc:     linux-scsi@...r.kernel.org, Joao Pinto <Joao.Pinto@...opsys.com>,
        Joao Lima <Joao.Lima@...opsys.com>,
        Alim Akhtar <alim.akhtar@...sung.com>,
        Avri Altman <avri.altman@....com>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/5] scsi: ufs: Allow UFS 3.0 as a valid version

On Fri, Apr 24, 2020 at 01:36:56PM +0200, Jose Abreu wrote:
> Add a define for UFS version 3.0 and do not print an error message upon
> probe when using this version.

This doesn't really scale.  Version checks only make sense for a minimum
supported version.  Rejecting newer versions is just a bad idea.

> @@ -8441,7 +8441,8 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)
>  	if ((hba->ufs_version != UFSHCI_VERSION_10) &&
>  	    (hba->ufs_version != UFSHCI_VERSION_11) &&
>  	    (hba->ufs_version != UFSHCI_VERSION_20) &&
> -	    (hba->ufs_version != UFSHCI_VERSION_21))
> +	    (hba->ufs_version != UFSHCI_VERSION_21) &&
> +	    (hba->ufs_version != UFSHCI_VERSION_30))

i.e. this should become

	if (hba->ufs_version < UFSHCI_VERSION_10)

as an additional cleanup I think it makes more sense t use a UFSHCI_VER()
macro similar to KERNEL_VERSION() or NVME_VS() instead of adding a new
define for every version.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ