Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-30 Thread Josh Poimboeuf
On Fri, Jun 30, 2017 at 08:56:09AM -0700, Andy Lutomirski wrote: > On Fri, Jun 30, 2017 at 8:55 AM, Josh Poimboeuf wrote: > > On Fri, Jun 30, 2017 at 08:44:40AM -0700, Andy Lutomirski wrote: > >> > A few comments about the first patch: > >> > > >> > > >> >

Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-30 Thread Josh Poimboeuf
On Fri, Jun 30, 2017 at 08:56:09AM -0700, Andy Lutomirski wrote: > On Fri, Jun 30, 2017 at 8:55 AM, Josh Poimboeuf wrote: > > On Fri, Jun 30, 2017 at 08:44:40AM -0700, Andy Lutomirski wrote: > >> > A few comments about the first patch: > >> > > >> > > >> >

Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-30 Thread Andy Lutomirski
On Fri, Jun 30, 2017 at 8:55 AM, Josh Poimboeuf wrote: > On Fri, Jun 30, 2017 at 08:44:40AM -0700, Andy Lutomirski wrote: >> > A few comments about the first patch: >> > >> > >> >

Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-30 Thread Andy Lutomirski
On Fri, Jun 30, 2017 at 8:55 AM, Josh Poimboeuf wrote: > On Fri, Jun 30, 2017 at 08:44:40AM -0700, Andy Lutomirski wrote: >> > A few comments about the first patch: >> > >> > >> >

Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-30 Thread Josh Poimboeuf
On Fri, Jun 30, 2017 at 08:44:40AM -0700, Andy Lutomirski wrote: > > A few comments about the first patch: > > > > > > https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/commit/?h=x86/entry_irq_stack=3e2aa2102cc1c5e60d4a8637bff78d0478a55059 > > > > - It uses a '693:' label instead

Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-30 Thread Josh Poimboeuf
On Fri, Jun 30, 2017 at 08:44:40AM -0700, Andy Lutomirski wrote: > > A few comments about the first patch: > > > > > > https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/commit/?h=x86/entry_irq_stack=3e2aa2102cc1c5e60d4a8637bff78d0478a55059 > > > > - It uses a '693:' label instead

Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-30 Thread Andy Lutomirski
On Fri, Jun 30, 2017 at 6:11 AM, Josh Poimboeuf wrote: > On Thu, Jun 29, 2017 at 10:41:44PM -0700, Andy Lutomirski wrote: >> On Thu, Jun 29, 2017 at 10:05 PM, Andy Lutomirski wrote: >> > Hmm. There's another option that might be considerably nicer, though:

Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-30 Thread Andy Lutomirski
On Fri, Jun 30, 2017 at 6:11 AM, Josh Poimboeuf wrote: > On Thu, Jun 29, 2017 at 10:41:44PM -0700, Andy Lutomirski wrote: >> On Thu, Jun 29, 2017 at 10:05 PM, Andy Lutomirski wrote: >> > Hmm. There's another option that might be considerably nicer, though: >> > put the IRQ stack at a known (at

Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-30 Thread Josh Poimboeuf
On Thu, Jun 29, 2017 at 10:41:44PM -0700, Andy Lutomirski wrote: > On Thu, Jun 29, 2017 at 10:05 PM, Andy Lutomirski wrote: > > Hmm. There's another option that might be considerably nicer, though: > > put the IRQ stack at a known (at link time) position *in percpu > > space*.

Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-30 Thread Josh Poimboeuf
On Thu, Jun 29, 2017 at 10:41:44PM -0700, Andy Lutomirski wrote: > On Thu, Jun 29, 2017 at 10:05 PM, Andy Lutomirski wrote: > > Hmm. There's another option that might be considerably nicer, though: > > put the IRQ stack at a known (at link time) position *in percpu > > space*. (Presumably it

Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-29 Thread Andy Lutomirski
On Thu, Jun 29, 2017 at 10:05 PM, Andy Lutomirski wrote: > Hmm. There's another option that might be considerably nicer, though: > put the IRQ stack at a known (at link time) position *in percpu > space*. (Presumably it already is -- I haven't checked.) Then we do: > > .macro

Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-29 Thread Andy Lutomirski
On Thu, Jun 29, 2017 at 10:05 PM, Andy Lutomirski wrote: > Hmm. There's another option that might be considerably nicer, though: > put the IRQ stack at a known (at link time) position *in percpu > space*. (Presumably it already is -- I haven't checked.) Then we do: > > .macro ENTER_IRQ_STACK

Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-29 Thread Andy Lutomirski
On Thu, Jun 29, 2017 at 7:12 PM, Josh Poimboeuf wrote: > On Thu, Jun 29, 2017 at 03:59:04PM -0700, Andy Lutomirski wrote: >> > >> > Sorry, I didn't explain it very well. Undwarf can find the regs pointer >> > in rdi, it just doesn't trust its value. >> > >> > See the

Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-29 Thread Andy Lutomirski
On Thu, Jun 29, 2017 at 7:12 PM, Josh Poimboeuf wrote: > On Thu, Jun 29, 2017 at 03:59:04PM -0700, Andy Lutomirski wrote: >> > >> > Sorry, I didn't explain it very well. Undwarf can find the regs pointer >> > in rdi, it just doesn't trust its value. >> > >> > See the stack_info.next_sp field,

Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-29 Thread Josh Poimboeuf
On Thu, Jun 29, 2017 at 03:59:04PM -0700, Andy Lutomirski wrote: > > On Jun 29, 2017, at 2:41 PM, Josh Poimboeuf wrote: > >> On Thu, Jun 29, 2017 at 02:09:54PM -0700, Andy Lutomirski wrote: > >>> On Thu, Jun 29, 2017 at 12:05 PM, Josh Poimboeuf > >>>

Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-29 Thread Josh Poimboeuf
On Thu, Jun 29, 2017 at 03:59:04PM -0700, Andy Lutomirski wrote: > > On Jun 29, 2017, at 2:41 PM, Josh Poimboeuf wrote: > >> On Thu, Jun 29, 2017 at 02:09:54PM -0700, Andy Lutomirski wrote: > >>> On Thu, Jun 29, 2017 at 12:05 PM, Josh Poimboeuf > >>> wrote: > On Thu, Jun 29, 2017 at

Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-29 Thread Andy Lutomirski
--Andy > On Jun 29, 2017, at 2:41 PM, Josh Poimboeuf wrote: > >> On Thu, Jun 29, 2017 at 02:09:54PM -0700, Andy Lutomirski wrote: >>> On Thu, Jun 29, 2017 at 12:05 PM, Josh Poimboeuf >>> wrote: On Thu, Jun 29, 2017 at 11:50:18AM -0700, Andy

Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-29 Thread Andy Lutomirski
--Andy > On Jun 29, 2017, at 2:41 PM, Josh Poimboeuf wrote: > >> On Thu, Jun 29, 2017 at 02:09:54PM -0700, Andy Lutomirski wrote: >>> On Thu, Jun 29, 2017 at 12:05 PM, Josh Poimboeuf >>> wrote: On Thu, Jun 29, 2017 at 11:50:18AM -0700, Andy Lutomirski wrote: > On Thu, Jun 29, 2017

Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-29 Thread Josh Poimboeuf
On Thu, Jun 29, 2017 at 02:09:54PM -0700, Andy Lutomirski wrote: > On Thu, Jun 29, 2017 at 12:05 PM, Josh Poimboeuf wrote: > > On Thu, Jun 29, 2017 at 11:50:18AM -0700, Andy Lutomirski wrote: > >> On Thu, Jun 29, 2017 at 10:53 AM, Josh Poimboeuf > >>

Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-29 Thread Josh Poimboeuf
On Thu, Jun 29, 2017 at 02:09:54PM -0700, Andy Lutomirski wrote: > On Thu, Jun 29, 2017 at 12:05 PM, Josh Poimboeuf wrote: > > On Thu, Jun 29, 2017 at 11:50:18AM -0700, Andy Lutomirski wrote: > >> On Thu, Jun 29, 2017 at 10:53 AM, Josh Poimboeuf > >> wrote: > >> > There's a bug here that will

Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-29 Thread Andy Lutomirski
On Thu, Jun 29, 2017 at 12:05 PM, Josh Poimboeuf wrote: > On Thu, Jun 29, 2017 at 11:50:18AM -0700, Andy Lutomirski wrote: >> On Thu, Jun 29, 2017 at 10:53 AM, Josh Poimboeuf wrote: >> > There's a bug here that will need a small change to the entry code.

Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-29 Thread Andy Lutomirski
On Thu, Jun 29, 2017 at 12:05 PM, Josh Poimboeuf wrote: > On Thu, Jun 29, 2017 at 11:50:18AM -0700, Andy Lutomirski wrote: >> On Thu, Jun 29, 2017 at 10:53 AM, Josh Poimboeuf wrote: >> > There's a bug here that will need a small change to the entry code. >> > >> > Mike Galbraith reported: >> >

Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-29 Thread Josh Poimboeuf
On Thu, Jun 29, 2017 at 11:50:18AM -0700, Andy Lutomirski wrote: > On Thu, Jun 29, 2017 at 10:53 AM, Josh Poimboeuf wrote: > > There's a bug here that will need a small change to the entry code. > > > > Mike Galbraith reported: > > > > WARNING: can't dereference registers

Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-29 Thread Josh Poimboeuf
On Thu, Jun 29, 2017 at 11:50:18AM -0700, Andy Lutomirski wrote: > On Thu, Jun 29, 2017 at 10:53 AM, Josh Poimboeuf wrote: > > There's a bug here that will need a small change to the entry code. > > > > Mike Galbraith reported: > > > > WARNING: can't dereference registers at c900089d7e08

Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-29 Thread Andy Lutomirski
On Thu, Jun 29, 2017 at 10:53 AM, Josh Poimboeuf wrote: > There's a bug here that will need a small change to the entry code. > > Mike Galbraith reported: > > WARNING: can't dereference registers at c900089d7e08 for ip > 81740bbb > > After some looking I found

Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-29 Thread Andy Lutomirski
On Thu, Jun 29, 2017 at 10:53 AM, Josh Poimboeuf wrote: > There's a bug here that will need a small change to the entry code. > > Mike Galbraith reported: > > WARNING: can't dereference registers at c900089d7e08 for ip > 81740bbb > > After some looking I found that it's caused by

Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-29 Thread Josh Poimboeuf
There's a bug here that will need a small change to the entry code. Mike Galbraith reported: WARNING: can't dereference registers at c900089d7e08 for ip 81740bbb After some looking I found that it's caused by the following code snippet in the 'interrupt' macro in entry_64.S:

Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-29 Thread Josh Poimboeuf
There's a bug here that will need a small change to the entry code. Mike Galbraith reported: WARNING: can't dereference registers at c900089d7e08 for ip 81740bbb After some looking I found that it's caused by the following code snippet in the 'interrupt' macro in entry_64.S:

[PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-28 Thread Josh Poimboeuf
Add unwind hint annotations to entry_64.S. This will enable the undwarf unwinder to unwind through any location in the entry code including syscalls, interrupts, and exceptions. Signed-off-by: Josh Poimboeuf --- arch/x86/entry/Makefile | 1 - arch/x86/entry/calling.h |

[PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-28 Thread Josh Poimboeuf
Add unwind hint annotations to entry_64.S. This will enable the undwarf unwinder to unwind through any location in the entry code including syscalls, interrupts, and exceptions. Signed-off-by: Josh Poimboeuf --- arch/x86/entry/Makefile | 1 - arch/x86/entry/calling.h | 6 +