lkml.org 
[lkml]   [2009]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH -mm 0/3] ptrace: detach wakeup fixes
Date
> Q: when the tracer exits we bypass ptrace_disable() and
> clear_tsk_thread_flag(TIF_SYSCALL_TRACE), is this correct?

It's always been that way. It's obviously wrong in an abstract sense. But
for me, ptrace today is purely about compatibility with how it's behaved in
the past, however stupid that was--whenever it's been fully consistent and
predictable, userland is already saddled with coping with the stupidity.

> Perhaps we should move this code into __ptrace_unlink?

Locking nightmare. ptrace_disable can do stuff that may require the thread
to be stopped like other ptrace operations require (fiddle registers),
might include access_process_vm, etc. Trust me, we don't want to go there
now. (In case you were looking for reasons why I'll be soon advocating
reorganization to get ptrace entirely out of the tasklist_lock arena, this
is a fine example of the true horror that the current data structure set-up
gives us.)


Thanks,
Roland


\
 
 \ /
  Last update: 2009-02-09 01:57    [W:0.056 / U:0.636 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site