lkml.org 
[lkml]   [2018]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] dump_stack: convert generic dump_stack into a weak symbol
On (03/05/18 15:48), Petr Mladek wrote:
[..]
>
> I hope that I did not miss anything. I could not try this at
> runtime.

I think you can. The rules are universal, you can do on x86
something like this

---

arch/x86/kernel/dumpstack.c | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c
index a2d8a3908670..5d45f406717e 100644
--- a/arch/x86/kernel/dumpstack.c
+++ b/arch/x86/kernel/dumpstack.c
@@ -375,3 +375,16 @@ static int __init code_bytes_setup(char *s)
return 1;
}
__setup("code_bytes=", code_bytes_setup);
+
+void dump_stack(void)
+{
+ dump_stack_print_info(KERN_DEFAULT);
+
+ pr_crit("\t\tLinux\n\n");
+
+ pr_crit("An error has occurred. To continue:\n"
+ "Press Enter to return to Linux, or\n"
+ "Press CTRL+ALT+DEL to restart your computer.\n");
+
+ pr_crit("\n\n\tPress any key to continue _");
+}
---
Should be enough for testing.

> Anyway, from my side:
>
> Reviewed-by: Petr Mladek <pmladek@suse.com>

Thanks.

-ss

\
 
 \ /
  Last update: 2018-03-06 05:30    [W:0.129 / U:0.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site