linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 9/9] arm64: Use arm64_force_sig_info instead of force_sig_info
Date: Thu, 22 Feb 2018 16:58:05 +0000	[thread overview]
Message-ID: <20180222165805.GA18421@arm.com> (raw)
In-Reply-To: <20180222154821.rikapebcj3nvp775@lakrids.cambridge.arm.com>

On Thu, Feb 22, 2018 at 03:48:21PM +0000, Mark Rutland wrote:
> On Thu, Feb 22, 2018 at 02:00:57PM +0000, Will Deacon wrote:
> > Using arm64_force_sig_info means that printing messages about unhandled
> > signals is dealt with for us, so use that in preference to force_sig_info
> > and remove any homebrew printing code.
> > 
> > Signed-off-by: Will Deacon <will.deacon@arm.com>
> > ---
> >  arch/arm64/kernel/debug-monitors.c | 3 ++-
> >  arch/arm64/kernel/ptrace.c         | 2 +-
> >  arch/arm64/kernel/traps.c          | 9 ++-------
> >  3 files changed, 5 insertions(+), 9 deletions(-)

[...]

> > diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c
> > index 4231488a5a9f..cb5ad77524f3 100644
> > --- a/arch/arm64/kernel/traps.c
> > +++ b/arch/arm64/kernel/traps.c
> > @@ -633,11 +633,6 @@ asmlinkage void bad_el0_sync(struct pt_regs *regs, int reason, unsigned int esr)
> >  {
> >  	siginfo_t info;
> >  	void __user *pc = (void __user *)instruction_pointer(regs);
> > -	console_verbose();
> > -
> > -	pr_crit("Bad EL0 synchronous exception detected on CPU%d, code 0x%08x -- %s\n",
> > -		smp_processor_id(), esr, esr_get_class_string(esr));
> > -	__show_regs(regs);
> 
> Here we dump the CPU so that a developer can figure out which
> microarchitecture the exception was taken on (e.g. to allow them to
> decode an IMP DEF SError). We added that in commit:
> 
>   8051f4d16ef1d037 ("arm64: report CPU number in bad_mode")
> 
> However, in arm64_force_sig_info() we don't dump the CPU, and I guess
> that may be preemptible in cases other than bad_el0_sync().

__show_regs prints the CPU number already. If we're preemptible, then it
could be inaccurate.

Will

  reply	other threads:[~2018-02-22 16:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-22 14:00 [PATCH 0/9] arm64: Consolidate use of show_unhandled_signals Will Deacon
2018-02-22 14:00 ` [PATCH 1/9] arm64: signal: Make force_signal_inject more robust Will Deacon
2018-02-22 14:00 ` [PATCH 2/9] arm64: signal: Force SIGKILL for unknown signals in force_signal_inject Will Deacon
2018-02-22 14:00 ` [PATCH 3/9] arm64: Introduce arm64_force_sig_info and hook up in arm64_notify_die Will Deacon
2018-02-22 15:39   ` Mark Rutland
2018-02-22 14:00 ` [PATCH 4/9] arm64: signal: Don't print anything directly in force_signal_inject Will Deacon
2018-02-22 14:00 ` [PATCH 5/9] arm64: Pass user fault info to arm64_notify_die instead of printing it Will Deacon
2018-02-22 14:00 ` [PATCH 6/9] arm64: mm: Rework unhandled user pagefaults to call arm64_force_sig_info Will Deacon
2018-02-22 14:00 ` [PATCH 7/9] arm64: signal: Call arm64_notify_segfault when failing to deliver signal Will Deacon
2018-02-22 14:00 ` [PATCH 8/9] arm64: Move show_unhandled_signals_ratelimited into traps.c Will Deacon
2018-02-22 14:00 ` [PATCH 9/9] arm64: Use arm64_force_sig_info instead of force_sig_info Will Deacon
2018-02-22 15:48   ` Mark Rutland
2018-02-22 16:58     ` Will Deacon [this message]
2018-02-22 16:59       ` Mark Rutland

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=20180222165805.GA18421@arm.com \
    --to=will.deacon@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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).