[PATCHSET] ptrace: kill most tracehooks

From: Tejun Heo
Date: Fri Jun 17 2011 - 10:53:52 EST


At this point, tracehooks aren't useful to mainline kernel and mostly
just add an extra layer of obfuscation. Although they have comments,
without actual in-kernel users, it is difficult to tell what are their
assumptions and they're actually trying to achieve. To mainline
kernel, they just aren't worth keeping around.

This patchset kills most tracehooks which aren't used from arch codes.
The remaining ones will be dealt with with future changes.


Most conversions are straightforward. The only tricky one is 0006
which reimplements the decision logic.

This patch is on top of Oleg's ptrace branch[1] - 544b2c91a9 (ptrace:
implement PTRACE_LISTEN), and available in the following git branch.

git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc.git review-tracehook

diffstat follows.

arch/s390/kernel/traps.c | 4
fs/exec.c | 9 -
fs/proc/array.c | 2
fs/proc/base.c | 2
include/linux/ptrace.h | 71 ++++++---
include/linux/tracehook.h | 333 ---------------------------------------------
kernel/exit.c | 43 +++--
kernel/fork.c | 43 ++++-
kernel/signal.c | 22 +-
mm/nommu.c | 3
mm/oom_kill.c | 3
security/apparmor/domain.c | 2
security/selinux/hooks.c | 4
13 files changed, 136 insertions(+), 405 deletions(-)


[1] git://git.kernel.org/pub/scm/linux/kernel/git/oleg/misc.git ptrace
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/