All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2] print kdump kernel loaded status in stack dump
@ 2018-01-27  4:11 ` Dave Young
  0 siblings, 0 replies; 10+ messages in thread
From: Dave Young @ 2018-01-27  4:11 UTC (permalink / raw)
  To: Petr Mladek, Steven Rostedt, Andi Kleen, sergey.senozhatsky
  Cc: linux-kernel, akpm, kexec

It is useful to print kdump kernel loaded status in dump_stack() 
especially when panic happens so that we can differenciate 
kdump kernel early hang and a normal panic in a bug report.

Signed-off-by: Dave Young <dyoung@redhat.com>
---
[v1 -> v2] merge the status in other line as Andi Kleen suggested
 kernel/printk/printk.c |    3 +++
---
 kernel/printk/printk.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

--- linux-x86.orig/kernel/printk/printk.c
+++ linux-x86/kernel/printk/printk.c
@@ -48,6 +48,7 @@
 #include <linux/sched/clock.h>
 #include <linux/sched/debug.h>
 #include <linux/sched/task_stack.h>
+#include <linux/kexec.h>
 
 #include <linux/uaccess.h>
 #include <asm/sections.h>
@@ -3118,9 +3119,11 @@ void __init dump_stack_set_arch_desc(con
  */
 void dump_stack_print_info(const char *log_lvl)
 {
-	printk("%sCPU: %d PID: %d Comm: %.20s %s %s %.*s\n",
+	printk("%sCPU: %d PID: %d Comm: %.20s %s%s %s %.*s\n",
 	       log_lvl, raw_smp_processor_id(), current->pid, current->comm,
-	       print_tainted(), init_utsname()->release,
+	       kexec_crash_loaded() ? "Kdump: loaded " : "",
+	       print_tainted(),
+	       init_utsname()->release,
 	       (int)strcspn(init_utsname()->version, " "),
 	       init_utsname()->version);
 

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

* [PATCH V2] print kdump kernel loaded status in stack dump
@ 2018-01-27  4:11 ` Dave Young
  0 siblings, 0 replies; 10+ messages in thread
From: Dave Young @ 2018-01-27  4:11 UTC (permalink / raw)
  To: Petr Mladek, Steven Rostedt, Andi Kleen, sergey.senozhatsky
  Cc: akpm, kexec, linux-kernel

It is useful to print kdump kernel loaded status in dump_stack() 
especially when panic happens so that we can differenciate 
kdump kernel early hang and a normal panic in a bug report.

Signed-off-by: Dave Young <dyoung@redhat.com>
---
[v1 -> v2] merge the status in other line as Andi Kleen suggested
 kernel/printk/printk.c |    3 +++
---
 kernel/printk/printk.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

--- linux-x86.orig/kernel/printk/printk.c
+++ linux-x86/kernel/printk/printk.c
@@ -48,6 +48,7 @@
 #include <linux/sched/clock.h>
 #include <linux/sched/debug.h>
 #include <linux/sched/task_stack.h>
+#include <linux/kexec.h>
 
 #include <linux/uaccess.h>
 #include <asm/sections.h>
@@ -3118,9 +3119,11 @@ void __init dump_stack_set_arch_desc(con
  */
 void dump_stack_print_info(const char *log_lvl)
 {
-	printk("%sCPU: %d PID: %d Comm: %.20s %s %s %.*s\n",
+	printk("%sCPU: %d PID: %d Comm: %.20s %s%s %s %.*s\n",
 	       log_lvl, raw_smp_processor_id(), current->pid, current->comm,
-	       print_tainted(), init_utsname()->release,
+	       kexec_crash_loaded() ? "Kdump: loaded " : "",
+	       print_tainted(),
+	       init_utsname()->release,
 	       (int)strcspn(init_utsname()->version, " "),
 	       init_utsname()->version);
 

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

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

* Re: [PATCH V2] print kdump kernel loaded status in stack dump
  2018-01-27  4:11 ` Dave Young
@ 2018-01-30  8:50   ` Sergey Senozhatsky
  -1 siblings, 0 replies; 10+ messages in thread
From: Sergey Senozhatsky @ 2018-01-30  8:50 UTC (permalink / raw)
  To: Dave Young
  Cc: Petr Mladek, Steven Rostedt, Andi Kleen, sergey.senozhatsky,
	linux-kernel, akpm, kexec

On (01/27/18 12:11), Dave Young wrote:
> It is useful to print kdump kernel loaded status in dump_stack() 
> especially when panic happens so that we can differenciate 
> kdump kernel early hang and a normal panic in a bug report.
> 
> Signed-off-by: Dave Young <dyoung@redhat.com>

Looks OK to me.

Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>


I agree with Steven, would be better to move the whole thing
to lib/dump_stack.c

	-ss

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

* Re: [PATCH V2] print kdump kernel loaded status in stack dump
@ 2018-01-30  8:50   ` Sergey Senozhatsky
  0 siblings, 0 replies; 10+ messages in thread
From: Sergey Senozhatsky @ 2018-01-30  8:50 UTC (permalink / raw)
  To: Dave Young
  Cc: Petr Mladek, Andi Kleen, kexec, linux-kernel, Steven Rostedt,
	sergey.senozhatsky, akpm

On (01/27/18 12:11), Dave Young wrote:
> It is useful to print kdump kernel loaded status in dump_stack() 
> especially when panic happens so that we can differenciate 
> kdump kernel early hang and a normal panic in a bug report.
> 
> Signed-off-by: Dave Young <dyoung@redhat.com>

Looks OK to me.

Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>


I agree with Steven, would be better to move the whole thing
to lib/dump_stack.c

	-ss

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

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

* Re: [PATCH V2] print kdump kernel loaded status in stack dump
  2018-01-30  8:50   ` Sergey Senozhatsky
@ 2018-01-30  9:07     ` Dave Young
  -1 siblings, 0 replies; 10+ messages in thread
From: Dave Young @ 2018-01-30  9:07 UTC (permalink / raw)
  To: Sergey Senozhatsky
  Cc: Petr Mladek, Steven Rostedt, Andi Kleen, sergey.senozhatsky,
	linux-kernel, akpm, kexec

On 01/30/18 at 05:50pm, Sergey Senozhatsky wrote:
> On (01/27/18 12:11), Dave Young wrote:
> > It is useful to print kdump kernel loaded status in dump_stack() 
> > especially when panic happens so that we can differenciate 
> > kdump kernel early hang and a normal panic in a bug report.
> > 
> > Signed-off-by: Dave Young <dyoung@redhat.com>
> 
> Looks OK to me.
> 
> Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
> 

Thank you Sergey

> 
> I agree with Steven, would be better to move the whole thing
> to lib/dump_stack.c

If nobody has plan I can put it in my todo list, probably do it next
week.

> 
> 	-ss

Thanks
Dave

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

* Re: [PATCH V2] print kdump kernel loaded status in stack dump
@ 2018-01-30  9:07     ` Dave Young
  0 siblings, 0 replies; 10+ messages in thread
From: Dave Young @ 2018-01-30  9:07 UTC (permalink / raw)
  To: Sergey Senozhatsky
  Cc: Petr Mladek, Andi Kleen, kexec, linux-kernel, Steven Rostedt,
	sergey.senozhatsky, akpm

On 01/30/18 at 05:50pm, Sergey Senozhatsky wrote:
> On (01/27/18 12:11), Dave Young wrote:
> > It is useful to print kdump kernel loaded status in dump_stack() 
> > especially when panic happens so that we can differenciate 
> > kdump kernel early hang and a normal panic in a bug report.
> > 
> > Signed-off-by: Dave Young <dyoung@redhat.com>
> 
> Looks OK to me.
> 
> Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
> 

Thank you Sergey

> 
> I agree with Steven, would be better to move the whole thing
> to lib/dump_stack.c

If nobody has plan I can put it in my todo list, probably do it next
week.

> 
> 	-ss

Thanks
Dave

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

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

* Re: [PATCH V2] print kdump kernel loaded status in stack dump
  2018-01-30  9:07     ` Dave Young
@ 2018-01-30  9:36       ` Petr Mladek
  -1 siblings, 0 replies; 10+ messages in thread
From: Petr Mladek @ 2018-01-30  9:36 UTC (permalink / raw)
  To: Dave Young
  Cc: Sergey Senozhatsky, Steven Rostedt, Andi Kleen,
	sergey.senozhatsky, linux-kernel, akpm, kexec

On Tue 2018-01-30 17:07:29, Dave Young wrote:
> On 01/30/18 at 05:50pm, Sergey Senozhatsky wrote:
> > On (01/27/18 12:11), Dave Young wrote:
> > > It is useful to print kdump kernel loaded status in dump_stack() 
> > > especially when panic happens so that we can differenciate 
> > > kdump kernel early hang and a normal panic in a bug report.
> > > 
> > > Signed-off-by: Dave Young <dyoung@redhat.com>
> > 
> > Looks OK to me.
> > 
> > Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>

Same here:

Reviewed-by: Petr Mladek <pmladek@suse.com>

> > I agree with Steven, would be better to move the whole thing
> > to lib/dump_stack.c
> 
> If nobody has plan I can put it in my todo list, probably do it next
> week.

Sounds good.

JFYI, I would target these changes for 4.17. There was some discussion
about where and how to show the new information. IMHO, it would deserve
some gurgling in linux-next.

Best Regards,
Petr

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

* Re: [PATCH V2] print kdump kernel loaded status in stack dump
@ 2018-01-30  9:36       ` Petr Mladek
  0 siblings, 0 replies; 10+ messages in thread
From: Petr Mladek @ 2018-01-30  9:36 UTC (permalink / raw)
  To: Dave Young
  Cc: Andi Kleen, Sergey Senozhatsky, kexec, linux-kernel,
	Steven Rostedt, sergey.senozhatsky, akpm

On Tue 2018-01-30 17:07:29, Dave Young wrote:
> On 01/30/18 at 05:50pm, Sergey Senozhatsky wrote:
> > On (01/27/18 12:11), Dave Young wrote:
> > > It is useful to print kdump kernel loaded status in dump_stack() 
> > > especially when panic happens so that we can differenciate 
> > > kdump kernel early hang and a normal panic in a bug report.
> > > 
> > > Signed-off-by: Dave Young <dyoung@redhat.com>
> > 
> > Looks OK to me.
> > 
> > Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>

Same here:

Reviewed-by: Petr Mladek <pmladek@suse.com>

> > I agree with Steven, would be better to move the whole thing
> > to lib/dump_stack.c
> 
> If nobody has plan I can put it in my todo list, probably do it next
> week.

Sounds good.

JFYI, I would target these changes for 4.17. There was some discussion
about where and how to show the new information. IMHO, it would deserve
some gurgling in linux-next.

Best Regards,
Petr

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

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

* Re: [PATCH V2] print kdump kernel loaded status in stack dump
  2018-01-27  4:11 ` Dave Young
@ 2018-01-31 12:39   ` Simon Horman
  -1 siblings, 0 replies; 10+ messages in thread
From: Simon Horman @ 2018-01-31 12:39 UTC (permalink / raw)
  To: Dave Young
  Cc: Petr Mladek, Steven Rostedt, Andi Kleen, sergey.senozhatsky,
	akpm, kexec, linux-kernel

On Sat, Jan 27, 2018 at 12:11:29PM +0800, Dave Young wrote:
> It is useful to print kdump kernel loaded status in dump_stack() 
> especially when panic happens so that we can differenciate 
> kdump kernel early hang and a normal panic in a bug report.
> 
> Signed-off-by: Dave Young <dyoung@redhat.com>

Reviewed-by: Simon Horman <horms+renesas@verge.net.au>

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

* Re: [PATCH V2] print kdump kernel loaded status in stack dump
@ 2018-01-31 12:39   ` Simon Horman
  0 siblings, 0 replies; 10+ messages in thread
From: Simon Horman @ 2018-01-31 12:39 UTC (permalink / raw)
  To: Dave Young
  Cc: Petr Mladek, Andi Kleen, kexec, linux-kernel, Steven Rostedt,
	sergey.senozhatsky, akpm

On Sat, Jan 27, 2018 at 12:11:29PM +0800, Dave Young wrote:
> It is useful to print kdump kernel loaded status in dump_stack() 
> especially when panic happens so that we can differenciate 
> kdump kernel early hang and a normal panic in a bug report.
> 
> Signed-off-by: Dave Young <dyoung@redhat.com>

Reviewed-by: Simon Horman <horms+renesas@verge.net.au>


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

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

end of thread, other threads:[~2018-01-31 12:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-27  4:11 [PATCH V2] print kdump kernel loaded status in stack dump Dave Young
2018-01-27  4:11 ` Dave Young
2018-01-30  8:50 ` Sergey Senozhatsky
2018-01-30  8:50   ` Sergey Senozhatsky
2018-01-30  9:07   ` Dave Young
2018-01-30  9:07     ` Dave Young
2018-01-30  9:36     ` Petr Mladek
2018-01-30  9:36       ` Petr Mladek
2018-01-31 12:39 ` Simon Horman
2018-01-31 12:39   ` Simon Horman

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.