aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2011-06-17 10:50:37 -0400
committerOleg Nesterov <oleg@redhat.com>2011-06-22 13:26:28 -0400
commita288eecce5253cc1565d400a52b9b476a157e040 (patch)
treea933dd8c9791be83b7a67a33502c79e7b441960e /arch/s390
parentf3c04b934d429b1ace21866f011b66de328c0dc9 (diff)
ptrace: kill trivial tracehooks
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 patch kills the following trivial tracehooks. * Ones testing whether task is ptraced. Replace with ->ptrace test. tracehook_expect_breakpoints() tracehook_consider_ignored_signal() tracehook_consider_fatal_signal() * ptrace_event() wrappers. Call directly. tracehook_report_exec() tracehook_report_exit() tracehook_report_vfork_done() * ptrace_release_task() wrapper. Call directly. tracehook_finish_release_task() * noop tracehook_prepare_release_task() tracehook_report_death() This doesn't introduce any behavior change. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Christoph Hellwig <hch@infradead.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/kernel/traps.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c
index a65d2e82f61..a63d34c3611 100644
--- a/arch/s390/kernel/traps.c
+++ b/arch/s390/kernel/traps.c
@@ -331,7 +331,7 @@ void __kprobes do_per_trap(struct pt_regs *regs)
331{ 331{
332 if (notify_die(DIE_SSTEP, "sstep", regs, 0, 0, SIGTRAP) == NOTIFY_STOP) 332 if (notify_die(DIE_SSTEP, "sstep", regs, 0, 0, SIGTRAP) == NOTIFY_STOP)
333 return; 333 return;
334 if (tracehook_consider_fatal_signal(current, SIGTRAP)) 334 if (current->ptrace)
335 force_sig(SIGTRAP, current); 335 force_sig(SIGTRAP, current);
336} 336}
337 337
@@ -425,7 +425,7 @@ static void __kprobes illegal_op(struct pt_regs *regs, long pgm_int_code,
425 if (get_user(*((__u16 *) opcode), (__u16 __user *) location)) 425 if (get_user(*((__u16 *) opcode), (__u16 __user *) location))
426 return; 426 return;
427 if (*((__u16 *) opcode) == S390_BREAKPOINT_U16) { 427 if (*((__u16 *) opcode) == S390_BREAKPOINT_U16) {
428 if (tracehook_consider_fatal_signal(current, SIGTRAP)) 428 if (current->ptrace)
429 force_sig(SIGTRAP, current); 429 force_sig(SIGTRAP, current);
430 else 430 else
431 signal = SIGILL; 431 signal = SIGILL;