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: <aPENnxVR+wtlGVAJ@Asurada-Nvidia>
Date: Thu, 16 Oct 2025 08:22:07 -0700
From: Nicolin Chen <nicolinc@...dia.com>
To: Alessandro Zanni <alessandrozanni.dev@...il.com>
CC: "Tian, Kevin" <kevin.tian@...el.com>, "jgg@...dia.com" <jgg@...dia.com>,
	"shuah@...nel.org" <shuah@...nel.org>, "alessandro.zanni87@...il.com"
	<alessandro.zanni87@...il.com>, "iommu@...ts.linux.dev"
	<iommu@...ts.linux.dev>, "linux-kselftest@...r.kernel.org"
	<linux-kselftest@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH rc] iommufd/selftest: Fix ioctl return value in
 _test_cmd_trigger_vevents()

On Thu, Oct 16, 2025 at 11:09:59AM +0200, Alessandro Zanni wrote:
> On Thu, Oct 16, 2025 at 07:47:20AM +0000, Tian, Kevin wrote:
> > > From: Nicolin Chen <nicolinc@...dia.com>
> > > Sent: Wednesday, October 15, 2025 5:49 AM
> > > 
> > > The ioctl returns 0 upon success, so !0 returning -1 breaks the selftest.
> > > 
> > > Drop the '!' to fix it.
> > > 
> > > Fixes: 1d235d849425 ("iommu/selftest: prevent use of uninitialized variable")
> > > Signed-off-by: Nicolin Chen <nicolinc@...dia.com>
> > 
> > Reviewed-by: Kevin Tian <kevin.tian@...el.com>
> 
> With this fix a positive value returned by the ioctl() ends the loop and returns -1
> to the assert.

Not with this particular ioctl(). And in fact, I don't recall we
have an ioctl in iommufd uAPI that returns a positive value. All
the other ioctls in selftest check "if (ret)".

Nicolin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ