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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251105132201.00004a5d@linux.microsoft.com>
Date: Wed, 5 Nov 2025 13:22:01 -0800
From: Jacob Pan <jacob.pan@...ux.microsoft.com>
To: Nicolin Chen <nicolinc@...dia.com>
Cc: <linux-kernel@...r.kernel.org>, "iommu@...ts.linux.dev"
 <iommu@...ts.linux.dev>, Will Deacon <will@...nel.org>, Joerg Roedel
 <joro@...tes.org>, Mostafa Saleh <smostafa@...gle.com>, Jason Gunthorpe
 <jgg@...dia.com>, Robin Murphy <robin.murphy@....com>, Zhang Yu
 <zhangyu1@...ux.microsoft.com>, Jean Philippe-Brucker
 <jean-philippe@...aro.org>, Alexander Grest <Alexander.Grest@...rosoft.com>
Subject: Re: [PATCH v3 1/2] iommu/arm-smmu-v3: Fix CMDQ timeout warning

Hi Nicolin,

On Wed, 5 Nov 2025 11:44:25 -0800
Nicolin Chen <nicolinc@...dia.com> wrote:

> On Wed, Nov 05, 2025 at 11:06:37AM -0800, Jacob Pan wrote:
> > +	ret = queue_poll(qp);
> > +	if (ret == -ETIMEDOUT) {
> > +		dev_err_ratelimited(smmu->dev, "CMDQ timed out,
> > cons: %08x, prod: 0x%08x\n",
> > +				    llq->cons, llq->prod);
> > +		/* Restart the timer */
> > +		queue_poll_init(smmu, qp);
> > +	} else if (ret) {
> > +		dev_err_ratelimited(smmu->dev, "CMDQ poll error
> > %d\n", ret);  
> 
> I don't think you need this "if (ret)", as queue_poll() returns
> either 0 or -ETIMEOUT. And the patch that I shared with you has
> this noted clearly.
I agree it is not needed for now. But in general it is more robust not
to assume return value never changes.

I can delete that.

Thanks,

Jacob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ