diff options
author | markj <markj@FreeBSD.org> | 2015-12-17 00:00:27 +0000 |
---|---|---|
committer | markj <markj@FreeBSD.org> | 2015-12-17 00:00:27 +0000 |
commit | 338746b90e745a16b48ba075ad2924da4f8c92af (patch) | |
tree | 1aa8688557837a4a05b61a5b47a403bdb5f7d574 /sys/sys/sysent.h | |
parent | 910a73cc44e30326c82035366988f15905738a93 (diff) | |
download | FreeBSD-src-338746b90e745a16b48ba075ad2924da4f8c92af.zip FreeBSD-src-338746b90e745a16b48ba075ad2924da4f8c92af.tar.gz |
Support an arbitrary number of arguments to DTrace syscall probes.
Rather than pushing all eight possible arguments into dtrace_probe()'s
stack frame, make the syscall_args struct for the current syscall available
via the current thread. Using a custom getargval method for the systrace
provider, this allows any syscall argument to be fetched, even in kernels
that have modified the maximum number of system call arguments.
Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'sys/sys/sysent.h')
-rw-r--r-- | sys/sys/sysent.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/sys/sys/sysent.h b/sys/sys/sysent.h index fe78fb4..d5b88eb 100644 --- a/sys/sys/sysent.h +++ b/sys/sys/sysent.h @@ -38,18 +38,18 @@ struct rlimit; struct sysent; struct thread; struct ksiginfo; +struct syscall_args; + +enum systrace_probe_t { + SYSTRACE_ENTRY, + SYSTRACE_RETURN, +}; typedef int sy_call_t(struct thread *, void *); -/* Used by the machine dependent syscall() code. */ -typedef void (*systrace_probe_func_t)(u_int32_t, int, struct sysent *, void *, - int); - -/* - * Used by loaded syscalls to convert arguments to a DTrace array - * of 64-bit arguments. - */ -typedef void (*systrace_args_func_t)(int, void *, u_int64_t *, int *); +typedef void (*systrace_probe_func_t)(struct syscall_args *, + enum systrace_probe_t, int); +typedef void (*systrace_args_func_t)(int, void *, uint64_t *, int *); extern systrace_probe_func_t systrace_probe_func; @@ -84,7 +84,6 @@ struct sysent { /* system call table */ struct image_params; struct __sigset; -struct syscall_args; struct trapframe; struct vnode; |