Re: observe & control thread state for exit futex ?

From: John Reiser (jreiser@BitWagon.com)
Date: Tue Apr 15 2003 - 10:01:42 EST


Daniel Jacobowitz wrote:
> On Sun, Apr 13, 2003 at 07:52:08PM -0700, John Reiser wrote:
>
>>How can a debugger, newly attached to an arbitrary thread, determine whether
>>the thread has a pending exit futex and associated memory location to clear
>>[CLONE_CHILD_CLEARTID flag and child_tid_ptr parameter at __clone()]?
>>
>>If so, then how can the debugger determine the address, change the address,
>>cancel the futex, and/or intercept the notification?
>
>
> It can't. Even clone flags are not accessible.
>
> If you can think of a good reason that a debugger would need any
> particular piece of data, exposing it is very straightforward.
>

The debugger needs this information to determine the state of the thread.
An automated software audit program needs the information to verify
that threads are working correctly. In general, write-only state
[from the viewpoint of the thread] is a bad idea.

Would a new option to sys_prctl() be a good way to expose the data?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Apr 15 2003 - 22:00:36 EST