summaryrefslogtreecommitdiff
path: root/lib/libarch
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2006-02-24 01:09:39 +0000
committerDamien Miller <djm@cvs.openbsd.org>2006-02-24 01:09:39 +0000
commita11304e2597c2a67f356537b96ec1d8cb54a3fd4 (patch)
tree485af13b9df7f3475d969032c5473569f755306d /lib/libarch
parente83f29788d1785032e78fd8e875a9419890b4c7c (diff)
amd64_iopl() needs securelevel <= 0, or machdep.allowapeture > 0
just like i386_iopl()
Diffstat (limited to 'lib/libarch')
-rw-r--r--lib/libarch/amd64/amd64_iopl.217
1 files changed, 13 insertions, 4 deletions
diff --git a/lib/libarch/amd64/amd64_iopl.2 b/lib/libarch/amd64/amd64_iopl.2
index dd3471f73ab..d0ea5a978c3 100644
--- a/lib/libarch/amd64/amd64_iopl.2
+++ b/lib/libarch/amd64/amd64_iopl.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: amd64_iopl.2,v 1.2 2004/03/12 17:40:28 jmc Exp $
+.\" $OpenBSD: amd64_iopl.2,v 1.3 2006/02/24 01:09:38 djm Exp $
.\" $NetBSD: amd64_iopl.2,v 1.3 1996/02/27 22:57:25 jtc Exp $
.\"
.\" Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -50,7 +50,13 @@
.Fn amd64_iopl
sets the amd64 I/O privilege level to the value specified by
.Ar iopl .
-This call is restricted to the superuser.
+.Pp
+This call may only be made by the superuser.
+Additionally, it is only permitted when the
+.Xr securelevel 7
+is less than or equal to 0 or the
+.Va machdep.allowaperture
+sysctl has been set to a non-zero value.
.Pp
.Sy Note:
Code using the
@@ -70,11 +76,14 @@ is set to indicate the error.
will fail if:
.Bl -tag -width [EINVAL]
.It Bq Er EPERM
-The caller was not the superuser.
+The caller was not the superuser, or the securelevel is non-zero and
+.Va machdep.allowaperture
+has not been set to a non-zero value.
.El
.Sh SEE ALSO
.Xr amd64_get_ioperm 2 ,
-.Xr amd64_set_ioperm 2
+.Xr amd64_set_ioperm 2 ,
+.Xr securelevel 7
.Sh REFERENCES
.Rs
.%A Intel