Re: [patch] add arch_ptrace_stop() hook and use it on ia64

From: Andrew Morton <>
Date: 2005-05-11 09:10:40
David Mosberger <> wrote:
> The hook lets architectures do their own thing when a task stops for
> ptrace.  In the case of ia64, we'd like to use this to update the
> user's virtual memory with the portion of the register-backing store
> that ended up on the kernel-stack.
> Note that the patch changes ptrace_stop() to release the
> sighand->siglock before setting the task to TASK_TRACED state.  This
> is needed such that arch_ptrace_stop() can run without holding
> sighand->siglock (arch_ptrace_stop() may access user-memory and hence
> indirectly modify the task's run state and hence it is not possible to
> establish the TASK_TRACED state before running the hook).

Are we really sure about this?  A quick peek at ptrace_check_attach() and
ptrace_untrace() (for example) indicates that we are using ->siglock to
synchronise access to the task state.

It's hard to see how swapping the assignment and the unlock in there could
break anything, but it does need to be gone through with a toothcomb
looking for synchronization issues as well as for missing memory barriers
(ptrace_check_attach doesn't use them, for example).

Nothing specific.  Just .... worried.
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to
More majordomo info at
Received on Tue May 10 19:20:53 2005

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:38 EST