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

Reply via email to