From: Rik van Riel <riel@surriel.com>
To: Thomas Gleixner <tglx@linutronix.de>, linux-kernel@vger.kernel.org
Cc: Dave Hansen <dave.hansen@linux.intel.com>,
Andy Lutomirski <luto@kernel.org>,
kernel-team@fb.com, Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
x86@kernel.org
Subject: Re: [PATCH] x86,mm: print likely CPU at segfault time
Date: Fri, 23 Jul 2021 21:38:38 -0400 [thread overview]
Message-ID: <239ada57a88c69072fc2933a39affe3923c90800.camel@surriel.com> (raw)
In-Reply-To: <87sg07pfpk.ffs@nanos.tec.linutronix.de>
[-- Attachment #1: Type: text/plain, Size: 1074 bytes --]
On Wed, 2021-07-21 at 22:36 +0200, Thomas Gleixner wrote:
> Rik,
>
> On Mon, Jul 19 2021 at 15:00, Rik van Riel wrote:
> >
> > Adding a printk to show_signal_msg() achieves that purpose. It
> > isn't
> > perfect since the task might get rescheduled on another CPU between
> > when the fault hit and when the message is printed, but it should
> > be
> > good enough to show correlation between userspace and kernel errors
> > when dealing with a bad CPU.
>
> we could collect the cpu number in do_*_addr_fault() before
> interrupts
> are enabled and just hand it through. There are only a few callchains
> which end up in __bad_area_nosemaphore().
We could, but do we really want to add that to the hot path
for page faults, when segfaults are so rare?
I suspect the simple patch I sent will be good enough to
identify a bad CPU, even if only 3 out of 4 userspace crashes
get attributed to the right CPU...
I would be happy to write a patch that does what you want
though, so you can compare them side by side :)
--
All Rights Reversed.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2021-07-24 1:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-19 19:00 [PATCH] x86,mm: print likely CPU at segfault time Rik van Riel
2021-07-19 19:20 ` Dave Hansen
2021-07-19 19:34 ` Rik van Riel
2021-07-21 20:38 ` Thomas Gleixner
2021-07-21 20:36 ` Thomas Gleixner
2021-07-24 1:38 ` Rik van Riel [this message]
2022-08-02 20:09 Rik van Riel
2022-08-03 14:49 ` Dave Hansen
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=239ada57a88c69072fc2933a39affe3923c90800.camel@surriel.com \
--to=riel@surriel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).