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] [day] [month] [year] [list]
Message-ID: <cba286b68390472e2f3413b58c1f223b38f0294a.camel@mediatek.com>
Date: Wed, 23 Apr 2025 09:46:04 +0000
From: Peter Wang (王信友) <peter.wang@...iatek.com>
To: "avri.altman@....com" <avri.altman@....com>,
	"linux-mediatek@...ts.infradead.org" <linux-mediatek@...ts.infradead.org>,
	"tanghuan@...o.com" <tanghuan@...o.com>, "quic_nguyenb@...cinc.com"
	<quic_nguyenb@...cinc.com>, AngeloGioacchino Del Regno
	<angelogioacchino.delregno@...labora.com>, "bvanassche@....org"
	<bvanassche@....org>, "manivannan.sadhasivam@...aro.org"
	<manivannan.sadhasivam@...aro.org>, "alim.akhtar@...sung.com"
	<alim.akhtar@...sung.com>, "luhongfei@...o.com" <luhongfei@...o.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"matthias.bgg@...il.com" <matthias.bgg@...il.com>,
	"James.Bottomley@...senPartnership.com"
	<James.Bottomley@...senPartnership.com>, "martin.petersen@...cle.com"
	<martin.petersen@...cle.com>, "linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>, "linux-scsi@...r.kernel.org"
	<linux-scsi@...r.kernel.org>
CC: "opensource.kernel@...o.com" <opensource.kernel@...o.com>
Subject: Re: [PATCH] ufs: core: fix WB resize use wrong offset

On Wed, 2025-04-23 at 17:29 +0800, Huan Tang wrote:
> 'Commit 500d4b742e0c ("scsi: ufs: core: Add WB buffer resize
> support")'
> incorrectly reads the value of offset
> "DEVICE_DESC_PARAM_EXT_UFS_FEATURE_SUP" to determine whether WB
> resize
> is supported.
> 
> Fix the issue by read the value of "DEVICE_DESC_PARAM_EXT_WB_SUP"
> to determine whether the device supports WB resize.
> 
> Fixes: 500d4b742e0c ("scsi: ufs: core: Add WB buffer resize support")
> Reported-by: Peter Wang <peter.wang@...iatek.com>
> Closes: https://lore.kernel.org/all/7ce05b28f5d4b4b4973244310010c1487
> bdf4124.camel@...iatek.com/
> Signed-off-by: Huan Tang <tanghuan@...o.com>
> ---
>  drivers/ufs/core/ufshcd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index dc55c94fa45e..1c53ccf5a616 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -8143,7 +8143,7 @@ static void ufshcd_wb_probe(struct ufs_hba
> *hba, const u8 *desc_buf)
>         dev_info->wb_buffer_type =
> desc_buf[DEVICE_DESC_PARAM_WB_TYPE];
> 
>         dev_info->ext_wb_sup =  get_unaligned_be16(desc_buf +
> -                                              
> DEVICE_DESC_PARAM_EXT_UFS_FEATURE_SUP);
> +                                              
> DEVICE_DESC_PARAM_EXT_WB_SUP);
> 
>         dev_info->b_presrv_uspc_en =
>                 desc_buf[DEVICE_DESC_PARAM_WB_PRESRV_USRSPC_EN];
> --
> 2.39.0
> 


Reviewed-by: Peter Wang <peter.wang@...iatek.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ