Re: [PATCH] x86/stacktrace: Do not access user space memory unnecessarily

2019-07-20 Thread Thomas Gleixner
On Sat, 20 Jul 2019, Thomas Gleixner wrote: > On Sat, 20 Jul 2019, Thomas Gleixner wrote: > > On Fri, 19 Jul 2019, Sean Christopherson wrote: > > > [0.680477] Run /sbin/init as init process > > > [0.682116] init[1]: segfault at 2926a7ef ip 7f98a49d9c30 sp > > > 7fffd83e6af0 error 1

Re: [PATCH] x86/stacktrace: Do not access user space memory unnecessarily

2019-07-19 Thread Thomas Gleixner
On Sat, 20 Jul 2019, Thomas Gleixner wrote: > On Fri, 19 Jul 2019, Sean Christopherson wrote: > > On Tue, Jul 02, 2019 at 01:39:05PM -0400, Steven Rostedt wrote: > > > > I'm hitting a similar panic that bisects to commit > > > > a0d14b8909de ("x86/mm, tracing: Fix CR2 corruption") > > > > exc

Re: [PATCH] x86/stacktrace: Do not access user space memory unnecessarily

2019-07-19 Thread Thomas Gleixner
On Fri, 19 Jul 2019, Sean Christopherson wrote: > On Tue, Jul 02, 2019 at 01:39:05PM -0400, Steven Rostedt wrote: > > I'm hitting a similar panic that bisects to commit > > a0d14b8909de ("x86/mm, tracing: Fix CR2 corruption") > > except I'm experiencing death immediately after starting init. >

Re: [PATCH] x86/stacktrace: Do not access user space memory unnecessarily

2019-07-19 Thread Sean Christopherson
On Tue, Jul 02, 2019 at 01:39:05PM -0400, Steven Rostedt wrote: > On Tue, 2 Jul 2019 11:33:55 -0400 > Steven Rostedt wrote: > > > On Tue, 2 Jul 2019 16:14:05 +0200 (CEST) > > Thomas Gleixner wrote: > > > > > On Tue, 2 Jul 2019, Peter Zijlstra wrote: > > > > > > > On Tue, Jul 02, 2019 at 02:3

Re: [PATCH] x86/stacktrace: Do not access user space memory unnecessarily

2019-07-02 Thread Peter Zijlstra
On Tue, Jul 02, 2019 at 01:39:05PM -0400, Steven Rostedt wrote: > On Tue, 2 Jul 2019 11:33:55 -0400 > Steven Rostedt wrote: > > > On Tue, 2 Jul 2019 16:14:05 +0200 (CEST) > > Thomas Gleixner wrote: > > > > > On Tue, 2 Jul 2019, Peter Zijlstra wrote: > > > > > > > On Tue, Jul 02, 2019 at 02:3

Re: [PATCH] x86/stacktrace: Do not access user space memory unnecessarily

2019-07-02 Thread Peter Zijlstra
On Tue, Jul 02, 2019 at 10:18:27PM +0200, Peter Zijlstra wrote: > I think; lemme re-read that thread. *completely* untested, not even been near a compiler yet. but it now includes 32bit support and should be more or less complete. I removed the most horrendous (rbx control flow) hacks from idte

Re: [PATCH] x86/stacktrace: Do not access user space memory unnecessarily

2019-07-02 Thread Steven Rostedt
On Tue, 2 Jul 2019 22:18:27 +0200 Peter Zijlstra wrote: > On Tue, Jul 02, 2019 at 01:39:05PM -0400, Steven Rostedt wrote: > > On Tue, 2 Jul 2019 11:33:55 -0400 > > Steven Rostedt wrote: > > > > > On Tue, 2 Jul 2019 16:14:05 +0200 (CEST) > > > Thomas Gleixner wrote: > > > > > > > On Tue, 2

Re: [PATCH] x86/stacktrace: Do not access user space memory unnecessarily

2019-07-02 Thread Steven Rostedt
On Tue, 2 Jul 2019 13:39:05 -0400 Steven Rostedt wrote: > On Tue, 2 Jul 2019 11:33:55 -0400 > Steven Rostedt wrote: > > > On Tue, 2 Jul 2019 16:14:05 +0200 (CEST) > > Thomas Gleixner wrote: > > > > > On Tue, 2 Jul 2019, Peter Zijlstra wrote: > > > > > > > On Tue, Jul 02, 2019 at 02:31:

Re: [PATCH] x86/stacktrace: Do not access user space memory unnecessarily

2019-07-02 Thread Steven Rostedt
On Tue, 2 Jul 2019 11:33:55 -0400 Steven Rostedt wrote: > On Tue, 2 Jul 2019 16:14:05 +0200 (CEST) > Thomas Gleixner wrote: > > > On Tue, 2 Jul 2019, Peter Zijlstra wrote: > > > > > On Tue, Jul 02, 2019 at 02:31:51PM +0900, Eiichi Tsukata wrote: > > > > Put the boundary check before it a

Re: [PATCH] x86/stacktrace: Do not access user space memory unnecessarily

2019-07-02 Thread Steven Rostedt
On Tue, 2 Jul 2019 16:14:05 +0200 (CEST) Thomas Gleixner wrote: > On Tue, 2 Jul 2019, Peter Zijlstra wrote: > > > On Tue, Jul 02, 2019 at 02:31:51PM +0900, Eiichi Tsukata wrote: > > > Put the boundary check before it accesses user space to prevent > > > unnecessary > > > access which might cr

Re: [PATCH] x86/stacktrace: Do not access user space memory unnecessarily

2019-07-02 Thread Thomas Gleixner
On Tue, 2 Jul 2019, Peter Zijlstra wrote: > On Tue, Jul 02, 2019 at 02:31:51PM +0900, Eiichi Tsukata wrote: > > Put the boundary check before it accesses user space to prevent unnecessary > > access which might crash the machine. > > > > Especially, ftrace preemptirq/irq_disable event with user s

Re: [PATCH] x86/stacktrace: Do not access user space memory unnecessarily

2019-07-02 Thread Peter Zijlstra
On Tue, Jul 02, 2019 at 02:31:51PM +0900, Eiichi Tsukata wrote: > Put the boundary check before it accesses user space to prevent unnecessary > access which might crash the machine. > > Especially, ftrace preemptirq/irq_disable event with user stack trace > option can trigger SEGV in pid 1 which l

[PATCH] x86/stacktrace: Do not access user space memory unnecessarily

2019-07-01 Thread Eiichi Tsukata
Put the boundary check before it accesses user space to prevent unnecessary access which might crash the machine. Especially, ftrace preemptirq/irq_disable event with user stack trace option can trigger SEGV in pid 1 which leads to panic. Reproducer: CONFIG_PREEMPTIRQ_TRACEPOINTS=y # echo 1