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]
Message-ID: <20250610120902.GB543171@nvidia.com>
Date: Tue, 10 Jun 2025 09:09:02 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
Cc: Nicolin Chen <nicolinc@...dia.com>, Shuah Khan <shuah@...nel.org>,
	Shuah Khan <skhan@...uxfoundation.org>, Willy Tarreau <w@....eu>,
	Thomas Weißschuh <linux@...ssschuh.net>,
	Kees Cook <kees@...nel.org>, Andy Lutomirski <luto@...capital.net>,
	Will Drewry <wad@...omium.org>, Mark Brown <broonie@...nel.org>,
	Muhammad Usama Anjum <usama.anjum@...labora.com>,
	linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH v4 09/14] selftests: harness: Move teardown conditional
 into test metadata

On Tue, Jun 10, 2025 at 01:38:22PM +0200, Thomas Weißschuh wrote:
> Hi Nicolin,
> 
> On Mon, Jun 09, 2025 at 11:49:05PM -0700, Nicolin Chen wrote:
> > CC += Jason
> > 
> > On Mon, May 05, 2025 at 05:15:27PM +0200, Thomas Weißschuh wrote:
> > > To get rid of setjmp()/longjmp(), the teardown logic needs to be usable
> > > from __bail(). To access the atomic teardown conditional from there,
> > > move it into the test metadata.
> > > This also allows the removal of "setup_completed".
> > > 
> > > Signed-off-by: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
> > > Acked-by: Shuah Khan <skhan@...uxfoundation.org>
> > 
> > Certain hugepage tests in iommufd selftest (CONFIG_IOMMUFD_TEST)
> > start to fail since v6.16-rc1, though the test functions weren't
> > changed during last cycle:
> 
> Thanks for the report.
> 
> > ------------------------------------------------------------------
> > #  RUN           iommufd_dirty_tracking.domain_dirty128M_huge.enforce_dirty ...
> > # enforce_dirty: Test terminated unexpectedly by signal 11

Sig 11 is weird..

> I can't reproduce this report.
> On my development machine or a virtme-ng VM I get the following failure:
> 
> 	# ./iommufd -r iommufd_dirty_tracking.domain_dirty128M_huge.enforce_dirty
> 	TAP version 13
> 	1..1
> 	# Starting 1 tests from 1 test cases.
> 	#  RUN           iommufd_dirty_tracking.domain_dirty128M_huge.enforce_dirty ...
> 	iommufd: iommufd.c:2042: iommufd_dirty_tracking_setup: Assertion `vrc == self->buffer' failed.
> 	# enforce_dirty: Test terminated by assertion
> 	#          FAIL  iommufd_dirty_tracking.domain_dirty128M_huge.enforce_dirty
> 	not ok 1 iommufd_dirty_tracking.domain_dirty128M_huge.enforce_dirty
> 	# FAILED: 0 / 1 tests passed.
> 	# Totals: pass:0 fail:1 xfail:0 xpass:0 skip:0 error:0
> 
> Specifically the mmap() fails with ENOMEM.
> 
> When booting the VM with "hugepages=100" the test succeeds.

Yes, that is required

> On another note, the selftest should use the kselftest_harness' ASSERT_*()
> macros instead of plain assert().

IIRC the kselftest stuff explodes if you try to use it's assert
functions within a fixture setup/teardown context.

I also wasn't able to reproduce this (x86 ubuntu 24 LTS OS) Maybe
it is ARM specific, I think Nicolin is running on ARM..

I did see the other warnings that Nicolin reported.

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ