From: Borislav Petkov <bp@alien8.de>
To: Rik van Riel <riel@surriel.com>
Cc: Ingo Molnar <mingo@kernel.org>,
x86@kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com,
Dave Hansen <dave.hansen@intel.com>
Subject: Re: [PATCH v3] x86,mm: print likely CPU at segfault time
Date: Fri, 5 Aug 2022 16:27:40 +0200 [thread overview]
Message-ID: <Yu0o3J2T5QwKtoan@zn.tnic> (raw)
In-Reply-To: <20220805101644.2e674553@imladris.surriel.com>
On Fri, Aug 05, 2022 at 10:16:44AM -0400, Rik van Riel wrote:
> diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
> index fad8faa29d04..c7a5bbf40367 100644
> --- a/arch/x86/mm/fault.c
> +++ b/arch/x86/mm/fault.c
> @@ -769,6 +769,8 @@ show_signal_msg(struct pt_regs *regs, unsigned long error_code,
> unsigned long address, struct task_struct *tsk)
> {
> const char *loglvl = task_pid_nr(tsk) > 1 ? KERN_INFO : KERN_EMERG;
> + /* This is a racy snapshot, but it's better than nothing. */
> + int cpu = raw_smp_processor_id();
Please read this in exc_page_fault() and hand it down to helpers.
Alternatively, I'm being told there's a patchset in the works which
will allow for any exception handler to pass in additional information
downwards through an extended pt_regs. Then, saving the CPU number on
which the handler is running would work generically everywhere.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
next prev parent reply other threads:[~2022-08-05 14:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-05 14:16 [PATCH v3] x86,mm: print likely CPU at segfault time Rik van Riel
2022-08-05 14:27 ` Borislav Petkov [this message]
2022-08-05 14:40 ` Rik van Riel
2022-08-06 8:47 ` Ingo Molnar
2022-08-06 8:59 ` Ingo Molnar
2022-08-05 17:09 ` Ira Weiny
2022-08-24 11:03 ` [tip: x86/cpu] x86/mm: Print " tip-bot2 for Rik van Riel
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=Yu0o3J2T5QwKtoan@zn.tnic \
--to=bp@alien8.de \
--cc=dave.hansen@intel.com \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=riel@surriel.com \
--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