diff options
author | jhb <jhb@FreeBSD.org> | 2006-07-27 19:50:16 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2006-07-27 19:50:16 +0000 |
commit | 39705fd8c65be4ed1f0d045f08156d17f4e05c5a (patch) | |
tree | d7aca78a9dc9766080ed3383eace0e02c3a80714 | |
parent | c95747d9a12efd3e5ae1bb838e2141c8531827b3 (diff) | |
download | FreeBSD-src-39705fd8c65be4ed1f0d045f08156d17f4e05c5a.zip FreeBSD-src-39705fd8c65be4ed1f0d045f08156d17f4e05c5a.tar.gz |
Add missing ptrace(2) system-call stops to various syscall()
implementations.
MFC after: 1 week
-rw-r--r-- | sys/amd64/ia32/ia32_syscall.c | 5 | ||||
-rw-r--r-- | sys/ia64/ia32/ia32_trap.c | 5 | ||||
-rw-r--r-- | sys/powerpc/aim/trap.c | 5 | ||||
-rw-r--r-- | sys/powerpc/powerpc/trap.c | 5 |
4 files changed, 20 insertions, 0 deletions
diff --git a/sys/amd64/ia32/ia32_syscall.c b/sys/amd64/ia32/ia32_syscall.c index 8e67939..c8349bd 100644 --- a/sys/amd64/ia32/ia32_syscall.c +++ b/sys/amd64/ia32/ia32_syscall.c @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include <sys/ktr.h> #include <sys/lock.h> #include <sys/mutex.h> +#include <sys/ptrace.h> #include <sys/resourcevar.h> #include <sys/signalvar.h> #include <sys/syscall.h> @@ -184,6 +185,8 @@ ia32_syscall(struct trapframe frame) STOPEVENT(p, S_SCE, narg); + PTRACESTOP_SC(p, td, S_PT_SCE); + AUDIT_SYSCALL_ENTER(code, td); error = (*callp->sy_call)(td, args64); AUDIT_SYSCALL_EXIT(error, td); @@ -253,6 +256,8 @@ ia32_syscall(struct trapframe frame) * is not the case, this code will need to be revisited. */ STOPEVENT(p, S_SCX, code); + + PTRACESTOP_SC(p, td, S_PT_SCX); WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", (code >= 0 && code < SYS_MAXSYSCALL) ? freebsd32_syscallnames[code] : "???"); diff --git a/sys/ia64/ia32/ia32_trap.c b/sys/ia64/ia32/ia32_trap.c index 29357f1..07c7d2e 100644 --- a/sys/ia64/ia32/ia32_trap.c +++ b/sys/ia64/ia32/ia32_trap.c @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include <sys/mutex.h> #include <sys/pioctl.h> #include <sys/proc.h> +#include <sys/ptrace.h> #include <sys/signalvar.h> #include <sys/syscall.h> #include <sys/sysent.h> @@ -125,6 +126,8 @@ ia32_syscall(struct trapframe *tf) STOPEVENT(p, S_SCE, narg); + PTRACESTOP_SC(p, td, S_PT_SCE); + error = (*callp->sy_call)(td, args64); } @@ -187,6 +190,8 @@ ia32_syscall(struct trapframe *tf) * is not the case, this code will need to be revisited. */ STOPEVENT(p, S_SCX, code); + + PTRACESTOP_SC(p, td, S_PT_SCX); WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???"); diff --git a/sys/powerpc/aim/trap.c b/sys/powerpc/aim/trap.c index 7d3deba..527e9fb 100644 --- a/sys/powerpc/aim/trap.c +++ b/sys/powerpc/aim/trap.c @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include <sys/lock.h> #include <sys/mutex.h> #include <sys/pioctl.h> +#include <sys/ptrace.h> #include <sys/reboot.h> #include <sys/syscall.h> #include <sys/sysent.h> @@ -420,6 +421,8 @@ syscall(struct trapframe *frame) STOPEVENT(p, S_SCE, narg); + PTRACESTOP_SC(p, td, S_PT_SCE); + error = (*callp->sy_call)(td, params); CTR3(KTR_SYSC, "syscall: p=%s %s ret=%x", p->p_comm, @@ -476,6 +479,8 @@ syscall(struct trapframe *frame) * Does the comment in the i386 code about errno apply here? */ STOPEVENT(p, S_SCX, code); + + PTRACESTOP_SC(p, td, S_PT_SCX); WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???"); diff --git a/sys/powerpc/powerpc/trap.c b/sys/powerpc/powerpc/trap.c index 7d3deba..527e9fb 100644 --- a/sys/powerpc/powerpc/trap.c +++ b/sys/powerpc/powerpc/trap.c @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include <sys/lock.h> #include <sys/mutex.h> #include <sys/pioctl.h> +#include <sys/ptrace.h> #include <sys/reboot.h> #include <sys/syscall.h> #include <sys/sysent.h> @@ -420,6 +421,8 @@ syscall(struct trapframe *frame) STOPEVENT(p, S_SCE, narg); + PTRACESTOP_SC(p, td, S_PT_SCE); + error = (*callp->sy_call)(td, params); CTR3(KTR_SYSC, "syscall: p=%s %s ret=%x", p->p_comm, @@ -476,6 +479,8 @@ syscall(struct trapframe *frame) * Does the comment in the i386 code about errno apply here? */ STOPEVENT(p, S_SCX, code); + + PTRACESTOP_SC(p, td, S_PT_SCX); WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???"); |