summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/etc.alpha/MAKEDEV.md3
-rw-r--r--etc/etc.amiga/MAKEDEV.md3
-rw-r--r--etc/etc.hp300/MAKEDEV.md3
-rw-r--r--etc/etc.hppa/MAKEDEV.md3
-rw-r--r--etc/etc.mac68k/MAKEDEV.md3
-rw-r--r--etc/etc.macppc/MAKEDEV.md3
-rw-r--r--etc/etc.mvme68k/MAKEDEV.md3
-rw-r--r--etc/etc.mvme88k/MAKEDEV.md3
-rw-r--r--etc/etc.mvmeppc/MAKEDEV.md3
-rw-r--r--etc/etc.sparc/MAKEDEV.md3
-rw-r--r--etc/etc.sparc64/MAKEDEV.md3
-rw-r--r--etc/etc.sun3/MAKEDEV.md3
-rw-r--r--etc/etc.vax/MAKEDEV.md3
-rw-r--r--sys/arch/alpha/alpha/conf.c6
-rw-r--r--sys/arch/alpha/alpha/trap.c12
-rw-r--r--sys/arch/amiga/amiga/conf.c6
-rw-r--r--sys/arch/amiga/amiga/trap.c13
-rw-r--r--sys/arch/hp300/hp300/conf.c6
-rw-r--r--sys/arch/hp300/hp300/trap.c12
-rw-r--r--sys/arch/hppa/hppa/conf.c17
-rw-r--r--sys/arch/hppa/hppa/trap.c13
-rw-r--r--sys/arch/i386/i386/conf.c3
-rw-r--r--sys/arch/mac68k/mac68k/conf.c6
-rw-r--r--sys/arch/mac68k/mac68k/trap.c12
-rw-r--r--sys/arch/macppc/macppc/conf.c6
-rw-r--r--sys/arch/mvme68k/mvme68k/conf.c6
-rw-r--r--sys/arch/mvme68k/mvme68k/trap.c12
-rw-r--r--sys/arch/mvme88k/mvme88k/conf.c6
-rw-r--r--sys/arch/mvme88k/mvme88k/trap.c12
-rw-r--r--sys/arch/mvmeppc/mvmeppc/conf.c6
-rw-r--r--sys/arch/powerpc/powerpc/trap.c16
-rw-r--r--sys/arch/sparc/sparc/conf.c6
-rw-r--r--sys/arch/sparc/sparc/trap.c12
-rw-r--r--sys/arch/sparc64/sparc64/conf.c6
-rw-r--r--sys/arch/sparc64/sparc64/trap.c12
-rw-r--r--sys/arch/sun3/sun3/conf.c5
-rw-r--r--sys/arch/sun3/sun3/trap.c12
-rw-r--r--sys/arch/vax/vax/conf.c6
-rw-r--r--sys/arch/vax/vax/trap.c12
-rw-r--r--sys/sys/conf.h4
40 files changed, 213 insertions, 71 deletions
diff --git a/etc/etc.alpha/MAKEDEV.md b/etc/etc.alpha/MAKEDEV.md
index 4e2fa0e49d3..78156a5f35e 100644
--- a/etc/etc.alpha/MAKEDEV.md
+++ b/etc/etc.alpha/MAKEDEV.md
@@ -1,5 +1,5 @@
vers(__file__,
- {-$OpenBSD: MAKEDEV.md,v 1.11 2002/04/10 06:09:43 deraadt Exp $-},
+ {-$OpenBSD: MAKEDEV.md,v 1.12 2002/05/16 21:11:20 miod Exp $-},
etc.MACHINE)dnl
dnl
dnl Copyright (c) 2001 Todd T. Fries <todd@OpenBSD.org>
@@ -85,6 +85,7 @@ _DEV(au, 24)
_DEV(speak, 40)
_DEV(rmidi, 41)
_DEV(music, 42)
+_DEV(systrace, 50)
dnl
divert(7)dnl
dnl
diff --git a/etc/etc.amiga/MAKEDEV.md b/etc/etc.amiga/MAKEDEV.md
index 3e607a644d0..739bed34db5 100644
--- a/etc/etc.amiga/MAKEDEV.md
+++ b/etc/etc.amiga/MAKEDEV.md
@@ -1,5 +1,5 @@
vers(__file__,
- {-$OpenBSD: MAKEDEV.md,v 1.7 2002/02/21 18:36:55 deraadt Exp $-},
+ {-$OpenBSD: MAKEDEV.md,v 1.8 2002/05/16 21:11:20 miod Exp $-},
etc.MACHINE)dnl
dnl
dnl Copyright (c) 2001 Todd T. Fries <todd@OpenBSD.org>
@@ -73,6 +73,7 @@ _DEV(xfs, 51)
_DEV(ch, 40)
_DEV(altq, 52)
_DEV(fdesc, 21)
+_DEV(systrace, 50)
dnl
divert(7)dnl
dnl
diff --git a/etc/etc.hp300/MAKEDEV.md b/etc/etc.hp300/MAKEDEV.md
index adf97b773b6..390c28a93c9 100644
--- a/etc/etc.hp300/MAKEDEV.md
+++ b/etc/etc.hp300/MAKEDEV.md
@@ -1,5 +1,5 @@
vers(__file__,
- {-$OpenBSD: MAKEDEV.md,v 1.7 2002/04/18 23:16:00 deraadt Exp $-},
+ {-$OpenBSD: MAKEDEV.md,v 1.8 2002/05/16 21:11:20 miod Exp $-},
etc.MACHINE)dnl
dnl
dnl Copyright (c) 2001 Todd T. Fries <todd@OpenBSD.org>
@@ -61,6 +61,7 @@ _DEV(lkm, 24)
_DEV(rnd, 32)
_DEV(xfs, 51)
_DEV(altq, 52)
+_DEV(systrace, 50)
dnl
divert(7)dnl
dnl
diff --git a/etc/etc.hppa/MAKEDEV.md b/etc/etc.hppa/MAKEDEV.md
index b2503c5ca3b..2c82c4884aa 100644
--- a/etc/etc.hppa/MAKEDEV.md
+++ b/etc/etc.hppa/MAKEDEV.md
@@ -1,5 +1,5 @@
vers(__file__,
- {-$OpenBSD: MAKEDEV.md,v 1.7 2002/02/25 19:46:36 todd Exp $-},
+ {-$OpenBSD: MAKEDEV.md,v 1.8 2002/05/16 21:11:20 miod Exp $-},
etc.MACHINE)dnl
dnl
dnl Copyright (c) 2001 Todd T. Fries <todd@OpenBSD.org>
@@ -59,6 +59,7 @@ _DEV(ch, 13)
_DEV(ss, 14)
_DEV(uk, 15)
_DEV(pdc, 22)
+_DEV(systrace, 34)
#
dnl
divert(7)dnl
diff --git a/etc/etc.mac68k/MAKEDEV.md b/etc/etc.mac68k/MAKEDEV.md
index fc589a2160d..19d33e17488 100644
--- a/etc/etc.mac68k/MAKEDEV.md
+++ b/etc/etc.mac68k/MAKEDEV.md
@@ -1,5 +1,5 @@
vers(__file__,
- {-$OpenBSD: MAKEDEV.md,v 1.7 2002/04/21 23:37:05 miod Exp $-},
+ {-$OpenBSD: MAKEDEV.md,v 1.8 2002/05/16 21:11:20 miod Exp $-},
etc.MACHINE)dnl
dnl
dnl Copyright (c) 2001 Todd T. Fries <todd@OpenBSD.org>
@@ -58,6 +58,7 @@ _DEV(ss, 33)
_DEV(xfs, 51)
_DEV(adb, 23)
_DEV(asc, 36)
+_DEV(systrace, 50)
dnl
divert(7)dnl
dnl
diff --git a/etc/etc.macppc/MAKEDEV.md b/etc/etc.macppc/MAKEDEV.md
index f2164b79978..4438a7ef4f3 100644
--- a/etc/etc.macppc/MAKEDEV.md
+++ b/etc/etc.macppc/MAKEDEV.md
@@ -1,5 +1,5 @@
vers(__file__,
- {-$OpenBSD: MAKEDEV.md,v 1.6 2002/04/21 07:04:28 deraadt Exp $-},
+ {-$OpenBSD: MAKEDEV.md,v 1.7 2002/05/16 21:11:20 miod Exp $-},
etc.MACHINE)dnl
dnl
dnl Copyright (c) 2001 Todd T. Fries <todd@OpenBSD.org>
@@ -78,6 +78,7 @@ _DEV(pf, 39)
_DEV(cry, 47)
_DEV(usbs)
_DEV(pci, 71)
+_DEV(systrace, 50)
dnl
divert(7)dnl
dnl
diff --git a/etc/etc.mvme68k/MAKEDEV.md b/etc/etc.mvme68k/MAKEDEV.md
index da489e58558..cb07cd7c350 100644
--- a/etc/etc.mvme68k/MAKEDEV.md
+++ b/etc/etc.mvme68k/MAKEDEV.md
@@ -1,5 +1,5 @@
vers(__file__,
- {-$OpenBSD: MAKEDEV.md,v 1.4 2002/04/28 14:49:25 miod Exp $-},
+ {-$OpenBSD: MAKEDEV.md,v 1.5 2002/05/16 21:11:20 miod Exp $-},
etc.MACHINE)dnl
dnl
dnl Copyright (c) 2002, Miodrag Vallat.
@@ -170,6 +170,7 @@ _DEV(nvram, 10)
_DEV(flash, 11)
_DEV(vmes, 32)
_DEV(vmel, 31)
+_DEV(systrace, 50)
dnl
divert(7)dnl
dnl
diff --git a/etc/etc.mvme88k/MAKEDEV.md b/etc/etc.mvme88k/MAKEDEV.md
index 10087cba3aa..a86b3faf40f 100644
--- a/etc/etc.mvme88k/MAKEDEV.md
+++ b/etc/etc.mvme88k/MAKEDEV.md
@@ -1,5 +1,5 @@
vers(__file__,
- {-$OpenBSD: MAKEDEV.md,v 1.3 2002/04/28 14:56:40 miod Exp $-},
+ {-$OpenBSD: MAKEDEV.md,v 1.4 2002/05/16 21:11:20 miod Exp $-},
etc.MACHINE)dnl
dnl
dnl Copyright (c) 2002, Miodrag Vallat.
@@ -138,6 +138,7 @@ _DEV(sram, 7)
_DEV(nvram, 10)
_DEV(vmes, 32)
_DEV(vmel, 31)
+_DEV(systrace, 50)
dnl
divert(7)dnl
dnl
diff --git a/etc/etc.mvmeppc/MAKEDEV.md b/etc/etc.mvmeppc/MAKEDEV.md
index 6916e31102d..3619e240ae5 100644
--- a/etc/etc.mvmeppc/MAKEDEV.md
+++ b/etc/etc.mvmeppc/MAKEDEV.md
@@ -1,5 +1,5 @@
#!/bin/sh -
-# $OpenBSD: MAKEDEV.md,v 1.3 2002/04/11 20:29:42 deraadt Exp $
+# $OpenBSD: MAKEDEV.md,v 1.4 2002/05/16 21:11:21 miod Exp $
#
# Copyright (c) 1990 The Regents of the University of California.
# All rights reserved.
@@ -68,6 +68,7 @@ _DEV(lkm)
_DEV(rnd)
_DEV(altq)
_DEV(pf, 39)
+_DEV(systrace, 50)
_DEV(usbs)
#
dnl
diff --git a/etc/etc.sparc/MAKEDEV.md b/etc/etc.sparc/MAKEDEV.md
index f59288dd1f5..0489863fbba 100644
--- a/etc/etc.sparc/MAKEDEV.md
+++ b/etc/etc.sparc/MAKEDEV.md
@@ -1,5 +1,5 @@
vers(__file__,
- {-$OpenBSD: MAKEDEV.md,v 1.11 2002/04/14 23:20:55 deraadt Exp $-},
+ {-$OpenBSD: MAKEDEV.md,v 1.12 2002/05/16 21:11:21 miod Exp $-},
etc.MACHINE)dnl
dnl
dnl Copyright (c) 2001 Todd T. Fries <todd@OpenBSD.org>
@@ -75,6 +75,7 @@ _DEV(xfs, 51)
_DEV(raid, 123, 25)
_DEV(fdesc, 24)
_DEV(ses, 124)
+_DEV(systrace, 50)
dnl
divert(7)dnl
dnl
diff --git a/etc/etc.sparc64/MAKEDEV.md b/etc/etc.sparc64/MAKEDEV.md
index a9987b236b5..a508cd45486 100644
--- a/etc/etc.sparc64/MAKEDEV.md
+++ b/etc/etc.sparc64/MAKEDEV.md
@@ -1,5 +1,5 @@
vers(__file__,
- {-$OpenBSD: MAKEDEV.md,v 1.20 2002/04/17 22:51:51 miod Exp $-},
+ {-$OpenBSD: MAKEDEV.md,v 1.21 2002/05/16 21:11:21 miod Exp $-},
etc.MACHINE)dnl
dnl
dnl Copyright (c) 2001 Todd T. Fries <todd@OpenBSD.org>
@@ -94,6 +94,7 @@ _DEV(bppsp, 109)
_DEV(cry, 75)
_DEV(pci, 52)
_DEV(uperf, 25)
+_DEV(systrace, 50)
dnl
divert(7)dnl
dnl
diff --git a/etc/etc.sun3/MAKEDEV.md b/etc/etc.sun3/MAKEDEV.md
index efdec54ecc4..a13077f9c98 100644
--- a/etc/etc.sun3/MAKEDEV.md
+++ b/etc/etc.sun3/MAKEDEV.md
@@ -1,5 +1,5 @@
vers(__file__,
- {-$OpenBSD: MAKEDEV.md,v 1.6 2002/04/14 23:26:46 deraadt Exp $-},
+ {-$OpenBSD: MAKEDEV.md,v 1.7 2002/05/16 21:11:21 miod Exp $-},
etc.MACHINE)dnl
dnl
dnl Copyright (c) 2001 Todd T. Fries <todd@OpenBSD.org>
@@ -60,6 +60,7 @@ _DEV(ss, 99)
_DEV(fdesc, 23)
_DEV(xfs, 51)
_DEV(altq, 85)
+_DEV(systrace, 86)
dnl
divert(2)dnl
dnl
diff --git a/etc/etc.vax/MAKEDEV.md b/etc/etc.vax/MAKEDEV.md
index f2baf5d87b0..080bc871cbc 100644
--- a/etc/etc.vax/MAKEDEV.md
+++ b/etc/etc.vax/MAKEDEV.md
@@ -1,5 +1,5 @@
vers(__file__,
- {-$OpenBSD: MAKEDEV.md,v 1.9 2002/02/21 18:36:55 deraadt Exp $-},
+ {-$OpenBSD: MAKEDEV.md,v 1.10 2002/05/16 21:11:21 miod Exp $-},
etc.MACHINE)dnl
dnl
dnl Copyright (c) 2001 Todd T. Fries <todd@OpenBSD.org>
@@ -79,6 +79,7 @@ _DEV(xfs, 51)
_DEV(raid, 73, 25)
_DEV(fdesc, 53)
_DEV(ses, 124)
+_DEV(systrace, 49)
dnl
divert(7)dnl
dnl
diff --git a/sys/arch/alpha/alpha/conf.c b/sys/arch/alpha/alpha/conf.c
index 0f6eca1321f..fc468aa275d 100644
--- a/sys/arch/alpha/alpha/conf.c
+++ b/sys/arch/alpha/alpha/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.37 2002/01/23 05:21:03 ericj Exp $ */
+/* $OpenBSD: conf.c,v 1.38 2002/05/16 21:11:10 miod Exp $ */
/* $NetBSD: conf.c,v 1.16 1996/10/18 21:26:57 cgd Exp $ */
/*-
@@ -145,6 +145,8 @@ cdev_decl(pci);
#include <altq/altqconf.h>
+#include "systrace.h"
+
struct cdevsw cdevsw[] =
{
cdev_cn_init(1,cn), /* 0: virtual console */
@@ -197,7 +199,7 @@ struct cdevsw cdevsw[] =
cdev_lpt_init(NULPT,ulpt), /* 47: USB printer */
cdev_ugen_init(NUGEN,ugen), /* 48: USB generic driver */
cdev_tty_init(NUCOM, ucom), /* 49: USB tty */
- cdev_notdef(), /* 50 */
+ cdev_systrace_init(NSYSTRACE,systrace), /* 50 system call tracing */
#ifdef XFS
cdev_xfs_init(NXFS,xfs_dev), /* 51: xfs communication device */
#else
diff --git a/sys/arch/alpha/alpha/trap.c b/sys/arch/alpha/alpha/trap.c
index 281696867f2..383576c598f 100644
--- a/sys/arch/alpha/alpha/trap.c
+++ b/sys/arch/alpha/alpha/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.34 2002/04/29 00:30:36 pvalchev Exp $ */
+/* $OpenBSD: trap.c,v 1.35 2002/05/16 21:11:10 miod Exp $ */
/* $NetBSD: trap.c,v 1.52 2000/05/24 16:48:33 thorpej Exp $ */
/*-
@@ -110,6 +110,9 @@
#endif
#include <sys/ptrace.h>
+#include "systrace.h"
+#include <dev/systrace.h>
+
#include <uvm/uvm_extern.h>
#include <machine/cpu.h>
@@ -704,7 +707,12 @@ syscall(code, framep)
if (error == 0) {
rval[0] = 0;
rval[1] = 0;
- error = (*callp->sy_call)(p, args + hidden, rval);
+#if NSYSTRACE > 0
+ if (ISSET(p->p_flag, P_SYSTRACE))
+ error = systrace_redirect(code, p, args + hidden, rval);
+ else
+#endif
+ error = (*callp->sy_call)(p, args + hidden, rval);
}
switch (error) {
diff --git a/sys/arch/amiga/amiga/conf.c b/sys/arch/amiga/amiga/conf.c
index b22c4875688..a073235db15 100644
--- a/sys/arch/amiga/amiga/conf.c
+++ b/sys/arch/amiga/amiga/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.34 2002/03/14 01:26:28 millert Exp $ */
+/* $OpenBSD: conf.c,v 1.35 2002/05/16 21:11:13 miod Exp $ */
/* $NetBSD: conf.c,v 1.42 1997/01/07 11:35:03 mrg Exp $ */
/*-
@@ -118,6 +118,8 @@ int nblkdev = sizeof(bdevsw) / sizeof(bdevsw[0]);
#include <altq/altqconf.h>
+#include "systrace.h"
+
struct cdevsw cdevsw[] =
{
cdev_cn_init(1,cn), /* 0: virtual console */
@@ -171,7 +173,7 @@ struct cdevsw cdevsw[] =
cdev_notdef(), /* 47 */
cdev_notdef(), /* 48 */
cdev_notdef(), /* 49 */
- cdev_notdef(), /* 50 */
+ cdev_systrace_init(NSYSTRACE,systrace), /* 50 system call tracing */
#ifdef XFS
cdev_xfs_init(NXFS,xfs_dev), /* 51: xfs communication device */
#else
diff --git a/sys/arch/amiga/amiga/trap.c b/sys/arch/amiga/amiga/trap.c
index 679ddd9efe2..c45f5bb41a3 100644
--- a/sys/arch/amiga/amiga/trap.c
+++ b/sys/arch/amiga/amiga/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.32 2002/03/25 18:09:13 niklas Exp $ */
+/* $OpenBSD: trap.c,v 1.33 2002/05/16 21:11:13 miod Exp $ */
/* $NetBSD: trap.c,v 1.56 1997/07/16 00:01:47 is Exp $ */
/*
@@ -57,6 +57,10 @@
#endif
#include <sys/user.h>
+
+#include "systrace.h"
+#include <dev/systrace.h>
+
#include <uvm/uvm_extern.h>
#include <uvm/uvm_pmap.h>
@@ -889,7 +893,12 @@ syscall(code, frame)
goto bad;
rval[0] = 0;
rval[1] = frame.f_regs[D1];
- error = (*callp->sy_call)(p, args, rval);
+#if NSYSTRACE > 0
+ if (ISSET(p->p_flag, P_SYSTRACE))
+ error = systrace_redirect(code, p, args, rval);
+ else
+#endif
+ error = (*callp->sy_call)(p, args, rval);
switch (error) {
case 0:
/*
diff --git a/sys/arch/hp300/hp300/conf.c b/sys/arch/hp300/hp300/conf.c
index 01dff99f623..e16687b646e 100644
--- a/sys/arch/hp300/hp300/conf.c
+++ b/sys/arch/hp300/hp300/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.28 2001/12/11 23:19:02 miod Exp $ */
+/* $OpenBSD: conf.c,v 1.29 2002/05/16 21:11:13 miod Exp $ */
/* $NetBSD: conf.c,v 1.39 1997/05/12 08:17:53 thorpej Exp $ */
/*-
@@ -131,6 +131,8 @@ cdev_decl(xfs_dev);
#include <altq/altqconf.h>
+#include "systrace.h"
+
struct cdevsw cdevsw[] =
{
cdev_cn_init(1,cn), /* 0: virtual console */
@@ -183,7 +185,7 @@ struct cdevsw cdevsw[] =
cdev_notdef(), /* 47 */
cdev_notdef(), /* 48 */
cdev_notdef(), /* 49 */
- cdev_notdef(), /* 50 */
+ cdev_systrace_init(NSYSTRACE,systrace), /* 50 system call tracing */
#ifdef XFS
cdev_xfs_init(NXFS,xfs_dev), /* 51: xfs communication device */
#else
diff --git a/sys/arch/hp300/hp300/trap.c b/sys/arch/hp300/hp300/trap.c
index 62884a42eb1..6e1a631927c 100644
--- a/sys/arch/hp300/hp300/trap.c
+++ b/sys/arch/hp300/hp300/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.36 2002/03/14 01:26:31 millert Exp $ */
+/* $OpenBSD: trap.c,v 1.37 2002/05/16 21:11:13 miod Exp $ */
/* $NetBSD: trap.c,v 1.57 1998/02/16 20:58:31 thorpej Exp $ */
/*
@@ -95,6 +95,9 @@
#include <machine/reg.h>
#include <machine/intr.h>
+#include "systrace.h"
+#include <dev/systrace.h>
+
#include <uvm/uvm_extern.h>
#include <uvm/uvm_pmap.h>
@@ -1127,7 +1130,12 @@ syscall(code, frame)
goto bad;
rval[0] = 0;
rval[1] = frame.f_regs[D1];
- error = (*callp->sy_call)(p, args, rval);
+#if NSYSTRACE > 0
+ if (ISSET(p->p_flag, P_SYSTRACE))
+ error = systrace_redirect(code, p, args, rval);
+ else
+#endif
+ error = (*callp->sy_call)(p, args, rval);
switch (error) {
case 0:
frame.f_regs[D0] = rval[0];
diff --git a/sys/arch/hppa/hppa/conf.c b/sys/arch/hppa/hppa/conf.c
index 39fb915a6f3..de328f9cc2a 100644
--- a/sys/arch/hppa/hppa/conf.c
+++ b/sys/arch/hppa/hppa/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.17 2002/03/16 00:34:56 mickey Exp $ */
+/* $OpenBSD: conf.c,v 1.18 2002/05/16 21:11:14 miod Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.
@@ -114,6 +114,8 @@ cdev_decl(com);
#include <altq/altqconf.h>
+#include "systrace.h"
+
struct cdevsw cdevsw[] =
{
cdev_cn_init(1,cn), /* 0: virtual console */
@@ -155,12 +157,13 @@ struct cdevsw cdevsw[] =
cdev_notdef(), /* 32 */
#endif
cdev_altq_init(NALTQ,altq), /* 33: ALTQ control interface */
- cdev_lkm_dummy(),
- cdev_lkm_dummy(),
- cdev_lkm_dummy(),
- cdev_lkm_dummy(),
- cdev_lkm_dummy(),
- cdev_lkm_dummy(),
+ cdev_systrace_init(NSYSTRACE,systrace) /* 34: system call tracing */
+ cdev_lkm_dummy(), /* 35 */
+ cdev_lkm_dummy(), /* 36 */
+ cdev_lkm_dummy(), /* 37 */
+ cdev_lkm_dummy(), /* 38 */
+ cdev_lkm_dummy(), /* 39 */
+ cdev_lkm_dummy(), /* 40 */
};
int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);
diff --git a/sys/arch/hppa/hppa/trap.c b/sys/arch/hppa/hppa/trap.c
index d74614e1e03..d060904ec74 100644
--- a/sys/arch/hppa/hppa/trap.c
+++ b/sys/arch/hppa/hppa/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.41 2002/03/16 01:13:42 mickey Exp $ */
+/* $OpenBSD: trap.c,v 1.42 2002/05/16 21:11:14 miod Exp $ */
/*
* Copyright (c) 1998-2001 Michael Shalayeff
@@ -42,6 +42,9 @@
#include <net/netisr.h>
+#include "systrace.h"
+#include <dev/systrace.h>
+
#include <uvm/uvm.h>
#include <machine/autoconf.h>
@@ -496,7 +499,13 @@ syscall(frame, args)
rval[0] = 0;
rval[1] = 0;
- switch (error = (*callp->sy_call)(p, args, rval)) {
+#if NSYSTRACE > 0
+ if (ISSET(p->p_flag, P_SYSTRACE))
+ error = systrace_redirect(code, p, args, rval);
+ else
+#endif
+ error = (*callp->sy_call)(p, args, rval);
+ switch (error) {
case 0:
p = curproc; /* changes on exec() */
frame = p->p_md.md_regs;
diff --git a/sys/arch/i386/i386/conf.c b/sys/arch/i386/i386/conf.c
index 0ea403c77cb..eb2fe1d13c2 100644
--- a/sys/arch/i386/i386/conf.c
+++ b/sys/arch/i386/i386/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.89 2002/05/16 16:16:52 provos Exp $ */
+/* $OpenBSD: conf.c,v 1.90 2002/05/16 21:11:14 miod Exp $ */
/* $NetBSD: conf.c,v 1.75 1996/05/03 19:40:20 christos Exp $ */
/*
@@ -142,7 +142,6 @@ cdev_decl(mm);
cdev_decl(wd);
cdev_decl(crypto);
#include "systrace.h"
-cdev_decl(systrace);
#include "pty.h"
#include "com.h"
#include "pccom.h"
diff --git a/sys/arch/mac68k/mac68k/conf.c b/sys/arch/mac68k/mac68k/conf.c
index eef0ca21468..254a1a4a2a4 100644
--- a/sys/arch/mac68k/mac68k/conf.c
+++ b/sys/arch/mac68k/mac68k/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.28 2002/04/21 23:35:52 miod Exp $ */
+/* $OpenBSD: conf.c,v 1.29 2002/05/16 21:11:15 miod Exp $ */
/* $NetBSD: conf.c,v 1.41 1997/02/11 07:35:49 scottr Exp $ */
/*
@@ -113,6 +113,8 @@ cdev_decl(xfs_dev);
#include <altq/altqconf.h>
+#include "systrace.h"
+
struct cdevsw cdevsw[] =
{
cdev_cn_init(1,cn), /* 0: virtual console */
@@ -165,7 +167,7 @@ struct cdevsw cdevsw[] =
cdev_notdef(), /* 47 */
cdev_notdef(), /* 48 */
cdev_notdef(), /* 49 */
- cdev_notdef(), /* 50 */
+ cdev_systrace_init(NSYSTRACE,systrace), /* 50 system call tracing */
#ifdef XFS
cdev_xfs_init(NXFS,xfs_dev), /* 51: xfs communication device */
#else
diff --git a/sys/arch/mac68k/mac68k/trap.c b/sys/arch/mac68k/mac68k/trap.c
index ce27b71adf7..65b04845af1 100644
--- a/sys/arch/mac68k/mac68k/trap.c
+++ b/sys/arch/mac68k/mac68k/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.36 2002/04/27 01:52:13 miod Exp $ */
+/* $OpenBSD: trap.c,v 1.37 2002/05/16 21:11:15 miod Exp $ */
/* $NetBSD: trap.c,v 1.68 1998/12/22 08:47:07 scottr Exp $ */
/*
@@ -71,6 +71,9 @@
#include <m68k/fpe/fpu_emulate.h>
+#include "systrace.h"
+#include <dev/systrace.h>
+
#include <uvm/uvm_extern.h>
#include <uvm/uvm_pmap.h>
@@ -1065,7 +1068,12 @@ syscall(code, frame)
goto bad;
rval[0] = 0;
rval[1] = frame.f_regs[D1];
- error = (*callp->sy_call)(p, args, rval);
+#if NSYSTRACE > 0
+ if (ISSET(p->p_flag, P_SYSTRACE))
+ error = systrace_redirect(code, p, args, rval);
+ else
+#endif
+ error = (*callp->sy_call)(p, args, rval);
switch (error) {
case 0:
frame.f_regs[D0] = rval[0];
diff --git a/sys/arch/macppc/macppc/conf.c b/sys/arch/macppc/macppc/conf.c
index 0eb0a48b578..0e9e35e4b8b 100644
--- a/sys/arch/macppc/macppc/conf.c
+++ b/sys/arch/macppc/macppc/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.9 2001/12/12 19:19:17 jason Exp $ */
+/* $OpenBSD: conf.c,v 1.10 2002/05/16 21:11:15 miod Exp $ */
/*
* Copyright (c) 1997 Per Fogelstrom
@@ -151,6 +151,8 @@ cdev_decl(pci);
#include <altq/altqconf.h>
+#include "systrace.h"
+
struct cdevsw cdevsw[] = {
cdev_cn_init(1,cn), /* 0: virtual console */
cdev_ctty_init(1,ctty), /* 1: controlling terminal */
@@ -202,7 +204,7 @@ struct cdevsw cdevsw[] = {
cdev_crypto_init(NCRYPTO,crypto), /* 47: /dev/crypto */
cdev_notdef(), /* 48 */
cdev_notdef(), /* 49 */
- cdev_notdef(), /* 50 */
+ cdev_systrace_init(NSYSTRACE,systrace), /* 50 system call tracing */
#ifdef XFS
cdev_xfs_init(NXFS,xfs_dev), /* 51: xfs communication device */
#else
diff --git a/sys/arch/mvme68k/mvme68k/conf.c b/sys/arch/mvme68k/mvme68k/conf.c
index c447e18687e..2b54af82448 100644
--- a/sys/arch/mvme68k/mvme68k/conf.c
+++ b/sys/arch/mvme68k/mvme68k/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.28 2002/04/28 14:48:29 miod Exp $ */
+/* $OpenBSD: conf.c,v 1.29 2002/05/16 21:11:15 miod Exp $ */
/*-
* Copyright (c) 1995 Theo de Raadt
@@ -163,6 +163,8 @@ cdev_decl(xd);
#include <altq/altqconf.h>
+#include "systrace.h"
+
struct cdevsw cdevsw[] =
{
cdev_cn_init(1,cn), /* 0: virtual console */
@@ -219,7 +221,7 @@ struct cdevsw cdevsw[] =
cdev_lkm_dummy(), /* 47 */
cdev_lkm_dummy(), /* 48 */
cdev_lkm_dummy(), /* 49 */
- cdev_lkm_dummy(), /* 50 */
+ cdev_systrace_init(NSYSTRACE,systrace), /* 50 system call tracing */
#ifdef XFS
cdev_xfs_init(NXFS,xfs_dev), /* 51: xfs communication device */
#else
diff --git a/sys/arch/mvme68k/mvme68k/trap.c b/sys/arch/mvme68k/mvme68k/trap.c
index 4763ab45aa8..750dbf02141 100644
--- a/sys/arch/mvme68k/mvme68k/trap.c
+++ b/sys/arch/mvme68k/mvme68k/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.44 2002/04/28 14:47:54 miod Exp $ */
+/* $OpenBSD: trap.c,v 1.45 2002/05/16 21:11:16 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -97,6 +97,9 @@
extern struct emul emul_sunos;
#endif
+#include "systrace.h"
+#include <dev/systrace.h>
+
#include <uvm/uvm_extern.h>
#include <uvm/uvm_pmap.h>
@@ -1071,7 +1074,12 @@ syscall(code, frame)
goto bad;
rval[0] = 0;
rval[1] = frame.f_regs[D1];
- error = (*callp->sy_call)(p, args, rval);
+#if NSYSTRACE > 0
+ if (ISSET(p->p_flag, P_SYSTRACE))
+ error = systrace_redirect(code, p, args, rval);
+ else
+#endif
+ error = (*callp->sy_call)(p, args, rval);
switch (error) {
case 0:
frame.f_regs[D0] = rval[0];
diff --git a/sys/arch/mvme88k/mvme88k/conf.c b/sys/arch/mvme88k/mvme88k/conf.c
index 493045bc2da..70628981874 100644
--- a/sys/arch/mvme88k/mvme88k/conf.c
+++ b/sys/arch/mvme88k/mvme88k/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.21 2002/04/28 15:17:09 miod Exp $ */
+/* $OpenBSD: conf.c,v 1.22 2002/05/16 21:11:16 miod Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.
@@ -106,6 +106,8 @@ cdev_decl(lptwo);
#include <altq/altqconf.h>
+#include "systrace.h"
+
struct bdevsw bdevsw[] =
{
bdev_notdef(), /* 0 */
@@ -197,7 +199,7 @@ struct cdevsw cdevsw[] =
cdev_notdef(), /* 47 */
cdev_notdef(), /* 48 */
cdev_notdef(), /* 49 */
- cdev_notdef(), /* 50 */
+ cdev_systrace_init(NSYSTRACE,systrace), /* 50 system call tracing */
#ifdef XFS
cde_xfs_init(NXFS,xfs_dev), /* 51: xfs communication device */
#else
diff --git a/sys/arch/mvme88k/mvme88k/trap.c b/sys/arch/mvme88k/mvme88k/trap.c
index ac40778ebcc..76bf7e8858f 100644
--- a/sys/arch/mvme88k/mvme88k/trap.c
+++ b/sys/arch/mvme88k/mvme88k/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.35 2002/03/26 01:00:27 miod Exp $ */
+/* $OpenBSD: trap.c,v 1.36 2002/05/16 21:11:16 miod Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -53,6 +53,9 @@
#include <sys/systm.h>
#include <sys/ktrace.h>
+#include "systrace.h"
+#include <dev/systrace.h>
+
#include <uvm/uvm_extern.h>
#include <machine/asm_macro.h> /* enable/disable interrupts */
@@ -1317,7 +1320,12 @@ m88100_syscall(register_t code, struct m88100_saved_state *tf)
#endif
rval[0] = 0;
rval[1] = 0;
- error = (*callp->sy_call)(p, &args, rval);
+#if NSYSTRACE > 0
+ if (ISSET(p->p_flag, P_SYSTRACE))
+ error = systrace_redirect(code, p, &args, rval);
+ else
+#endif
+ error = (*callp->sy_call)(p, &args, rval);
/*
* system call will look like:
* ld r10, r31, 32; r10,r11,r12 might be garbage.
diff --git a/sys/arch/mvmeppc/mvmeppc/conf.c b/sys/arch/mvmeppc/mvmeppc/conf.c
index 89070db43c3..3a341985fb3 100644
--- a/sys/arch/mvmeppc/mvmeppc/conf.c
+++ b/sys/arch/mvmeppc/mvmeppc/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.10 2001/12/11 23:19:02 miod Exp $ */
+/* $OpenBSD: conf.c,v 1.11 2002/05/16 21:11:17 miod Exp $ */
/*
* Copyright (c) 1997 Per Fogelstrom
@@ -121,6 +121,8 @@ cdev_decl(ksyms);
#include <altq/altqconf.h>
+#include "systrace.h"
+
struct cdevsw cdevsw[] = {
cdev_cn_init(1,cn), /* 0: virtual console */
cdev_ctty_init(1,ctty), /* 1: controlling terminal */
@@ -176,7 +178,7 @@ struct cdevsw cdevsw[] = {
cdev_notdef(), /* 47 */
cdev_notdef(), /* 48 */
cdev_notdef(), /* 49 */
- cdev_notdef(), /* 50 */
+ cdev_systrace_init(NSYSTRACE,systrace), /* 50 system call tracing */
#ifdef XFS
cdev_xfs_init(NXFS,xfs_dev), /* 51: xfs communication device */
#else
diff --git a/sys/arch/powerpc/powerpc/trap.c b/sys/arch/powerpc/powerpc/trap.c
index 6300e4d3a71..1729b29acef 100644
--- a/sys/arch/powerpc/powerpc/trap.c
+++ b/sys/arch/powerpc/powerpc/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.47 2002/05/15 22:49:16 drahn Exp $ */
+/* $OpenBSD: trap.c,v 1.48 2002/05/16 21:11:17 miod Exp $ */
/* $NetBSD: trap.c,v 1.3 1996/10/13 03:31:37 christos Exp $ */
/*
@@ -52,6 +52,9 @@
#include <machine/trap.h>
#include <machine/db_machdep.h>
+#include "systrace.h"
+#include <dev/systrace.h>
+
#include <uvm/uvm_extern.h>
#include <ddb/db_extern.h>
@@ -442,11 +445,18 @@ printf("isi iar %x lr %x\n", frame->srr0, frame->lr);
rval[1] = frame->fixreg[FIRSTARG + 1];
#ifdef SYSCALL_DEBUG
- scdebug_call(p, code, params);
+ scdebug_call(p, code, params);
#endif
- switch (error = (*callp->sy_call)(p, params, rval)) {
+#if NSYSTRACE > 0
+ if (ISSET(p->p_flag, P_SYSTRACE))
+ error = systrace_redirect(code, p, params,
+ rval);
+ else
+#endif
+ error = (*callp->sy_call)(p, params, rval);
+ switch (error) {
case 0:
frame->fixreg[0] = error;
frame->fixreg[FIRSTARG] = rval[0];
diff --git a/sys/arch/sparc/sparc/conf.c b/sys/arch/sparc/sparc/conf.c
index 49d4cac45d0..372382f52be 100644
--- a/sys/arch/sparc/sparc/conf.c
+++ b/sys/arch/sparc/sparc/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.31 2001/12/11 23:19:02 miod Exp $ */
+/* $OpenBSD: conf.c,v 1.32 2002/05/16 21:11:17 miod Exp $ */
/* $NetBSD: conf.c,v 1.40 1996/04/11 19:20:03 thorpej Exp $ */
/*
@@ -132,6 +132,8 @@ int nblkdev = sizeof(bdevsw) / sizeof(bdevsw[0]);
#include <altq/altqconf.h>
+#include "systrace.h"
+
struct cdevsw cdevsw[] =
{
cdev_cn_init(1,cn), /* 0: virtual console */
@@ -188,7 +190,7 @@ struct cdevsw cdevsw[] =
cdev_notdef(), /* 47 */
cdev_notdef(), /* 48 */
cdev_notdef(), /* 49 */
- cdev_notdef(), /* 50 */
+ cdev_systrace_init(NSYSTRACE,systrace), /* 50 system call tracing */
#ifdef XFS
cdev_xfs_init(NXFS,xfs_dev), /* 51: xfs communication device */
#else
diff --git a/sys/arch/sparc/sparc/trap.c b/sys/arch/sparc/sparc/trap.c
index 653ac487b94..d0d57e22c43 100644
--- a/sys/arch/sparc/sparc/trap.c
+++ b/sys/arch/sparc/sparc/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.37 2002/03/26 01:00:30 miod Exp $ */
+/* $OpenBSD: trap.c,v 1.38 2002/05/16 21:11:18 miod Exp $ */
/* $NetBSD: trap.c,v 1.58 1997/09/12 08:55:01 pk Exp $ */
/*
@@ -65,6 +65,9 @@
#include <sys/ktrace.h>
#endif
+#include "systrace.h"
+#include <dev/systrace.h>
+
#include <uvm/uvm_extern.h>
#include <sparc/sparc/asm.h>
@@ -1100,7 +1103,12 @@ syscall(code, tf, pc)
#endif
rval[0] = 0;
rval[1] = tf->tf_out[1];
- error = (*callp->sy_call)(p, &args, rval);
+#if NSYSTRACE > 0
+ if (ISSET(p->p_flag, P_SYSTRACE))
+ error = systrace_redirect(code, p, &args, rval);
+ else
+#endif
+ error = (*callp->sy_call)(p, &args, rval);
switch (error) {
case 0:
diff --git a/sys/arch/sparc64/sparc64/conf.c b/sys/arch/sparc64/sparc64/conf.c
index 16133e3f147..cc1ba43e763 100644
--- a/sys/arch/sparc64/sparc64/conf.c
+++ b/sys/arch/sparc64/sparc64/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.29 2002/03/15 20:46:11 jason Exp $ */
+/* $OpenBSD: conf.c,v 1.30 2002/05/16 21:11:18 miod Exp $ */
/* $NetBSD: conf.c,v 1.17 2001/03/26 12:33:26 lukem Exp $ */
/*
@@ -132,6 +132,8 @@ cdev_decl(xfs_dev);
#include "ksyms.h"
#include "inet.h"
+#include "systrace.h"
+
struct bdevsw bdevsw[] =
{
bdev_notdef(), /* 0 */
@@ -215,7 +217,7 @@ struct cdevsw cdevsw[] =
cdev_notdef(), /* 47 */
cdev_notdef(), /* 48 */
cdev_notdef(), /* 49 */
- cdev_notdef(), /* 50 */
+ cdev_systrace_init(NSYSTRACE,systrace), /* 50 system call tracing */
#ifdef XFS
cdev_xfs_init(NXFS,xfs_dev), /* 51: xfs communication device */
#else
diff --git a/sys/arch/sparc64/sparc64/trap.c b/sys/arch/sparc64/sparc64/trap.c
index 2abccb51f90..98b919289b5 100644
--- a/sys/arch/sparc64/sparc64/trap.c
+++ b/sys/arch/sparc64/sparc64/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.18 2002/03/26 01:00:30 miod Exp $ */
+/* $OpenBSD: trap.c,v 1.19 2002/05/16 21:11:18 miod Exp $ */
/* $NetBSD: trap.c,v 1.73 2001/08/09 01:03:01 eeh Exp $ */
/*
@@ -67,6 +67,9 @@
#include <sys/ktrace.h>
#endif
+#include "systrace.h"
+#include <dev/systrace.h>
+
#include <uvm/uvm_extern.h>
#include <machine/cpu.h>
@@ -1360,7 +1363,12 @@ syscall(tf, code, pc)
#endif
rval[0] = 0;
rval[1] = tf->tf_out[1];
- error = (*callp->sy_call)(p, &args, rval);
+#if NSYSTRACE > 0
+ if (ISSET(p->p_flag, P_SYSTRACE))
+ error = systrace_redirect(code, p, &args, rval);
+ else
+#endif
+ error = (*callp->sy_call)(p, &args, rval);
switch (error) {
vaddr_t dest;
diff --git a/sys/arch/sun3/sun3/conf.c b/sys/arch/sun3/sun3/conf.c
index 2a9917fab18..3f1ebfef1d4 100644
--- a/sys/arch/sun3/sun3/conf.c
+++ b/sys/arch/sun3/sun3/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.31 2001/12/11 23:19:02 miod Exp $ */
+/* $OpenBSD: conf.c,v 1.32 2002/05/16 21:11:18 miod Exp $ */
/* $NetBSD: conf.c,v 1.51 1996/11/04 16:16:09 gwr Exp $ */
/*-
@@ -113,6 +113,8 @@ int nblkdev = sizeof(bdevsw) / sizeof(bdevsw[0]);
#include <altq/altqconf.h>
+#include "systrace.h"
+
struct cdevsw cdevsw[] =
{
cdev_cn_init(1,cn), /* 0: virtual console */
@@ -205,6 +207,7 @@ struct cdevsw cdevsw[] =
cdev_ch_init(NCH,ch), /* 83: SCSI autochanger */
cdev_ses_init(NSES,ses), /* 84: SCSI SES or SAF-TE device */
cdev_altq_init(NALTQ,altq), /* 85: ALTQ control interface */
+ cdev_systrace_init(NSYSTRACE,systrace), /* 86: system call tracing */
};
int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);
diff --git a/sys/arch/sun3/sun3/trap.c b/sys/arch/sun3/sun3/trap.c
index 0605c2ecf8e..492957233be 100644
--- a/sys/arch/sun3/sun3/trap.c
+++ b/sys/arch/sun3/sun3/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.32 2002/03/14 01:26:47 millert Exp $ */
+/* $OpenBSD: trap.c,v 1.33 2002/05/16 21:11:18 miod Exp $ */
/* $NetBSD: trap.c,v 1.63-1.65ish 1997/01/16 15:41:40 gwr Exp $ */
/*
@@ -58,6 +58,9 @@
#include <sys/ktrace.h>
#endif
+#include "systrace.h"
+#include <dev/systrace.h>
+
#include <uvm/uvm_extern.h>
#include <uvm/uvm_pmap.h>
@@ -704,7 +707,12 @@ syscall(code, frame)
goto bad;
rval[0] = 0;
rval[1] = frame.f_regs[D1];
- error = (*callp->sy_call)(p, args, rval);
+#if NSYSTRACE > 0
+ if (ISSET(p->p_flag, P_SYSTRACE))
+ error = systrace_redirect(code, p, args, rval);
+ else
+#endif
+ error = (*callp->sy_call)(p, args, rval);
switch (error) {
case 0:
frame.f_regs[D0] = rval[0];
diff --git a/sys/arch/vax/vax/conf.c b/sys/arch/vax/vax/conf.c
index 2ad52c41d5e..1f265f7a9e5 100644
--- a/sys/arch/vax/vax/conf.c
+++ b/sys/arch/vax/vax/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.33 2002/03/14 01:26:48 millert Exp $ */
+/* $OpenBSD: conf.c,v 1.34 2002/05/16 21:11:19 miod Exp $ */
/* $NetBSD: conf.c,v 1.44 1999/10/27 16:38:54 ragge Exp $ */
/*-
@@ -404,6 +404,8 @@ cdev_decl(xfs_dev);
#include <altq/altqconf.h>
+#include "systrace.h"
+
struct cdevsw cdevsw[] =
{
cdev_cn_init(1,cn), /* 0: virtual console */
@@ -455,7 +457,7 @@ struct cdevsw cdevsw[] =
cdev_notdef(), /* 46 was Datakit */
cdev_notdef(), /* 47 */
cdev_notdef(), /* 48 */
- cdev_notdef(), /* 49 */
+ cdev_systrace_init(NSYSTRACE,systrace), /* 49: system call tracing */
cdev_ksyms_init(NKSYMS,ksyms), /* 50: Kernel symbols device */
cdev_cnstore_init(NCRX,crx), /* 51: Console RX50 at 8200 */
cdev_notdef(), /* 52: was: KDB50/RA?? */
diff --git a/sys/arch/vax/vax/trap.c b/sys/arch/vax/vax/trap.c
index d9291ea47c1..19d5f75218b 100644
--- a/sys/arch/vax/vax/trap.c
+++ b/sys/arch/vax/vax/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.23 2002/05/16 07:37:44 miod Exp $ */
+/* $OpenBSD: trap.c,v 1.24 2002/05/16 21:11:19 miod Exp $ */
/* $NetBSD: trap.c,v 1.47 1999/08/21 19:26:20 matt Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
@@ -40,6 +40,9 @@
#include <sys/signalvar.h>
#include <sys/exec.h>
+#include "systrace.h"
+#include <dev/systrace.h>
+
#include <uvm/uvm_extern.h>
#include <machine/mtpr.h>
@@ -435,7 +438,12 @@ if(startsysc)printf("trap syscall %s pc %lx, psl %lx, sp %lx, pid %d, frame %p\n
if (KTRPOINT(p, KTR_SYSCALL))
ktrsyscall(p, frame->code, callp->sy_argsize, args);
#endif
- err = (*callp->sy_call)(curproc, args, rval);
+#if NSYSTRACE > 0
+ if (ISSET(p->p_flag, P_SYSTRACE))
+ err = systrace_redirect(frame->code, curproc, args, rval);
+ else
+#endif
+ err = (*callp->sy_call)(curproc, args, rval);
exptr = curproc->p_addr->u_pcb.framep;
#ifdef TRAPDEBUG
diff --git a/sys/sys/conf.h b/sys/sys/conf.h
index 3e5bba3cde3..ac83db19eab 100644
--- a/sys/sys/conf.h
+++ b/sys/sys/conf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.h,v 1.53 2002/05/16 16:16:51 provos Exp $ */
+/* $OpenBSD: conf.h,v 1.54 2002/05/16 21:11:19 miod Exp $ */
/* $NetBSD: conf.h,v 1.33 1996/05/03 20:03:32 christos Exp $ */
/*-
@@ -567,4 +567,6 @@ cdev_decl(wsmux);
#endif
cdev_decl(svr4_net);
+cdev_decl(systrace);
+
#endif