mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-09 13:42:56 +00:00
Ensure that all eight syscall arguments are available to dtrace_probe(),
rather than just the first five. This is done by calling dtrace_probe() through a function pointer, as in illumos. MFC after: 3 weeks
This commit is contained in:
parent
0626f3e435
commit
38e6967f04
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=264435
@ -168,6 +168,9 @@ static dtrace_pops_t systrace_pops = {
|
|||||||
static struct cdev *systrace_cdev;
|
static struct cdev *systrace_cdev;
|
||||||
static dtrace_provider_id_t systrace_id;
|
static dtrace_provider_id_t systrace_id;
|
||||||
|
|
||||||
|
typedef void (*systrace_dtrace_probe_t)(dtrace_id_t, uintptr_t, uintptr_t,
|
||||||
|
uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t);
|
||||||
|
|
||||||
#if !defined(LINUX_SYSTRACE)
|
#if !defined(LINUX_SYSTRACE)
|
||||||
/*
|
/*
|
||||||
* Probe callback function.
|
* Probe callback function.
|
||||||
@ -180,6 +183,7 @@ static void
|
|||||||
systrace_probe(u_int32_t id, int sysnum, struct sysent *sysent, void *params,
|
systrace_probe(u_int32_t id, int sysnum, struct sysent *sysent, void *params,
|
||||||
int ret)
|
int ret)
|
||||||
{
|
{
|
||||||
|
systrace_dtrace_probe_t probe;
|
||||||
int n_args = 0;
|
int n_args = 0;
|
||||||
u_int64_t uargs[8];
|
u_int64_t uargs[8];
|
||||||
|
|
||||||
@ -211,7 +215,9 @@ systrace_probe(u_int32_t id, int sysnum, struct sysent *sysent, void *params,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Process the probe using the converted argments. */
|
/* Process the probe using the converted argments. */
|
||||||
dtrace_probe(id, uargs[0], uargs[1], uargs[2], uargs[3], uargs[4]);
|
probe = (systrace_dtrace_probe_t)dtrace_probe;
|
||||||
|
probe(id, uargs[0], uargs[1], uargs[2], uargs[3], uargs[4], uargs[5],
|
||||||
|
uargs[6], uargs[7]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user