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] [thread-next>] [day] [month] [year] [list]
Message-ID: <202505281549.9B51A7D2@keescook>
Date: Wed, 28 May 2025 15:52:36 -0700
From: Kees Cook <kees@...nel.org>
To: Alessandro Carminati <acarmina@...hat.com>
Cc: linux-kselftest@...r.kernel.org,
	Dan Carpenter <dan.carpenter@...aro.org>,
	Daniel Diaz <daniel.diaz@...aro.org>,
	David Gow <davidgow@...gle.com>,
	Arthur Grillo <arthurgrillo@...eup.net>,
	Brendan Higgins <brendan.higgins@...ux.dev>,
	Naresh Kamboju <naresh.kamboju@...aro.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Maxime Ripard <mripard@...nel.org>,
	Ville Syrjala <ville.syrjala@...ux.intel.com>,
	Daniel Vetter <daniel@...ll.ch>, Guenter Roeck <linux@...ck-us.net>,
	Alessandro Carminati <alessandro.carminati@...il.com>,
	Jani Nikula <jani.nikula@...el.com>,
	Jeff Johnson <jeff.johnson@....qualcomm.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Josh Poimboeuf <jpoimboe@...nel.org>,
	Shuah Khan <skhan@...uxfoundation.org>,
	Linux Kernel Functional Testing <lkft@...aro.org>,
	dri-devel@...ts.freedesktop.org, kunit-dev@...glegroups.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 2/5] bug/kunit: Suppressing warning backtraces reduced
 impact on WARN*() sites

On Mon, May 26, 2025 at 01:27:52PM +0000, Alessandro Carminati wrote:
> KUnit support is not consistently present across distributions, some
> include it in their stock kernels, while others do not.
> While both KUNIT and KUNIT_SUPPRESS_BACKTRACE can be considered debug
> features, the fact that some distros ship with KUnit enabled means it's
> important to minimize the runtime impact of this patch.
> To that end, this patch introduces a counter for the number of
> suppressed symbols and skips execution of __kunit_is_suppressed_warning()
> entirely when no symbols are currently being suppressed.

If KUnit already serialized? I should have asked this before: you're
reading and writing a global list -- I think some kind of RCU may
be needed for the list? One thread may be removing a function from the
list while another thread is executing a WARN-induced walk of the
list...

This global may have the same problem. Why not use a static branch, or
is that just overkill?

-Kees

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ