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: <aH6XoVHRBvOfP0ZH@Asurada-Nvidia>
Date: Mon, 21 Jul 2025 12:40:17 -0700
From: Nicolin Chen <nicolinc@...dia.com>
To: Will Deacon <will@...nel.org>
CC: <jgg@...dia.com>, <joro@...tes.org>, <robin.murphy@....com>,
	<linux-arm-kernel@...ts.infradead.org>, <iommu@...ts.linux.dev>,
	<linux-kernel@...r.kernel.org>, <linux-tegra@...r.kernel.org>
Subject: Re: [PATCH v2 1/2] iommu/arm-smmu-v3: Do not bother impl_ops if
 IOMMU_VIOMMU_TYPE_ARM_SMMUV3

On Mon, Jul 21, 2025 at 08:23:36PM +0100, Will Deacon wrote:
> On Mon, Jul 21, 2025 at 12:12:35PM -0700, Nicolin Chen wrote:
> > +	ops = new_smmu->impl_ops;
> > +	if (ops) {
> > +		/* vsmmu_size and vsmmu_init ops must be paired */
> > +		if (WARN_ON(!ops->vsmmu_size ^ !ops->vsmmu_init)) {
> > +			ret = -EINVAL;
> > +			goto err_remove;
> > +		}
> 
> I suppose that could be != instead of ^ to avoid mixing up logical and
> arithmetic operators, but it does the trick either way so:
> 
> Acked-by: Will Deacon <will@...nel.org>

Ah, it only compares one bit, so I think "!=" would be nicer.

Will quickly respin a v3.

Thanks
Nicolin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ