Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Kees Cook <kees@kernel.org>
To: Alessandro Carminati <acarmina@redhat.com>
Cc: linux-kselftest@vger.kernel.org,
	Dan Carpenter <dan.carpenter@linaro.org>,
	Daniel Diaz <daniel.diaz@linaro.org>,
	David Gow <davidgow@google.com>,
	Arthur Grillo <arthurgrillo@riseup.net>,
	Brendan Higgins <brendan.higgins@linux.dev>,
	Naresh Kamboju <naresh.kamboju@linaro.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Maxime Ripard <mripard@kernel.org>,
	Ville Syrjala <ville.syrjala@linux.intel.com>,
	Daniel Vetter <daniel@ffwll.ch>,
	Guenter Roeck <linux@roeck-us.net>,
	Alessandro Carminati <alessandro.carminati@gmail.com>,
	Jani Nikula <jani.nikula@intel.com>,
	Jeff Johnson <jeff.johnson@oss.qualcomm.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Josh Poimboeuf <jpoimboe@kernel.org>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Linux Kernel Functional Testing <lkft@linaro.org>,
	dri-devel@lists.freedesktop.org, kunit-dev@googlegroups.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 2/5] bug/kunit: Suppressing warning backtraces reduced impact on WARN*() sites
Date: Wed, 28 May 2025 15:52:36 -0700	[thread overview]
Message-ID: <202505281549.9B51A7D2@keescook> (raw)
In-Reply-To: <20250526132755.166150-3-acarmina@redhat.com>

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	other threads:[~2025-05-28 22:52 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-26 13:27 [PATCH v5 0/5] kunit: Add support for suppressing warning backtraces Alessandro Carminati
2025-05-26 13:27 ` [PATCH v5 1/5] bug/kunit: Core " Alessandro Carminati
2025-05-28 22:47   ` Kees Cook
2025-05-29  9:02     ` Peter Zijlstra
2025-05-29 17:46       ` Kees Cook
2025-05-30  9:25         ` Peter Zijlstra
2025-05-29  9:01   ` Peter Zijlstra
2025-05-29 10:36     ` Alessandro Carminati
2025-05-30 14:01       ` Peter Zijlstra
2025-05-30 17:48         ` Kees Cook
2025-05-31 10:23           ` Peter Zijlstra
2025-05-31 13:51             ` Kees Cook
2025-06-02  7:57               ` Peter Zijlstra
2025-06-02 10:38                 ` Maxime Ripard
2025-06-03 11:40                   ` Simona Vetter
2025-06-02 11:13             ` Maxime Ripard
2025-06-03 12:26               ` Peter Zijlstra
2025-06-04  3:30                 ` Daniel Latypov
2025-06-06  8:05                 ` Maxime Ripard
2025-05-31 10:25           ` Peter Zijlstra
2025-05-31  7:46         ` Peter Zijlstra
2025-05-31  7:52         ` Alessandro Carminati
2025-05-30  9:26   ` Peter Zijlstra
2025-05-26 13:27 ` [PATCH v5 2/5] bug/kunit: Suppressing warning backtraces reduced impact on WARN*() sites Alessandro Carminati
2025-05-28 22:52   ` Kees Cook [this message]
2025-05-26 13:27 ` [PATCH v5 3/5] Add unit tests to verify that warning backtrace suppression works Alessandro Carminati
2025-05-26 13:27 ` [PATCH v5 4/5] drm: Suppress intentional warning backtraces in scaling unit tests Alessandro Carminati
2025-05-26 13:27 ` [PATCH v5 5/5] kunit: Add documentation for warning backtrace suppression API Alessandro Carminati
2025-06-02  7:24 ` [PATCH v5 0/5] kunit: Add support for suppressing warning backtraces Dan Carpenter
2025-06-02 10:47   ` Maxime Ripard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202505281549.9B51A7D2@keescook \
    --to=kees@kernel.org \
    --cc=acarmina@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=alessandro.carminati@gmail.com \
    --cc=arthurgrillo@riseup.net \
    --cc=brendan.higgins@linux.dev \
    --cc=dan.carpenter@linaro.org \
    --cc=daniel.diaz@linaro.org \
    --cc=daniel@ffwll.ch \
    --cc=davidgow@google.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=jeff.johnson@oss.qualcomm.com \
    --cc=jpoimboe@kernel.org \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=lkft@linaro.org \
    --cc=mripard@kernel.org \
    --cc=naresh.kamboju@linaro.org \
    --cc=peterz@infradead.org \
    --cc=skhan@linuxfoundation.org \
    --cc=ville.syrjala@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox