lkml.org 
[lkml]   [2014]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC] improve_stack: make stack dump output useful again
From
Date
On Sun, 2014-02-23 at 12:27 -0800, Linus Torvalds wrote:
> So I would *really* want to do this kernel change (possibly
> conditional on RANDOMIZE_BASE_ADDRESS or whatever the config variable
> is called):
>
> diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c
> index d9c12d3022a7..58039e728f00 100644
> --- a/arch/x86/kernel/dumpstack.c
> +++ b/arch/x86/kernel/dumpstack.c
> @@ -27,13 +27,12 @@ static int die_counter;
>
> static void printk_stack_address(unsigned long address, int reliable)
> {
> - pr_cont(" [<%p>] %s%pB\n",
> - (void *)address, reliable ? "" : "? ", (void *)address);
> + pr_cont(" %s[<%pB>]\n", reliable ? "" : "? ", (void *)address);
> }
>
> void printk_address(unsigned long address)
> {
> - pr_cont(" [<%p>] %pS\n", (void *)address, (void *)address);
> + pr_cont(" [<%pS>]\n", (void *)address);
> }
>
> #ifdef CONFIG_FUNCTION_GRAPH_TRACER

I'd rather see this as a vsprintf extension so
that it is more difficult to interleave and
doesn't need to be replicated for each arch.




\
 
 \ /
  Last update: 2014-02-23 22:21    [W:0.411 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site