lkml.org 
[lkml]   [2011]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCHSET] ptrace: kill most tracehooks
Date
Hello,

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.

0001-ptrace-kill-task_ptrace.patch
0002-ptrace-introduce-ptrace_event_enabled-and-simplify-p.patch
0003-ptrace-move-SIGTRAP-on-exec-2-logic-to-ptrace_event.patch
0004-ptrace-kill-trivial-tracehooks.patch
0005-ptrace-kill-clone-exec-tracehooks.patch
0006-ptrace-kill-detah-tracehooks.patch
0007-ptrace-s-tracehook_tracer_task-ptrace_parent.patch

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(-)

--
tejun

[1] git://git.kernel.org/pub/scm/linux/kernel/git/oleg/misc.git ptrace


\
 
 \ /
  Last update: 2011-06-17 16:55    [W:0.172 / U:11.364 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site