[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160801162459.2cvfmj7mdedqaoul@treble>
Date: Mon, 1 Aug 2016 11:24:59 -0500
From: Josh Poimboeuf <jpoimboe@...hat.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...nel.org>,
"H . Peter Anvin" <hpa@...or.com>, x86@...nel.org,
linux-kernel@...r.kernel.org,
Andy Lutomirski <luto@...capital.net>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Brian Gerst <brgerst@...il.com>,
Kees Cook <keescook@...omium.org>,
Peter Zijlstra <peterz@...radead.org>,
Frederic Weisbecker <fweisbec@...il.com>,
Byungchul Park <byungchul.park@....com>
Subject: Re: [PATCH 05/19] x86/dumpstack: fix function graph tracing stack
dump reliability issues
On Fri, Jul 29, 2016 at 06:55:21PM -0400, Steven Rostedt wrote:
> > @@ -108,18 +97,23 @@ print_context_stack(struct task_struct *task,
> > stack = (unsigned long *)task_stack_page(task);
> >
> > while (valid_stack_ptr(task, stack, sizeof(*stack), end)) {
> > - unsigned long addr;
> > + unsigned long addr = *stack;
> >
> > addr = *stack;
> > if (__kernel_text_address(addr)) {
> > + int reliable = 0;
> > + unsigned long real_addr;
> > +
> > if ((unsigned long) stack == bp + sizeof(long)) {
> > - ops->address(data, addr, 1);
> > + reliable = 1;
> > frame = frame->next_frame;
> > bp = (unsigned long) frame;
> > - } else {
> > - ops->address(data, addr, 0);
> > }
> > - print_ftrace_graph_addr(addr, data, ops, task, graph);
> > +
> > + real_addr = ftrace_graph_ret_addr(task, graph, addr);
> > + if (addr != real_addr)
> > + ops->address(data, addr, 0);
> > + ops->address(data, real_addr, reliable);
>
> Note this changes behavior, as the original code had the ret_to_handler
> first. This makes it second. (I fixed this below).
Hm, as far as I can tell this actually keeps the original behavior. The
"unreliable" ret_to_handler is still printed first, no?
--
Josh
Powered by blists - more mailing lists