Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1455479
| From | Steven Rostedt <rostedt@goodmis.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 05/19] x86/dumpstack: fix function graph tracing stack dump reliability issues |
| Date | 2016-08-02 23:20 +0200 |
| Message-ID | <s1Pgt-1Bc-7@gated-at.bofh.it> (permalink) |
| References | (4 earlier) <s0sch-4Rx-1@gated-at.bofh.it> <s0CY1-3f0-1@gated-at.bofh.it> <s1mo9-7tr-1@gated-at.bofh.it> <s1ntU-88a-23@gated-at.bofh.it> <s1P6N-1xu-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, 2 Aug 2016 16:00:11 -0500 Josh Poimboeuf <jpoimboe@redhat.com> wrote: [<ffffffff81061d8b>] nmi_raise_cpu_backtrace+0x1b/0x20 > > The ret_stack is out of sync with the stack dump because the stack dump > was started with the regs from the NMI, instead of being started from > the current frame. > > So I guess there are a couple of ways to fix it: > > a) keep track of the return address pointer like we discussed above; > > or > > b) have the unwinder count the # of skipped frames which refer to > 'return_to_handler', and pass that as the initial index value to > ftrace_graph_ret_addr(). > > Option a) would be much cleaner. But to fix it for both mcount and > fentry, we couldn't override 'fp' so I guess we'd need to add a new > field to ftrace_ret_stack. Actually, what about calling ftrace_graph_ret_addr() to figure out the next stack conversion only if reliable or CONFIG_FRAME_POINTER is not enabled? unsigned long real_addr = addr; [...] if (!IS_ENABLED(CONFIG_FRAME_POINTER) || reliable) real_addr = ftrace_graph_ret_addr(task, graph, addr); if (addr != real_addr) ops->address(data, addr, 0); ops->address(data, real_addr, reliable); Then we only need the fp use case when FRAME_POINTER is not set. As mcount forces FRAME_POINTER, we only need to worry about the fentry case. -- Steve > > Option b) is uglier, but I could probably make it work with the new > unwinder. >
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH 05/19] x86/dumpstack: fix function graph tracing stack dump reliability issues Steven Rostedt <rostedt@goodmis.org> - 2016-07-30 01:00 +0200
Re: [PATCH 05/19] x86/dumpstack: fix function graph tracing stack dump reliability issues Josh Poimboeuf <jpoimboe@redhat.com> - 2016-07-30 03:00 +0200
Re: [PATCH 05/19] x86/dumpstack: fix function graph tracing stack dump reliability issues Steven Rostedt <rostedt@goodmis.org> - 2016-07-30 04:30 +0200
Re: [PATCH 05/19] x86/dumpstack: fix function graph tracing stack dump reliability issues Josh Poimboeuf <jpoimboe@redhat.com> - 2016-07-30 16:00 +0200
Re: [PATCH 05/19] x86/dumpstack: fix function graph tracing stack dump reliability issues Steven Rostedt <rostedt@goodmis.org> - 2016-08-01 16:30 +0200
Re: [PATCH 05/19] x86/dumpstack: fix function graph tracing stack dump reliability issues Josh Poimboeuf <jpoimboe@redhat.com> - 2016-08-01 17:40 +0200
Re: [PATCH 05/19] x86/dumpstack: fix function graph tracing stack dump reliability issues Josh Poimboeuf <jpoimboe@redhat.com> - 2016-08-02 23:10 +0200
Re: [PATCH 05/19] x86/dumpstack: fix function graph tracing stack dump reliability issues Steven Rostedt <rostedt@goodmis.org> - 2016-08-02 23:20 +0200
Re: [PATCH 05/19] x86/dumpstack: fix function graph tracing stack dump reliability issues Josh Poimboeuf <jpoimboe@redhat.com> - 2016-08-03 00:20 +0200
Re: [PATCH 05/19] x86/dumpstack: fix function graph tracing stack dump reliability issues Steven Rostedt <rostedt@goodmis.org> - 2016-08-03 01:20 +0200
Re: [PATCH 05/19] x86/dumpstack: fix function graph tracing stack dump reliability issues Josh Poimboeuf <jpoimboe@redhat.com> - 2016-08-03 04:10 +0200
Re: [PATCH 05/19] x86/dumpstack: fix function graph tracing stack dump reliability issues Steven Rostedt <rostedt@goodmis.org> - 2016-08-03 04:40 +0200
Re: [PATCH 05/19] x86/dumpstack: fix function graph tracing stack dump reliability issues Josh Poimboeuf <jpoimboe@redhat.com> - 2016-08-03 05:00 +0200
Re: [PATCH 05/19] x86/dumpstack: fix function graph tracing stack dump reliability issues Steven Rostedt <rostedt@goodmis.org> - 2016-08-03 05:10 +0200
Re: [PATCH 05/19] x86/dumpstack: fix function graph tracing stack dump reliability issues Josh Poimboeuf <jpoimboe@redhat.com> - 2016-08-03 05:20 +0200
Re: [PATCH 05/19] x86/dumpstack: fix function graph tracing stack dump reliability issues Steven Rostedt <rostedt@goodmis.org> - 2016-08-03 05:30 +0200
Re: [PATCH 05/19] x86/dumpstack: fix function graph tracing stack dump reliability issues Josh Poimboeuf <jpoimboe@redhat.com> - 2016-08-03 05:40 +0200
Re: [PATCH 05/19] x86/dumpstack: fix function graph tracing stack dump reliability issues Steven Rostedt <rostedt@goodmis.org> - 2016-08-03 05:50 +0200
Re: [PATCH 05/19] x86/dumpstack: fix function graph tracing stack dump reliability issues Josh Poimboeuf <jpoimboe@redhat.com> - 2016-08-03 16:30 +0200
Re: [PATCH 05/19] x86/dumpstack: fix function graph tracing stack dump reliability issues Steven Rostedt <rostedt@goodmis.org> - 2016-08-03 05:40 +0200
Re: [PATCH 05/19] x86/dumpstack: fix function graph tracing stack dump reliability issues Josh Poimboeuf <jpoimboe@redhat.com> - 2016-08-03 05:40 +0200
Re: [PATCH 05/19] x86/dumpstack: fix function graph tracing stack dump reliability issues Josh Poimboeuf <jpoimboe@redhat.com> - 2016-08-01 18:20 +0200
Re: [PATCH 05/19] x86/dumpstack: fix function graph tracing stack dump reliability issues Steven Rostedt <rostedt@goodmis.org> - 2016-08-01 18:20 +0200
Re: [PATCH 05/19] x86/dumpstack: fix function graph tracing stack dump reliability issues Josh Poimboeuf <jpoimboe@redhat.com> - 2016-08-01 18:40 +0200
Re: [PATCH 05/19] x86/dumpstack: fix function graph tracing stack dump reliability issues Steven Rostedt <rostedt@goodmis.org> - 2016-08-01 19:00 +0200
Re: [PATCH 05/19] x86/dumpstack: fix function graph tracing stack dump reliability issues Josh Poimboeuf <jpoimboe@redhat.com> - 2016-08-01 18:50 +0200
csiph-web