public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* observe & control thread state for exit futex ?
@ 2003-04-14  2:52 John Reiser
  2003-04-14  3:35 ` Daniel Jacobowitz
  0 siblings, 1 reply; 3+ messages in thread
From: John Reiser @ 2003-04-14  2:52 UTC (permalink / raw)
  To: linux-kernel

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?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: observe & control thread state for exit futex ?
  2003-04-14  2:52 observe & control thread state for exit futex ? John Reiser
@ 2003-04-14  3:35 ` Daniel Jacobowitz
  2003-04-15 15:01   ` John Reiser
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2003-04-14  3:35 UTC (permalink / raw)
  To: John Reiser; +Cc: linux-kernel

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.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: observe & control thread state for exit futex ?
  2003-04-14  3:35 ` Daniel Jacobowitz
@ 2003-04-15 15:01   ` John Reiser
  0 siblings, 0 replies; 3+ messages in thread
From: John Reiser @ 2003-04-15 15:01 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: linux-kernel

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?


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-04-15 14:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-14  2:52 observe & control thread state for exit futex ? John Reiser
2003-04-14  3:35 ` Daniel Jacobowitz
2003-04-15 15:01   ` John Reiser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox