bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ioperm and iopl in gnumach


From: Thomas Schwinge
Subject: Re: ioperm and iopl in gnumach
Date: Mon, 3 Aug 2009 19:12:22 +0200
User-agent: Mutt/1.5.11

Hello!

On Mon, Aug 03, 2009 at 08:23:49PM +0800, Da Zheng wrote:
> There is some code in gnumach that implements ioperm, but it doesn't
> work. I think tschwinge has told me that.  But could anyone tell why it
> doesn't work, how much work is left and when it will work?

No.  ioperm is expected to work just fine, so please tell us if there are
problems with it.  There are two ways to use it: either the GNU Mach RPCs
i386_io_perm_create and i386_io_perm_modify (see
[gnumach]/i386/include/mach/i386/mach_i386.defs) can directly be used, or
the more standard (at least on x86) glibc ioperm function (see
[glibc]/sysdeps/mach/hurd/i386/ioperm.c), which makes use of the former
two RPCs.

Note that you currently have to be the root user to make use of all this.
This is what the envisioned (not yet existing, but which we've once been
chatting about) ioperm server, sitting on /servers/ioperm, is meant to
change.


> gnumach from the debian repository supports iopl. This gnumach provides
> an iopl device and I find that this device only supports device_map
> when I read the code. but I don't know how to use this device. Does the
> device provide the same function as the iopl system call in Linux?
> Could anyone give me an example showing how to change the I/O privilege
> level with this device?

I think that you're mixing up two things.  First, you shouldn't need to
use the iopl function as it exists, for example, on Linux on x86:
instead, on Mach, you can use the interface I spoke about above for that.
Second, what this iopl Mach device is indeed being used for, is to access
arbitrary device memory by using device_map, as you found out already.

What problem exactly are you trying to solve?


Regards,
 Thomas

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]