Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1469685
| From | Joe Perches <joe@perches.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/6] x86/dumpstack: make printk_stack_address() more generally useful |
| Date | 2016-08-24 22:10 +0200 |
| Message-ID | <s9MEN-7el-23@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <s9JGV-4Wy-5@gated-at.bofh.it> <s9K9X-5nv-3@gated-at.bofh.it> <s9Lpn-69M-17@gated-at.bofh.it> <s9LSp-6Bj-21@gated-at.bofh.it> <s9M25-6H2-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, 2016-08-24 at 14:24 -0500, Josh Poimboeuf wrote: > On Wed, Aug 24, 2016 at 12:07:06PM -0700, Joe Perches wrote: > > On Wed, 2016-08-24 at 13:43 -0500, Josh Poimboeuf wrote: > > > On Wed, Aug 24, 2016 at 10:28:38AM -0700, Joe Perches wrote: > > > > On Wed, 2016-08-24 at 11:50 -0500, Josh Poimboeuf wrote: > > > > > Change printk_stack_address() to be useful when called by an unwinder > > > > > outside the context of dump_trace(). > > > > > > > > > > Specifically: > > > > > > > > > > - printk_stack_address()'s 'data' argument is always used as the log > > > > > level string. Make that explicit. > > [] > > > > If this is true, and I'm not sure it is as I believe > > > > there are static strings emitted like EOE and IRQ, > > > > shouldn't this bubble up through the calling tree? > > > [] > > > This function needs to keep its 'void *data' argument because it's a > > > callback for stacktrace_ops, so it has to conform to the callback > > > interface. 'data' is used for passing a pointer to an opaque data > > > structure to the callback. > > > > > > Also this is the only caller of printk_stack_address(), so there's > > > nowhere else to bubble it up to. > > And that shows that print_stack_address(data is not always a log level. > > ie: walk_stack uses it to print a string not a log level. > Hm, can you be more specific? As far as I can tell, here's the only > possible call path to print_trace_address() and printk_stack_address(): > > show_trace_log_lvl() > dump_trace() // ops is print_trace_op > print_context_stack() // ops->walk_stack > print_trace_address() // ops->address > printk_stack_address() > > So 'data' is a sneaky way to pass 'log_lvl' from show_trace_log_lvl() to > print_trace_address(), without dump_trace() and print_context_stack() > knowing what it is, because they're used in other places where 'data' > means something else. hmm, perhaps I got lost in a twisting maze of little callbacks. I'll drop some stuff and see where I am next time.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 3/6] x86/dumpstack: make printk_stack_address() more generally useful Josh Poimboeuf <jpoimboe@redhat.com> - 2016-08-24 19:00 +0200
Re: [PATCH 3/6] x86/dumpstack: make printk_stack_address() more generally useful Joe Perches <joe@perches.com> - 2016-08-24 19:30 +0200
Re: [PATCH 3/6] x86/dumpstack: make printk_stack_address() more generally useful Josh Poimboeuf <jpoimboe@redhat.com> - 2016-08-24 20:50 +0200
Re: [PATCH 3/6] x86/dumpstack: make printk_stack_address() more generally useful Joe Perches <joe@perches.com> - 2016-08-24 21:20 +0200
Re: [PATCH 3/6] x86/dumpstack: make printk_stack_address() more generally useful Josh Poimboeuf <jpoimboe@redhat.com> - 2016-08-24 21:30 +0200
Re: [PATCH 3/6] x86/dumpstack: make printk_stack_address() more generally useful Joe Perches <joe@perches.com> - 2016-08-24 22:10 +0200
Re: [PATCH 3/6] x86/dumpstack: make printk_stack_address() more generally useful Linus Torvalds <torvalds@linux-foundation.org> - 2016-08-24 20:40 +0200
Re: [PATCH 3/6] x86/dumpstack: make printk_stack_address() more generally useful Josh Poimboeuf <jpoimboe@redhat.com> - 2016-08-24 21:50 +0200
Re: [PATCH 3/6] x86/dumpstack: make printk_stack_address() more generally useful Josh Poimboeuf <jpoimboe@redhat.com> - 2016-08-25 19:50 +0200
Re: [PATCH 3/6] x86/dumpstack: make printk_stack_address() more generally useful Kees Cook <keescook@chromium.org> - 2016-08-25 23:00 +0200
Re: [PATCH 3/6] x86/dumpstack: make printk_stack_address() more generally useful Josh Poimboeuf <jpoimboe@redhat.com> - 2016-08-25 23:10 +0200
Re: [PATCH 3/6] x86/dumpstack: make printk_stack_address() more generally useful Kees Cook <keescook@chromium.org> - 2016-08-26 04:30 +0200
Re: [PATCH 3/6] x86/dumpstack: make printk_stack_address() more generally useful Josh Poimboeuf <jpoimboe@redhat.com> - 2016-08-26 05:30 +0200
Re: [PATCH 3/6] x86/dumpstack: make printk_stack_address() more generally useful Linus Torvalds <torvalds@linux-foundation.org> - 2016-08-26 06:50 +0200
Re: [PATCH 3/6] x86/dumpstack: make printk_stack_address() more generally useful Josh Poimboeuf <jpoimboe@redhat.com> - 2016-08-26 08:00 +0200
Re: [PATCH 3/6] x86/dumpstack: make printk_stack_address() more generally useful Josh Poimboeuf <jpoimboe@redhat.com> - 2016-08-26 15:40 +0200
Re: [PATCH 3/6] x86/dumpstack: make printk_stack_address() more generally useful Josh Poimboeuf <jpoimboe@redhat.com> - 2016-08-31 19:00 +0200
Re: [PATCH 3/6] x86/dumpstack: make printk_stack_address() more generally useful Linus Torvalds <torvalds@linux-foundation.org> - 2016-08-31 19:20 +0200
Re: [PATCH 3/6] x86/dumpstack: make printk_stack_address() more generally useful Josh Poimboeuf <jpoimboe@redhat.com> - 2016-09-01 15:10 +0200
Re: [PATCH 3/6] x86/dumpstack: make printk_stack_address() more generally useful Linus Torvalds <torvalds@linux-foundation.org> - 2016-09-01 18:40 +0200
Re: [PATCH 3/6] x86/dumpstack: make printk_stack_address() more generally useful Peter Zijlstra <peterz@infradead.org> - 2016-08-24 20:50 +0200
Re: [PATCH 3/6] x86/dumpstack: make printk_stack_address() more generally useful Linus Torvalds <torvalds@linux-foundation.org> - 2016-08-24 21:20 +0200
[tip:x86/asm] x86/dumpstack: Make printk_stack_address() more generally useful tip-bot for Josh Poimboeuf <tipbot@zytor.com> - 2016-09-08 12:00 +0200
csiph-web