lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200730210005.000069a0.zbestahu@gmail.com>
Date:   Thu, 30 Jul 2020 21:00:05 +0800
From:   Yue Hu <zbestahu@...il.com>
To:     Catalin Marinas <catalin.marinas@....com>
Cc:     will@...nel.org, akpm@...ux-foundation.org, mark.rutland@....com,
        james.morse@....com, peterx@...hat.com,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        huyue2@...ong.com, zbestahu@....com
Subject: Re: [PATCH] arm64: mm: add message to die() in die_kernel_fault()

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

> On Thu, Jul 30, 2020 at 07:47:57PM +0800, Yue Hu wrote:
> > From: Yue Hu <huyue2@...ong.com>
> > 
> > Just to identify the kernel fault more clearly.
> > 
> > Signed-off-by: Yue Hu <huyue2@...ong.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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ