summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoravsm <avsm@openbsd.org>2003-10-28 13:22:44 +0000
committeravsm <avsm@openbsd.org>2003-10-28 13:22:44 +0000
commit7ff5aa8f3784065cf8e9f8fd73dd7cac4af3540c (patch)
treef6fa6c5f05143de4ac11a366307b990b30e3875a
parentsync (diff)
downloadwireguard-openbsd-7ff5aa8f3784065cf8e9f8fd73dd7cac4af3540c.tar.xz
wireguard-openbsd-7ff5aa8f3784065cf8e9f8fd73dd7cac4af3540c.zip
guard cpu register functions from userland, otherwise they appear when
including stuff like <sys/sysctl.h> deraadt@ ok
-rw-r--r--sys/arch/i386/include/cpufunc.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/arch/i386/include/cpufunc.h b/sys/arch/i386/include/cpufunc.h
index 514d634c8f2..d90a120429b 100644
--- a/sys/arch/i386/include/cpufunc.h
+++ b/sys/arch/i386/include/cpufunc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpufunc.h,v 1.10 2003/10/24 09:03:20 grange Exp $ */
+/* $OpenBSD: cpufunc.h,v 1.11 2003/10/28 13:22:44 avsm Exp $ */
/* $NetBSD: cpufunc.h,v 1.8 1994/10/27 04:15:59 cgd Exp $ */
/*
@@ -34,6 +34,8 @@
#ifndef _I386_CPUFUNC_H_
#define _I386_CPUFUNC_H_
+#ifdef _KERNEL
+
/*
* Functions to provide access to i386-specific instructions.
*/
@@ -207,4 +209,5 @@ breakpoint(void)
__asm __volatile("int $3");
}
+#endif /* _KERNEL */
#endif /* !_I386_CPUFUNC_H_ */