Messages in this thread | | | Subject | Re: [RFC] improve_stack: make stack dump output useful again | From | Joe Perches <> | Date | Sun, 23 Feb 2014 12:44:48 -0800 |
| |
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.
| |