lkml.org 
[lkml]   [2011]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ptrace: make former thread ID available via PTRACE_GETEVENTMSG after PTRACE_EVENT_EXEC stop (v.2)
On 06/27, Tejun Heo wrote:
>
> Hello, Oleg.
>
> On Mon, Jun 27, 2011 at 03:47:13PM +0200, Oleg Nesterov wrote:
> > > Do we want to enable this silently? Wouldn't it be better to make it
> > > dependent on PT_SEIZED?
> >
> > Hmm. Not sure I understand. Why can't PTRACE_SEIZE add PT_TRACE_EXEC
> > (and PT_TRACESYSGOOD) along with PT_SEIZED during attach?
>
> I'm worrying about !PT_SEIZED case. If we make it solely depend on
> PT_TRACE_EXEC, newer kernels report the old pid while olders ones
> don't

Ah, understood. So you think that the old pid should be only reported
if PT_SEIZED.

May be... Denys, what do you think?

OTOH, it looks simpler if PT_TRACE_EXEC always reports the old pid,
this can't break the applications which do not know about this new
feature.

> and the only way to discover would be either comparing kernel
> version or actually trying it - both aren't too nice.

Fortunately, currently tracehook_report_exec() zeroes ->ptrace_message.
At least this means that anything != 0 means it works.

Oleg.



\
 
 \ /
  Last update: 2011-06-27 17:23    [W:0.092 / U:0.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site