Re: [PATCH] ptrace: do not use task->ptrace directly in core kernel

From: Roland McGrath
Date: Thu Apr 30 2009 - 16:29:30 EST


That is fine, but doesn't buy much. i.e., we will be changing these again
before too long anyway I imagine.

I added task_ptrace() just for tracehook.h use, really. There it drives
the event hooks. Those uses are directly obsoleted by using another event
hooking mechanism such as utrace. That applies to ptrace_signal() too.
But the other uses will be replaced by something different later, not just
go away.

The BUG_ON cases might as well just go away, probably.

The exit.c cases might be clearer if we give them a (trivial) local helper
with a more topical name like task_wait_inhibited().

ptrace_fork() is a wrapper that just calls arch_ptrace_fork(), which itself
is an empty macro on most configurations. I think we might as well just
make ptrace_fork() an inline in linux/ptrace.h and put the test inside it.
(Thus any future changes touch ptrace.h and not fork.c.)


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