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: Fri, 31 May 2024 13:17:16 -0700
From: Bart Van Assche <bvanassche@....org>
To: Minwoo Im <minwoo.im@...sung.com>,
 "James E . J . Bottomley" <James.Bottomley@...senPartnership.com>,
 "Martin K . Petersen" <martin.petersen@...cle.com>
Cc: Alim Akhtar <alim.akhtar@...sung.com>, Avri Altman <avri.altman@....com>,
 gost.dev@...sung.com, linux-scsi@...r.kernel.org,
 linux-kernel@...r.kernel.org, Jeuk Kim <jeuk20.kim@...sung.com>
Subject: Re: [PATCH 3/3] ufs: mcq: Prevent no I/O queue case for MCQ

On 5/31/24 03:38, Minwoo Im wrote:
> If hba_maxq equals poll_queues, which means there are no I/O queues
> (HCTX_TYPE_DEFAULT, HCTX_TYPE_READ), the very first hw queue will be
> allocated as HCTX_TYPE_POLL and it will be used as the dev_cmd_queue.
> In this case, device commands such as QUERY cannot be properly handled.
> 
> This patch prevents the initialization of MCQ when the number of I/O
> queues is not set and only the number of POLL queues is set.
> 
> Signed-off-by: Minwoo Im <minwoo.im@...sung.com>
> ---
>   drivers/ufs/core/ufs-mcq.c | 9 +++++++++
>   1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/ufs/core/ufs-mcq.c b/drivers/ufs/core/ufs-mcq.c
> index 46faa54aea94..4bcae410c268 100644
> --- a/drivers/ufs/core/ufs-mcq.c
> +++ b/drivers/ufs/core/ufs-mcq.c
> @@ -179,6 +179,15 @@ static int ufshcd_mcq_config_nr_queues(struct ufs_hba *hba)
>   		return -EOPNOTSUPP;
>   	}
>   
> +	/*
> +	 * Device should support at least one I/O queue to handle device
> +	 * commands via hba->dev_cmd_queue.
> +	 */
> +	if (hba_maxq == poll_queues) {
> +		dev_err(hba->dev, "At least one non-poll queue required\n");
> +		return -EOPNOTSUPP;
> +	}
> +
>   	rem = hba_maxq;
>   
>   	if (rw_queues) {

Reviewed-by: Bart Van Assche <bvanassche@....org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ