Messages in this thread | | | From | Tejun Heo <> | Subject | [PATCHSET ptrace] ptrace: implement PTRACE_SEIZE/INTERRUPT and group stop notification, take#3 | Date | Tue, 24 May 2011 20:37:20 +0200 |
| |
Hello,
This is the third try at implementing PTRACE_SEIZE/INTERRUPT and group stop notification. This patchset contains both the prep and the actual implementation patches. Changes from the second take[1][2] are,
- 0008-ptrace-move-JOBCTL_TRAPPING-wait-to-wait-2-and-ptrac.patch:
wait_task_stopped() syscall restart fixed such that -ERESTARTSYS is used for !WNOHANG waits.
- 0006-job-control-introduce-task_set_jobctl_pending.patch:
Added to address Oleg's concern that setting trap conditions on dying task may make it unkillable. task_set_jobctl_pending() is always used when raising stop/trap conditions and becomes noop if target task is dying. 0011, 0013 and 0019 updated to use task_set_jobctl_pending().
- 0012-ptrace-implement-PTRACE_SEIZE.patch:
PTRACE_SEIZE no longer traps the tracee automatically as suggested by Jan Kratochvil. If tracee is running, it's left running.
- 0016-ptrace-make-group-stop-state-visible-via-PTRACE_GETS.patch: - 0018-ptrace-add-JOBCTL_BLOCK_NOTIFY.patch:-v2:
Cosmetic updates as per review.
This patchset contains the following 19 patches.
0001-job-control-rename-signal-group_stop-and-flags-to-jo.patch 0002-ptrace-ptrace_check_attach-rename-kill-to-ignore_sta.patch 0003-ptrace-relocate-set_current_state-TASK_TRACED-in-ptr.patch 0004-job-control-introduce-JOBCTL_PENDING_MASK-and-task_c.patch 0005-job-control-make-task_clear_jobctl_pending-clear-TRA.patch 0006-job-control-introduce-task_set_jobctl_pending.patch 0007-ptrace-use-bit_waitqueue-for-TRAPPING-instead-of-wai.patch 0008-ptrace-move-JOBCTL_TRAPPING-wait-to-wait-2-and-ptrac.patch 0009-ptrace-make-TRAPPING-wait-interruptible.patch 0010-signal-remove-three-noop-tracehooks.patch 0011-job-control-introduce-JOBCTL_TRAP_STOP-and-use-it-fo.patch 0012-ptrace-implement-PTRACE_SEIZE.patch 0013-ptrace-implement-PTRACE_INTERRUPT.patch 0014-ptrace-restructure-ptrace_getsiginfo.patch 0015-ptrace-add-siginfo.si_pt_flags.patch 0016-ptrace-make-group-stop-state-visible-via-PTRACE_GETS.patch 0017-ptrace-don-t-let-PTRACE_SETSIGINFO-override-__SI_TRA.patch 0018-ptrace-add-JOBCTL_BLOCK_NOTIFY.patch 0019-ptrace-implement-group-stop-notification-for-ptracer.patch
and available in the following git branch.
git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc.git review-ptrace-seize
The HEAD is 6e3eb3ab5f (ptrace: implement group stop notification for ptracer). If you see older branch, please retry after a while (korg is still syncing).
The patchset is on top of today's (20110524) mainline - d762f438310 (Merge branch 'sh-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6).
diffstat follows.
arch/ia64/include/asm/siginfo.h | 7 arch/ia64/kernel/signal.c | 5 arch/mips/include/asm/compat-signal.h | 7 arch/mips/include/asm/siginfo.h | 7 arch/mips/kernel/signal32.c | 5 arch/parisc/kernel/signal32.c | 5 arch/parisc/kernel/signal32.h | 7 arch/powerpc/kernel/ppc32.h | 7 arch/powerpc/kernel/signal_32.c | 5 arch/s390/kernel/compat_linux.h | 7 arch/s390/kernel/compat_signal.c | 5 arch/sparc/kernel/signal32.c | 12 + arch/tile/kernel/compat_signal.c | 11 + arch/x86/ia32/ia32_signal.c | 4 arch/x86/include/asm/ia32.h | 7 fs/exec.c | 2 include/asm-generic/siginfo.h | 10 include/linux/ptrace.h | 16 + include/linux/sched.h | 28 +- include/linux/tracehook.h | 52 ---- kernel/exit.c | 27 ++ kernel/ptrace.c | 302 +++++++++++++++++++++++---- kernel/signal.c | 370 ++++++++++++++++++++++------------ 23 files changed, 672 insertions(+), 236 deletions(-)
-- tejun
[1] http://thread.gmane.org/gmane.linux.kernel/1139751 [2] http://thread.gmane.org/gmane.linux.kernel/1140778
| |