From: Kees Cook <keescook@chromium.org>
To: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: mattst88@gmail.com, linux-alpha@vger.kernel.org,
linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Regression bisected to f2f84b05e02b (bug: consolidate warn_slowpath_fmt() usage)
Date: Thu, 23 May 2024 16:49:16 -0700 [thread overview]
Message-ID: <202405231647.69CAA404D8@keescook> (raw)
In-Reply-To: <20240521184652.1875074-1-glaubitz@physik.fu-berlin.de>
On Tue, May 21, 2024 at 08:46:52PM +0200, John Paul Adrian Glaubitz wrote:
> Hi,
>
> Replacing the calls to raw_smp_processor_id() in __warn() with just "0" fixes the problem for me:
>
> diff --git a/kernel/panic.c b/kernel/panic.c
> index 8bff183d6180..12f6cea6b8b0 100644
> --- a/kernel/panic.c
> +++ b/kernel/panic.c
> @@ -671,11 +671,11 @@ void __warn(const char *file, int line, void *caller, unsigned taint,
>
> if (file)
> pr_warn("WARNING: CPU: %d PID: %d at %s:%d %pS\n",
> - raw_smp_processor_id(), current->pid, file, line,
> + 0, current->pid, file, line,
> caller);
> else
> pr_warn("WARNING: CPU: %d PID: %d at %pS\n",
> - raw_smp_processor_id(), current->pid, caller);
> + 0, current->pid, caller);
>
> #pragma GCC diagnostic push
> #ifndef __clang__
>
> So, I assume the problem is that SMP support is not fully initialized at this
> point yet such that raw_smp_processor_id() causes the zero pointer dereference.
But how does the commit change that? It called __warn() before too.
Is this an inlining bug?
--
Kees Cook
prev parent reply other threads:[~2024-05-23 23:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-02 2:48 Regression bisected to f2f84b05e02b (bug: consolidate warn_slowpath_fmt() usage) Matt Turner
2020-06-02 18:03 ` Kees Cook
2020-06-12 4:23 ` Matt Turner
2020-06-12 4:47 ` Michael Cree
2020-06-12 5:07 ` Kees Cook
2024-05-21 18:46 ` John Paul Adrian Glaubitz
2024-05-23 23:49 ` Kees Cook [this message]
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=202405231647.69CAA404D8@keescook \
--to=keescook@chromium.org \
--cc=glaubitz@physik.fu-berlin.de \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mattst88@gmail.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