Re: [PATCH tip/master] [BUGFIX] kprobes/x86: Fix to clear TF bit in fault-on-single-stepping

2016-06-14 Thread Ingo Molnar
* Steven Rostedt wrote: > On Mon, 13 Jun 2016 19:13:45 -0400 > Steven Rostedt wrote: > > > > > # cd /sys/kernel/debug/tracing > > > # echo p copy_user_enhanced_fast_string+5 > kprobe_events > > > # echo 1 > events/kprobes/enable > > > > > > And you'll see a kernel panic on do_debug(),

Re: [PATCH tip/master] [BUGFIX] kprobes/x86: Fix to clear TF bit in fault-on-single-stepping

2016-06-13 Thread Masami Hiramatsu
On Mon, 13 Jun 2016 19:20:19 -0400 Steven Rostedt wrote: > On Mon, 13 Jun 2016 19:13:45 -0400 > Steven Rostedt wrote: > > > > > # cd /sys/kernel/debug/tracing > > > # echo p copy_user_enhanced_fast_string+5 > kprobe_events > > > # echo 1 > events/kprobes/enable > > > > > > And you'll se

Re: [PATCH tip/master] [BUGFIX] kprobes/x86: Fix to clear TF bit in fault-on-single-stepping

2016-06-13 Thread Steven Rostedt
On Mon, 13 Jun 2016 19:13:45 -0400 Steven Rostedt wrote: > > # cd /sys/kernel/debug/tracing > > # echo p copy_user_enhanced_fast_string+5 > kprobe_events > > # echo 1 > events/kprobes/enable > > > > And you'll see a kernel panic on do_debug(), since the debug > > trap is not handled by kp

Re: [PATCH tip/master] [BUGFIX] kprobes/x86: Fix to clear TF bit in fault-on-single-stepping

2016-06-13 Thread Steven Rostedt
On Sat, 11 Jun 2016 23:06:53 +0900 Masami Hiramatsu wrote: > Fix kprobe_fault_handler to clear TF (trap flag) bit of > flags register in the case of fault fixup on single-stepping. > > If we put a kprobe on the instruction which can cause a > page fault (e.g. actual mov instructions in copy_user

Re: [PATCH tip/master] [BUGFIX] kprobes/x86: Fix to clear TF bit in fault-on-single-stepping

2016-06-12 Thread Ananth N Mavinakayanahalli
On Sat, Jun 11, 2016 at 11:06:53PM +0900, Masami Hiramatsu wrote: > Fix kprobe_fault_handler to clear TF (trap flag) bit of > flags register in the case of fault fixup on single-stepping. > > If we put a kprobe on the instruction which can cause a > page fault (e.g. actual mov instructions in copy

[PATCH tip/master] [BUGFIX] kprobes/x86: Fix to clear TF bit in fault-on-single-stepping

2016-06-11 Thread Masami Hiramatsu
Fix kprobe_fault_handler to clear TF (trap flag) bit of flags register in the case of fault fixup on single-stepping. If we put a kprobe on the instruction which can cause a page fault (e.g. actual mov instructions in copy_user_*), that fault happens on a single-stepping buffer. In this case, kpro