We have never implemented amd64_get_ioperm and amd64_set_ioperm. There
are libarch stubs, but the kernel support has never been enabled. I'm
guessing nobody will miss it when it's gone.

The man page also contains amusing lies like "The permission bitmap
contains 1024 bits in 32 longwords." It's hard to say how big the
permission bitmap is because it doesn't exist, but in any case 1024 /
64 is only 16.


Index: sys/arch/amd64/amd64/sys_machdep.c
===================================================================
RCS file: /cvs/src/sys/arch/amd64/amd64/sys_machdep.c,v
retrieving revision 1.12
diff -u -p -r1.12 sys_machdep.c
--- sys/arch/amd64/amd64/sys_machdep.c  13 Apr 2011 02:49:12 -0000      1.12
+++ sys/arch/amd64/amd64/sys_machdep.c  5 May 2013 01:22:07 -0000
@@ -60,10 +60,6 @@
 
 extern struct vm_map *kernel_map;
 
-#if 0
-int amd64_get_ioperm(struct proc *, void *, register_t *);
-int amd64_set_ioperm(struct proc *, void *, register_t *);
-#endif
 int amd64_iopl(struct proc *, void *, register_t *);
 
 #ifdef APERTURE
@@ -99,42 +95,6 @@ amd64_iopl(struct proc *p, void *args, r
        return 0;
 }
 
-#if 0
-
-int
-amd64_get_ioperm(struct proc *p, void *args, register_t *retval)
-{
-       int error;
-       struct pcb *pcb = &p->p_addr->u_pcb;
-       struct amd64_get_ioperm_args ua;
-
-       if ((error = copyin(args, &ua, sizeof(ua))) != 0)
-               return (error);
-
-       return copyout(pcb->pcb_iomap, ua.iomap, sizeof(pcb->pcb_iomap));
-}
-
-int
-amd64_set_ioperm(struct proc *p, void *args, register_t *retval)
-{
-       int error;
-       struct pcb *pcb = &p->p_addr->u_pcb;
-       struct amd64_set_ioperm_args ua;
-
-       if (securelevel > 1)
-               return EPERM;
-
-       if ((error = suser(p, 0)) != 0)
-               return error;
-
-       if ((error = copyin(args, &ua, sizeof(ua))) != 0)
-               return (error);
-
-       return copyin(ua.iomap, pcb->pcb_iomap, sizeof(pcb->pcb_iomap));
-}
-
-#endif
-
 int
 amd64_get_fsbase(struct proc *p, void *args)
 {
@@ -171,16 +131,6 @@ sys_sysarch(struct proc *p, void *v, reg
        case AMD64_IOPL: 
                error = amd64_iopl(p, SCARG(uap, parms), retval);
                break;
-
-#if 0
-       case AMD64_GET_IOPERM: 
-               error = amd64_get_ioperm(p, SCARG(uap, parms), retval);
-               break;
-
-       case AMD64_SET_IOPERM: 
-               error = amd64_set_ioperm(p, SCARG(uap, parms), retval);
-               break;
-#endif
 
 #if defined(PERFCTRS) && 0
        case AMD64_PMC_INFO:
Index: lib/libarch/amd64/Makefile
===================================================================
RCS file: /cvs/src/lib/libarch/amd64/Makefile,v
retrieving revision 1.10
diff -u -p -r1.10 Makefile
--- lib/libarch/amd64/Makefile  13 Apr 2011 02:49:12 -0000      1.10
+++ lib/libarch/amd64/Makefile  5 May 2013 01:23:54 -0000
@@ -2,16 +2,13 @@
 #      $NetBSD: Makefile,v 1.1 1996/02/21 02:45:47 jtk Exp $
 
 MANSUBDIR=amd64
-MAN+=  amd64_iopl.2 amd64_get_ioperm.2 \
-       amd64_get_fsbase.2
-MLINKS+=amd64_get_ioperm.2 amd64_set_ioperm.2 \
-       amd64_get_fsbase.2 amd64_set_fsbase.2
+MAN+=  amd64_iopl.2 amd64_get_fsbase.2
+MLINKS+=amd64_get_fsbase.2 amd64_set_fsbase.2
 
 .if ${MACHINE_ARCH} == "amd64"
 .PATH: ${LIBC}/amd64
 NOPIC=
-SRCS+= amd64_iopl.c amd64_get_ioperm.c amd64_set_ioperm.c \
-       amd64_get_fsbase.c amd64_set_fsbase.c
+SRCS+= amd64_iopl.c amd64_get_fsbase.c amd64_set_fsbase.c
 .include <bsd.lib.mk>
 .else
 NOPROG=
Index: lib/libarch/amd64/amd64_iopl.2
===================================================================
RCS file: /cvs/src/lib/libarch/amd64/amd64_iopl.2,v
retrieving revision 1.6
diff -u -p -r1.6 amd64_iopl.2
--- lib/libarch/amd64/amd64_iopl.2      26 Jun 2008 05:42:04 -0000      1.6
+++ lib/libarch/amd64/amd64_iopl.2      5 May 2013 01:29:06 -0000
@@ -74,8 +74,6 @@ The caller was not the superuser, or the
 has not been set to a non-zero value.
 .El
 .Sh SEE ALSO
-.Xr amd64_get_ioperm 2 ,
-.Xr amd64_set_ioperm 2 ,
 .Xr securelevel 7
 .Sh REFERENCES
 .Rs

and deleted files...

Reply via email to