Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1470303
| From | Josh Poimboeuf <jpoimboe@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/6] x86/dumpstack: make printk_stack_address() more generally useful |
| Date | 2016-08-25 19:50 +0200 |
| Message-ID | <sa6WR-44Y-5@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <s9JGV-4Wy-5@gated-at.bofh.it> <s9LfI-66o-17@gated-at.bofh.it> <s9LfI-66o-19@gated-at.bofh.it> <s9LfI-66o-15@gated-at.bofh.it> <s9Mlr-6QO-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Aug 24, 2016 at 02:37:07PM -0500, Josh Poimboeuf wrote: > On Wed, Aug 24, 2016 at 02:37:21PM -0400, Linus Torvalds wrote: > > On Wed, Aug 24, 2016 at 2:22 PM, Peter Zijlstra <peterz@infradead.org> wrote: > > > > > > I actively disable KASLR on my dev box and feed these hex numbers into > > > addr2line -ie vmlinux to find where in the function we are. > > > > > > Having the option to make %pB generate them works for me. > > > > Yeah, considering that this is the only place this is used, changing > > %pB sounds quite reasonable. > > There's now another use of '%pB' in proc_pid_stack() in the tip tree: I > changed it to '%pB' from '%pS'. But I think the modified '%pB' would > work there as well. > > > We could perhaps make %pB show the hex numbers and address (so pB > > would expand to "[<hex>] symbolname".if > > > > (a) not randomizing (so the hex numbers _may_ be useful) > > > > (b) kptr_restrict is 0 (so the hex numbers are "safe" in the dmesg) > > > > and fall back to just the symbolic name if either of those aren't true? > > Do we really need to check for both? '%pK' only checks kptr_restrict. > I'd think we should be consistent with that. And maybe there are some > scenarios where the actual text addresses provide useful debug > information if KASLR is enabled and kptr_restrict is zero. So I was looking at implementing this, and I noticed that '%pK' prints "pK-error" if it's called from interrupt context when kptr_restrict==1. Because checking CAP_SYSLOG would be meaningless in that case. I don't really understand the point of the "pK-error" thing. Any reason why we can't print zero, i.e., just degrade the kptr_restrict from 1 to 2 in an interrupt? That would make the '%pK' code simpler and usable from interrupt context. Also it would make its behavior consistent with the proposed '%pB' changes, and the kptr_restrict code could be shared between '%pK' and '%pB'. Kess (or others), any objections if I make that change? -- Josh
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