*BSD News Article 12120


Return to BSD News archive

Newsgroups: comp.os.386bsd.questions
Path: sserve!manuel.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!howland.reston.ans.net!newsserver.jvnc.net!gmd.de!fanoe!veit
From: veit@fanoe.gmd.de (Holger Veit)
Subject: Re: Equivalent to iopl(3) in 386BSD
Message-ID: <1993Mar1.161613.21892@gmd.de>
Sender: veit@fanoe (Holger Veit)
Nntp-Posting-Host: fanoe
Organization: GMD - German National Research Center for Computer Science
References:  <1993Mar1.140349.12114@lth.se>
Date: Mon, 1 Mar 1993 16:16:13 GMT
Lines: 31

In article <1993Mar1.140349.12114@lth.se>, jh@efd.lth.se (Joergen Haegg) writes:
|> 
|> Is there any replacement for the linux-function iopl(3)?
|> Seems to be support thru the psl.h headerfile, but
|> what function should I use?
|> 
|> #define PSL_IOPL        0x00003000      /* i/o priviledge level enable */
|> 
|> 
|> -- 
|> Joergen Haegg				jh@efd.lth.se

Normal processes run at ring 3, to get I/O access, for instance,
you need privilege ring 0. This is implemented for the Xserver as
a special hack. With pccons (+Xserver-patches), there are functions
CONSOLE_X_MODE_ON/OFF, which do this, but have the disadvantage
of switching the keyboard into a probably unwanted mode, codrv
has the switcher ioctl CONSOLE_X_MODE (arg=0 => ring 3,
arg=1 => ring 0), without influence on the keyboard. There is an
intentional protection, which requires the process executing this
function to run setuid-root.

Holger

-- 
         Dr. Holger Veit                   | INTERNET: Holger.Veit@gmd.de
|  |   / GMD-SET German National Research  | Phone: (+49) 2241 14 2448
|__|  /  Center for Computer Science       | Fax:   (+49) 2241 14 2342
|  | /   P.O. Box 13 16                    |    Three lines Signature space
|  |/    Schloss Birlinghoven              |    available for rent. Nearly
         DW-5205 St. Augustin, Germany     |    unused, good conditions