Fix standalone builds of systrace.ko after r357912.
Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
a7261520ba
commit
46994ec2b1
@ -141,7 +141,8 @@ syscallenter(struct thread *td)
|
||||
/* Let system calls set td_errno directly. */
|
||||
td->td_pflags &= ~TDP_NERRNO;
|
||||
|
||||
if (__predict_false(systrace_enabled || AUDIT_SYSCALL_ENTER(sa->code, td))) {
|
||||
if (__predict_false(SYSTRACE_ENABLED() ||
|
||||
AUDIT_SYSCALL_ENTER(sa->code, td))) {
|
||||
#ifdef KDTRACE_HOOKS
|
||||
/* Give the syscall:::entry DTrace probe a chance to fire. */
|
||||
if (__predict_false(sa->callp->sy_entry != 0))
|
||||
|
@ -42,6 +42,7 @@ struct thread;
|
||||
struct ksiginfo;
|
||||
struct syscall_args;
|
||||
|
||||
#ifdef _KERNEL
|
||||
enum systrace_probe_t {
|
||||
SYSTRACE_ENTRY,
|
||||
SYSTRACE_RETURN,
|
||||
@ -53,14 +54,15 @@ 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 *);
|
||||
|
||||
#ifdef _KERNEL
|
||||
#ifdef KDTRACE_HOOKS
|
||||
extern bool systrace_enabled;
|
||||
#else
|
||||
#define systrace_enabled 0
|
||||
#endif
|
||||
#endif
|
||||
extern systrace_probe_func_t systrace_probe_func;
|
||||
extern bool systrace_enabled;
|
||||
|
||||
#ifdef KDTRACE_HOOKS
|
||||
#define SYSTRACE_ENABLED() (systrace_enabled)
|
||||
#else
|
||||
#define SYSTRACE_ENABLED() (0)
|
||||
#endif
|
||||
#endif /* _KERNEL */
|
||||
|
||||
struct sysent { /* system call table */
|
||||
int sy_narg; /* number of arguments */
|
||||
|
Loading…
x
Reference in New Issue
Block a user