Re: [PATCH 02/16] x86/dumpstack: Add get_stack_info() support for the SYSENTER stack

2017-11-20 Thread Josh Poimboeuf
On Mon, Nov 20, 2017 at 05:39:34PM -0800, Andy Lutomirski wrote: > On Mon, Nov 20, 2017 at 1:55 PM, Josh Poimboeuf wrote: > > On Mon, Nov 20, 2017 at 01:30:12PM -0800, Andy Lutomirski wrote: > >> On Mon, Nov 20, 2017 at 1:27 PM, Josh Poimboeuf > >>

Re: [PATCH 02/16] x86/dumpstack: Add get_stack_info() support for the SYSENTER stack

2017-11-20 Thread Josh Poimboeuf
On Mon, Nov 20, 2017 at 05:39:34PM -0800, Andy Lutomirski wrote: > On Mon, Nov 20, 2017 at 1:55 PM, Josh Poimboeuf wrote: > > On Mon, Nov 20, 2017 at 01:30:12PM -0800, Andy Lutomirski wrote: > >> On Mon, Nov 20, 2017 at 1:27 PM, Josh Poimboeuf > >> wrote: > >> > On Mon, Nov 20, 2017 at

Re: [PATCH 02/16] x86/dumpstack: Add get_stack_info() support for the SYSENTER stack

2017-11-20 Thread Andy Lutomirski
On Mon, Nov 20, 2017 at 1:55 PM, Josh Poimboeuf wrote: > On Mon, Nov 20, 2017 at 01:30:12PM -0800, Andy Lutomirski wrote: >> On Mon, Nov 20, 2017 at 1:27 PM, Josh Poimboeuf wrote: >> > On Mon, Nov 20, 2017 at 01:07:16PM -0800, Andy Lutomirski wrote: >>

Re: [PATCH 02/16] x86/dumpstack: Add get_stack_info() support for the SYSENTER stack

2017-11-20 Thread Andy Lutomirski
On Mon, Nov 20, 2017 at 1:55 PM, Josh Poimboeuf wrote: > On Mon, Nov 20, 2017 at 01:30:12PM -0800, Andy Lutomirski wrote: >> On Mon, Nov 20, 2017 at 1:27 PM, Josh Poimboeuf wrote: >> > On Mon, Nov 20, 2017 at 01:07:16PM -0800, Andy Lutomirski wrote: >> >> >> but, more importantly, the OOPS

Re: [PATCH 02/16] x86/dumpstack: Add get_stack_info() support for the SYSENTER stack

2017-11-20 Thread Josh Poimboeuf
On Mon, Nov 20, 2017 at 01:30:12PM -0800, Andy Lutomirski wrote: > On Mon, Nov 20, 2017 at 1:27 PM, Josh Poimboeuf wrote: > > On Mon, Nov 20, 2017 at 01:07:16PM -0800, Andy Lutomirski wrote: > >> >> but, more importantly, the OOPS unwinder will just bail without this > >> >>

Re: [PATCH 02/16] x86/dumpstack: Add get_stack_info() support for the SYSENTER stack

2017-11-20 Thread Josh Poimboeuf
On Mon, Nov 20, 2017 at 01:30:12PM -0800, Andy Lutomirski wrote: > On Mon, Nov 20, 2017 at 1:27 PM, Josh Poimboeuf wrote: > > On Mon, Nov 20, 2017 at 01:07:16PM -0800, Andy Lutomirski wrote: > >> >> but, more importantly, the OOPS unwinder will just bail without this > >> >> patch. With the

Re: [PATCH 02/16] x86/dumpstack: Add get_stack_info() support for the SYSENTER stack

2017-11-20 Thread Andy Lutomirski
On Mon, Nov 20, 2017 at 1:27 PM, Josh Poimboeuf wrote: > On Mon, Nov 20, 2017 at 01:07:16PM -0800, Andy Lutomirski wrote: >> >> but, more importantly, the OOPS unwinder will just bail without this >> >> patch. With the patch, we get a valid unwind, except that everything >>

Re: [PATCH 02/16] x86/dumpstack: Add get_stack_info() support for the SYSENTER stack

2017-11-20 Thread Andy Lutomirski
On Mon, Nov 20, 2017 at 1:27 PM, Josh Poimboeuf wrote: > On Mon, Nov 20, 2017 at 01:07:16PM -0800, Andy Lutomirski wrote: >> >> but, more importantly, the OOPS unwinder will just bail without this >> >> patch. With the patch, we get a valid unwind, except that everything >> >> has a ? in front.

Re: [PATCH 02/16] x86/dumpstack: Add get_stack_info() support for the SYSENTER stack

2017-11-20 Thread Josh Poimboeuf
On Mon, Nov 20, 2017 at 01:07:16PM -0800, Andy Lutomirski wrote: > >> but, more importantly, the OOPS unwinder will just bail without this > >> patch. With the patch, we get a valid unwind, except that everything > >> has a ? in front. > > > > Hm. I can't even fathom how that's possible. Are

Re: [PATCH 02/16] x86/dumpstack: Add get_stack_info() support for the SYSENTER stack

2017-11-20 Thread Josh Poimboeuf
On Mon, Nov 20, 2017 at 01:07:16PM -0800, Andy Lutomirski wrote: > >> but, more importantly, the OOPS unwinder will just bail without this > >> patch. With the patch, we get a valid unwind, except that everything > >> has a ? in front. > > > > Hm. I can't even fathom how that's possible. Are

Re: [PATCH 02/16] x86/dumpstack: Add get_stack_info() support for the SYSENTER stack

2017-11-20 Thread Andy Lutomirski
On Mon, Nov 20, 2017 at 1:00 PM, Josh Poimboeuf wrote: > On Mon, Nov 20, 2017 at 12:46:13PM -0800, Andy Lutomirski wrote: >> On Mon, Nov 20, 2017 at 12:42 PM, Josh Poimboeuf wrote: >> > On Mon, Nov 20, 2017 at 09:07:33AM -0800, Andy Lutomirski wrote: >>

Re: [PATCH 02/16] x86/dumpstack: Add get_stack_info() support for the SYSENTER stack

2017-11-20 Thread Andy Lutomirski
On Mon, Nov 20, 2017 at 1:00 PM, Josh Poimboeuf wrote: > On Mon, Nov 20, 2017 at 12:46:13PM -0800, Andy Lutomirski wrote: >> On Mon, Nov 20, 2017 at 12:42 PM, Josh Poimboeuf wrote: >> > On Mon, Nov 20, 2017 at 09:07:33AM -0800, Andy Lutomirski wrote: >> >> +bool in_SYSENTER_stack(unsigned long

Re: [PATCH 02/16] x86/dumpstack: Add get_stack_info() support for the SYSENTER stack

2017-11-20 Thread Josh Poimboeuf
On Mon, Nov 20, 2017 at 12:46:13PM -0800, Andy Lutomirski wrote: > On Mon, Nov 20, 2017 at 12:42 PM, Josh Poimboeuf wrote: > > On Mon, Nov 20, 2017 at 09:07:33AM -0800, Andy Lutomirski wrote: > >> +bool in_SYSENTER_stack(unsigned long *stack, struct stack_info *info) > > > >

Re: [PATCH 02/16] x86/dumpstack: Add get_stack_info() support for the SYSENTER stack

2017-11-20 Thread Josh Poimboeuf
On Mon, Nov 20, 2017 at 12:46:13PM -0800, Andy Lutomirski wrote: > On Mon, Nov 20, 2017 at 12:42 PM, Josh Poimboeuf wrote: > > On Mon, Nov 20, 2017 at 09:07:33AM -0800, Andy Lutomirski wrote: > >> +bool in_SYSENTER_stack(unsigned long *stack, struct stack_info *info) > > > > Can you make it

Re: [PATCH 02/16] x86/dumpstack: Add get_stack_info() support for the SYSENTER stack

2017-11-20 Thread Andy Lutomirski
On Mon, Nov 20, 2017 at 12:42 PM, Josh Poimboeuf wrote: > On Mon, Nov 20, 2017 at 09:07:33AM -0800, Andy Lutomirski wrote: >> +bool in_SYSENTER_stack(unsigned long *stack, struct stack_info *info) > > Can you make it lowercase for consistency with the other in_*_stack() >

Re: [PATCH 02/16] x86/dumpstack: Add get_stack_info() support for the SYSENTER stack

2017-11-20 Thread Andy Lutomirski
On Mon, Nov 20, 2017 at 12:42 PM, Josh Poimboeuf wrote: > On Mon, Nov 20, 2017 at 09:07:33AM -0800, Andy Lutomirski wrote: >> +bool in_SYSENTER_stack(unsigned long *stack, struct stack_info *info) > > Can you make it lowercase for consistency with the other in_*_stack() > functions? For example,

Re: [PATCH 02/16] x86/dumpstack: Add get_stack_info() support for the SYSENTER stack

2017-11-20 Thread Josh Poimboeuf
On Mon, Nov 20, 2017 at 09:07:33AM -0800, Andy Lutomirski wrote: > +bool in_SYSENTER_stack(unsigned long *stack, struct stack_info *info) Can you make it lowercase for consistency with the other in_*_stack() functions? For example, in_irq_stack() is all lowercase even though "IRQ" is normally

Re: [PATCH 02/16] x86/dumpstack: Add get_stack_info() support for the SYSENTER stack

2017-11-20 Thread Josh Poimboeuf
On Mon, Nov 20, 2017 at 09:07:33AM -0800, Andy Lutomirski wrote: > +bool in_SYSENTER_stack(unsigned long *stack, struct stack_info *info) Can you make it lowercase for consistency with the other in_*_stack() functions? For example, in_irq_stack() is all lowercase even though "IRQ" is normally

[PATCH 02/16] x86/dumpstack: Add get_stack_info() support for the SYSENTER stack

2017-11-20 Thread Andy Lutomirski
get_stack_info() doesn't currently know about the SYSENTER stack, so unwinding will fail if we entered the kernel on the SYSENTER stack and haven't fully switched off. Teach get_stack_info() about the SYSENTER stack. Signed-off-by: Andy Lutomirski ---

[PATCH 02/16] x86/dumpstack: Add get_stack_info() support for the SYSENTER stack

2017-11-20 Thread Andy Lutomirski
get_stack_info() doesn't currently know about the SYSENTER stack, so unwinding will fail if we entered the kernel on the SYSENTER stack and haven't fully switched off. Teach get_stack_info() about the SYSENTER stack. Signed-off-by: Andy Lutomirski --- arch/x86/include/asm/stacktrace.h | 3 +++