All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: mm: add message to die() in die_kernel_fault()
@ 2020-07-30 11:47 ` Yue Hu
  0 siblings, 0 replies; 6+ messages in thread
From: Yue Hu @ 2020-07-30 11:47 UTC (permalink / raw)
  To: catalin.marinas, will, akpm, mark.rutland, james.morse, peterx
  Cc: linux-arm-kernel, linux-kernel, huyue2, zbestahu

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);
 }
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] arm64: mm: add message to die() in die_kernel_fault()
@ 2020-07-30 11:47 ` Yue Hu
  0 siblings, 0 replies; 6+ messages in thread
From: Yue Hu @ 2020-07-30 11:47 UTC (permalink / raw)
  To: catalin.marinas, will, akpm, mark.rutland, james.morse, peterx
  Cc: huyue2, linux-kernel, linux-arm-kernel, zbestahu

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);
 }
-- 
1.9.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] arm64: mm: add message to die() in die_kernel_fault()
  2020-07-30 11:47 ` Yue Hu
@ 2020-07-30 12:27   ` Catalin Marinas
  -1 siblings, 0 replies; 6+ messages in thread
From: Catalin Marinas @ 2020-07-30 12:27 UTC (permalink / raw)
  To: Yue Hu
  Cc: will, akpm, mark.rutland, james.morse, peterx, linux-arm-kernel,
	linux-kernel, huyue2, zbestahu

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()?

-- 
Catalin

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] arm64: mm: add message to die() in die_kernel_fault()
@ 2020-07-30 12:27   ` Catalin Marinas
  0 siblings, 0 replies; 6+ messages in thread
From: Catalin Marinas @ 2020-07-30 12:27 UTC (permalink / raw)
  To: Yue Hu
  Cc: mark.rutland, linux-kernel, peterx, zbestahu, huyue2,
	james.morse, akpm, will, linux-arm-kernel

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()?

-- 
Catalin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] arm64: mm: add message to die() in die_kernel_fault()
  2020-07-30 12:27   ` Catalin Marinas
@ 2020-07-30 13:00     ` Yue Hu
  -1 siblings, 0 replies; 6+ messages in thread
From: Yue Hu @ 2020-07-30 13:00 UTC (permalink / raw)
  To: Catalin Marinas
  Cc: will, akpm, mark.rutland, james.morse, peterx, linux-arm-kernel,
	linux-kernel, huyue2, zbestahu

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] arm64: mm: add message to die() in die_kernel_fault()
@ 2020-07-30 13:00     ` Yue Hu
  0 siblings, 0 replies; 6+ messages in thread
From: Yue Hu @ 2020-07-30 13:00 UTC (permalink / raw)
  To: Catalin Marinas
  Cc: mark.rutland, linux-kernel, peterx, zbestahu, huyue2,
	james.morse, akpm, will, linux-arm-kernel

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.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-07-30 13:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-30 11:47 [PATCH] arm64: mm: add message to die() in die_kernel_fault() Yue Hu
2020-07-30 11:47 ` Yue Hu
2020-07-30 12:27 ` Catalin Marinas
2020-07-30 12:27   ` Catalin Marinas
2020-07-30 13:00   ` Yue Hu
2020-07-30 13:00     ` Yue Hu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.