Re: [PATCH 6/6] ptrace: PTRACE_DETACH should do flush_ptrace_hw_breakpoint(child)

2013-04-30 Thread Oleg Nesterov
On 04/30, Frederic Weisbecker wrote: > > On Mon, Apr 29, 2013 at 06:40:38PM +0200, Oleg Nesterov wrote: > > > No, I think this (minor) problem is very old... At least, when I look > > at 2.6.26 code I do not see anything which coould clear db regs on > > detach. > > Ok, if so then the conversion to

Re: [PATCH 6/6] ptrace: PTRACE_DETACH should do flush_ptrace_hw_breakpoint(child)

2013-04-29 Thread Frederic Weisbecker
On Thu, Apr 18, 2013 at 08:44:25PM +0200, Oleg Nesterov wrote: > Change ptrace_detach() to call flush_ptrace_hw_breakpoint(child). > This frees the slots for non-ptrace PERF_TYPE_BREAKPOINT users, and > this ensures that the tracee won't be killed by SIGTRAP triggered by > the active breakpoints. >

Re: [PATCH 6/6] ptrace: PTRACE_DETACH should do flush_ptrace_hw_breakpoint(child)

2013-04-29 Thread Frederic Weisbecker
On Mon, Apr 29, 2013 at 06:40:38PM +0200, Oleg Nesterov wrote: > On 04/29, Frederic Weisbecker wrote: > > > > On Thu, Apr 18, 2013 at 08:44:25PM +0200, Oleg Nesterov wrote: > > > index 776ab3b..33752d9 100644 > > > --- a/kernel/ptrace.c > > > +++ b/kernel/ptrace.c > > > @@ -467,6 +467,7 @@ static i

Re: [PATCH 6/6] ptrace: PTRACE_DETACH should do flush_ptrace_hw_breakpoint(child)

2013-04-29 Thread Oleg Nesterov
On 04/29, Frederic Weisbecker wrote: > > On Thu, Apr 18, 2013 at 08:44:25PM +0200, Oleg Nesterov wrote: > > index 776ab3b..33752d9 100644 > > --- a/kernel/ptrace.c > > +++ b/kernel/ptrace.c > > @@ -467,6 +467,7 @@ static int ptrace_detach(struct task_struct *child, > > unsigned int data) > > /

Re: [PATCH 6/6] ptrace: PTRACE_DETACH should do flush_ptrace_hw_breakpoint(child)

2013-04-29 Thread Frederic Weisbecker
On Thu, Apr 18, 2013 at 08:44:25PM +0200, Oleg Nesterov wrote: > Change ptrace_detach() to call flush_ptrace_hw_breakpoint(child). > This frees the slots for non-ptrace PERF_TYPE_BREAKPOINT users, and > this ensures that the tracee won't be killed by SIGTRAP triggered by > the active breakpoints. >

[PATCH 6/6] ptrace: PTRACE_DETACH should do flush_ptrace_hw_breakpoint(child)

2013-04-18 Thread Oleg Nesterov
Change ptrace_detach() to call flush_ptrace_hw_breakpoint(child). This frees the slots for non-ptrace PERF_TYPE_BREAKPOINT users, and this ensures that the tracee won't be killed by SIGTRAP triggered by the active breakpoints. Test-case: unsigned long encode_dr7(int drnum, int enable, uns