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: <b4jjhqsjnen4ifcccd4qu4tqq2wtqdglouslx26jbwhydgz7qn@lgeb7jltrt4d>
Date: Tue, 27 May 2025 09:09:02 +0200
From: Joel Granados <joel.granados@...nel.org>
To: Guenter Roeck <linux@...ck-us.net>
Cc: Kees Cook <kees@...nel.org>, linux-kernel@...r.kernel.org, 
	linux-fsdevel@...r.kernel.org, Wen Yang <wen.yang@...ux.dev>
Subject: Re: [PATCH] kernel/sysctl-test: Unregister sysctl table after test
 completion

On Fri, May 23, 2025 at 08:54:44AM -0700, Guenter Roeck wrote:
> On 5/23/25 08:01, Joel Granados wrote:
> > On Thu, May 22, 2025 at 11:53:15AM -0700, Guenter Roeck wrote:
> > > On Wed, May 21, 2025 at 06:32:11PM -0700, Guenter Roeck wrote:
> > > > One of the sysctl tests registers a valid sysctl table. This operation
> > > > is expected to succeed. However, it does not unregister the table after
> > > > executing the test. If the code is built as module and the module is
> > > > unloaded after the test, the next operation trying to access the table
> > > > (such as 'sysctl -a') will trigger a crash.
> > > > 
> > > > Unregister the registered table after test completiion to solve the
> > > > problem.
> > > > 
> > > 
> > > Never mind, I just learned that a very similar patch has been submitted
> > > last December or so but was rejected, and that the acceptable (?) fix seems
> > > to be stalled.
> > > 
> > > Sorry for the noise.
> > > 
> > > Guenter
> > 
> > Hey Guenter
> > 
> > It is part of what is getting sent for 6.16 [1]
> > That test will move out of kunit into self-test.
> > 
> 
> Yes, I was pointed to that. The version I have seen seems to assume that
> the test is running as module, because the created sysctl entry is removed
> in the module exit function. If built into the kernel, it would leave
> the debug entry in place after the test is complete. Also, it moves
> the affected set of tests out of the kunit infrastructure. Is that accurate
> or a misunderstanding on my side ?
You have understood correctly. That is what the sysctl selftest does at least.
It all runs together with tools/testing/sefltests/sysctl/*. The idea is
to use CONFIG_TEST_SYSCTL only for testing purposes.

Best

-- 

Joel Granados

Download attachment "signature.asc" of type "application/pgp-signature" (660 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ