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: <2ef77956-3e09-4315-8e3d-2046830f9227@acm.org>
Date: Fri, 28 Mar 2025 10:14:52 -0700
From: Bart Van Assche <bvanassche@....org>
To: Neil Armstrong <neil.armstrong@...aro.org>,
 Alim Akhtar <alim.akhtar@...sung.com>, Avri Altman <avri.altman@....com>,
 "James E.J. Bottomley" <James.Bottomley@...senPartnership.com>,
 "Martin K. Petersen" <martin.petersen@...cle.com>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
 linux-arm-msm@...r.kernel.org, linux-scsi@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC v2 2/2] ufs: core: delegate the interrupt service
 routine to a threaded irq handler

On 3/26/25 1:36 AM, Neil Armstrong wrote:
> +static irqreturn_t ufshcd_intr(int irq, void *__hba)
> +{
> +	struct ufs_hba *hba = __hba;
> +
> +	/*
> +	 * Move interrupt handling to thread when MCQ is not supported
> +	 * or when Interrupt Aggregation is not supported, leading to
> +	 * potentially longer interrupt handling.
> +	 */
> +	if (!is_mcq_supported(hba) || !ufshcd_is_intr_aggr_allowed(hba))
> +		return IRQ_WAKE_THREAD;
> +
> +	/* Directly handle interrupts since MCQ handlers does the hard job */
> +	return ufshcd_sl_intr(hba, ufshcd_readl(hba, REG_INTERRUPT_STATUS) &
> +				   ufshcd_readl(hba, REG_INTERRUPT_ENABLE));
> +}

Calling ufshcd_is_intr_aggr_allowed() from the above interrupt handler
seems wrong to me. I think you want to check whether or not ESI has been
disabled since only if ESI is disabled all I/O completions are handled
by a single interrupt if MCQ is enabled.

Thanks,

Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ