public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yue Hu <zbestahu@gmail.com>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: will@kernel.org, akpm@linux-foundation.org, mark.rutland@arm.com,
	james.morse@arm.com, peterx@redhat.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, huyue2@yulong.com,
	zbestahu@163.com
Subject: Re: [PATCH] arm64: mm: add message to die() in die_kernel_fault()
Date: Thu, 30 Jul 2020 21:00:05 +0800	[thread overview]
Message-ID: <20200730210005.000069a0.zbestahu@gmail.com> (raw)
In-Reply-To: <20200730122723.GN25149@gaia>

On Thu, 30 Jul 2020 13:27:23 +0100
Catalin Marinas <catalin.marinas@arm.com> wrote:

> On Thu, Jul 30, 2020 at 07:47:57PM +0800, Yue Hu wrote:
> > From: Yue Hu <huyue2@yulong.com>
> > 
> > Just to identify the kernel fault more clearly.
> > 
> > Signed-off-by: Yue Hu <huyue2@yulong.com>
> > ---
> >  arch/arm64/mm/fault.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
> > index 8afb238..3a753c7 100644
> > --- a/arch/arm64/mm/fault.c
> > +++ b/arch/arm64/mm/fault.c
> > @@ -289,7 +289,7 @@ static void die_kernel_fault(const char *msg, unsigned long addr,
> >  	mem_abort_decode(esr);
> >  
> >  	show_pte(addr);
> > -	die("Oops", regs, esr);
> > +	die("Oops - Page fault", regs, esr);
> >  	bust_spinlocks(0);
> >  	do_exit(SIGKILL);
> >  }  
> 
> Don't we already print enough information prior to die()?
> 

Yes, we have. But "Oops" is a little common. Add specific message is just to avoid to
use it repeatedly by other callers just like die("Oops - BUG",,), die("Oops - KASAN",,).

Moreover, die() will call panic() if require, panic() does not know which oops it is.
We can let panic() know it for debug expansibility such as store the panic message to
reserved memory.

      reply	other threads:[~2020-07-30 13:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-30 11:47 [PATCH] arm64: mm: add message to die() in die_kernel_fault() Yue Hu
2020-07-30 12:27 ` Catalin Marinas
2020-07-30 13:00   ` Yue Hu [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=20200730210005.000069a0.zbestahu@gmail.com \
    --to=zbestahu@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=catalin.marinas@arm.com \
    --cc=huyue2@yulong.com \
    --cc=james.morse@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=peterx@redhat.com \
    --cc=will@kernel.org \
    --cc=zbestahu@163.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