Re: [PATCH] ptrace: make PTRACE_DETACH work on non-stopped tracees.

2013-06-20 Thread Oleg Nesterov
On 06/20, Denys Vlasenko wrote: > > On 06/19/2013 06:32 PM, Oleg Nesterov wrote: > > On 06/19, Denys Vlasenko wrote: > >> > >> This is a user-visible behavior change. > >> Do we really have to introduce a separate > >> PTRACE_NOT_STUPID_DETACH? I hope not. > > > > Oh, I think yes. > > > >> @@ -1062

Re: [PATCH] ptrace: make PTRACE_DETACH work on non-stopped tracees.

2013-06-19 Thread Denys Vlasenko
On 06/19/2013 06:32 PM, Oleg Nesterov wrote: > On 06/19, Denys Vlasenko wrote: >> >> This is a user-visible behavior change. >> Do we really have to introduce a separate >> PTRACE_NOT_STUPID_DETACH? I hope not. > > Oh, I think yes. > >> @@ -1062,7 +1060,8 @@ SYSCALL_DEFINE4(ptrace, long, request,

Re: [PATCH] ptrace: make PTRACE_DETACH work on non-stopped tracees.

2013-06-19 Thread Oleg Nesterov
On 06/19, Pedro Alves wrote: > > On 06/19/2013 05:09 PM, Jan Kratochvil wrote: > > On Wed, 19 Jun 2013 17:15:36 +0200, Denys Vlasenko wrote: > >> CCing Jan to hear his comments from gdb side. > > PTRACE_DETACH takes a signal number in the data parameter. > What happens to if the tracer passes a non

Re: [PATCH] ptrace: make PTRACE_DETACH work on non-stopped tracees.

2013-06-19 Thread Pedro Alves
On 06/19/2013 05:09 PM, Jan Kratochvil wrote: > On Wed, 19 Jun 2013 17:15:36 +0200, Denys Vlasenko wrote: >> CCing Jan to hear his comments from gdb side. PTRACE_DETACH takes a signal number in the data parameter. What happens to if the tracer passes a non-zero signal? -- Pedro Alves -- To unsu

Re: [PATCH] ptrace: make PTRACE_DETACH work on non-stopped tracees.

2013-06-19 Thread Oleg Nesterov
On 06/19, Denys Vlasenko wrote: > > This is a user-visible behavior change. > Do we really have to introduce a separate > PTRACE_NOT_STUPID_DETACH? I hope not. Oh, I think yes. > @@ -1062,7 +1060,8 @@ SYSCALL_DEFINE4(ptrace, long, request, long, pid, > unsigned long, addr, > } > > re

Re: [PATCH] ptrace: make PTRACE_DETACH work on non-stopped tracees.

2013-06-19 Thread Jan Kratochvil
On Wed, 19 Jun 2013 17:15:36 +0200, Denys Vlasenko wrote: > CCing Jan to hear his comments from gdb side. GDB never calls PTRACE_DETACH without having the inferior already stopped. Jan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord..

[PATCH] ptrace: make PTRACE_DETACH work on non-stopped tracees.

2013-06-19 Thread Denys Vlasenko
Before this change debuggers needed to jump through hoops if they want to detach from a running tracee. Typically they just try PTRACE_DETACH, and if it fails with ESRCH, they make tracee enter a ptrace-stop. Before introduction of PTRACE_INTERRUPT, the only way to do that was to send a signal (wh