From: Breno Leitao <leitao@debian.org>
To: Petr Mladek <pmladek@suse.com>
Cc: John Ogness <john.ogness@linutronix.de>,
Marco Elver <elver@google.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>, Will Deacon <will@kernel.org>,
Boqun Feng <boqun@kernel.org>, Waiman Long <longman@redhat.com>,
Dmitry Vyukov <dvyukov@google.com>,
linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com,
kernel-team@meta.com
Subject: Re: [PATCH v2] kcsan: Don't enter an nbcon emergency section for verbose reports
Date: Thu, 5 Nov 2026 02:39:14 -0800 [thread overview]
Message-ID: <auxbeij5bSW4skit@gmail.com> (raw)
In-Reply-To: <auxTn4YuYHUOt4ml@pathway.suse.cz>
Hello Petr,
On Thu, Nov 05, 2026 at 10:59:59AM +0100, Petr Mladek wrote:
> And there seems to be one more lockdep-caller of
> print_irqtrace_events():
>
> --- a/kernel/locking/lockdep.c
> +++ b/kernel/locking/lockdep.c
> @@ -4649,6 +4649,8 @@ void lockdep_cleanup_dead_cpu(unsigned int cpu, struct task_struct *idle)
> if (unlikely(!debug_locks))
> return;
>
> + nbcon_cpu_emergency_enter();
> +
> if (unlikely(per_cpu(hardirqs_enabled, cpu))) {
> pr_warn("CPU %u left hardirqs enabled!", cpu);
> if (idle)
> @@ -4656,6 +4658,8 @@ void lockdep_cleanup_dead_cpu(unsigned int cpu, struct task_struct *idle)
> /* Clean it up for when the CPU comes online again. */
> per_cpu(hardirqs_enabled, cpu) = 0;
> }
> +
> + nbcon_cpu_emergency_enter();
> }
>
> static int
>
> What do you think, please?
If print_irqtrace_events() is going to be used both inside and outside
emergency sections, wouldn't it be cleaner to keep a variant that enters
the section itself, for check_flags(), instead of open-coding
nbcon_cpu_emergency_enter()/exit() around the call? Something similar to
this current patchset approach (maybe with a better function naming?)
next prev parent reply other threads:[~2026-11-05 10:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 11:32 [PATCH v2] kcsan: Don't enter an nbcon emergency section for verbose reports Breno Leitao
2026-11-04 12:46 ` John Ogness
2026-11-04 14:33 ` Breno Leitao
2026-11-04 14:42 ` John Ogness
2026-11-05 9:59 ` Petr Mladek
2026-11-05 10:39 ` Breno Leitao [this message]
2026-11-05 10:59 ` John Ogness
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=auxbeij5bSW4skit@gmail.com \
--to=leitao@debian.org \
--cc=boqun@kernel.org \
--cc=dvyukov@google.com \
--cc=elver@google.com \
--cc=john.ogness@linutronix.de \
--cc=kasan-dev@googlegroups.com \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--cc=will@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.