Re: iopl

H. Peter Anvin (hpa@transmeta.com)
21 Sep 1998 16:49:04 GMT


Followup to: <199809052027.WAA01372@manjak.knm.org.pl>
By author: Guest <guest@manjak.knm.org.pl>
In newsgroup: linux.dev.kernel
>
> Hello,
>
> I've got a question concerning iopl() syscall. What are
> the parameters of the function... I mean which level
> give me what priviledges ?! I've looked at the
> kernel sources, but those bitmasks doesn't say me anything.
> ... so what gives me:
>
> iopl(1)
> iopl(2)
> iopl(3)
>
> Thanks,
> Martin
>

iopl(1) or iopl(2) don't buy you anything; iopl(3) lets you do any I/O.

Background: the x86 considers a process "I/O privileged" if
IOPL >= CPL. Since a user-space process in Linux has CPL=3 and a
kernel-space process has CPL=0, only IOPL=0 and IOPL=3 really matter.

-hpa

-- 
    PGP: 2047/2A960705 BA 03 D3 2C 14 A8 A8 BD  1E DF FE 69 EE 35 BD 74
    See http://www.zytor.com/~hpa/ for web page and full PGP public key
        I am Bahá'í -- ask me about it or see http://www.bahai.org/
   "To love another person is to see the face of God." -- Les Misérables

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/