*BSD News Article 86541


Return to BSD News archive

Newsgroups: comp.unix.bsd.freebsd.misc
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!lucy.swin.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!news.mel.connect.com.au!news.syd.connect.com.au!phaedrus.kralizec.net.au!news.mel.aone.net.au!grumpy.fl.net.au!news.webspan.net!ix.netcom.com!enews.sgi.com!arclight.uoregon.edu!news-xfer.netaxs.com!news.mathworks.com!uunet!in1.uu.net!204.147.226.2!quack!quack.kfu.com!nsayer
From: nsayer@quack.kfu.com (Nick Sayer)
Subject: Re: Accessing i/o-ports from user-code ?
Message-ID: <nJExans@quack.kfu.com>
Sender: news@quack.kfu.com (0000-News(0000))
Organization: The Duck Pond public unix, +1 408 249 9630, log in as guest.
References: <87g20rbmk6.fsf@acme1.ruhr.de> <32C740D4.2781E494@FreeBSD.org>
Date: Wed, 8 Jan 1997 22:20:26 UTC
Lines: 22
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:33836

"Jordan K. Hubbard" <jkh@FreeBSD.org> writes:

[...]
>> access the ports (e.g.   set the setuid-flag  for  my program) or  are
>> there any syscalls I have to do before the prgram is allowed to access
>> the i/o-ports ??

>See the man page for io(4) - you need to open /dev/io

I hacked the linux color quickcam program so that it would work under
FreeBSD. An open file discriptor on /dev/io will allow _any_ I/O
instruction. For added crash protection, might I suggest that some
ioctls be added to /dev/io so that you can specify a range of I/O ports
you intend to use? It'd probably keep me from having bad dreams that
an alpha particle changes 0x378 to 0x1f0 and the quickcam program does a
tap dance all over my hard disk... :-)

-- 
Nick Sayer <nsayer@quack.kfu.com>  | "I don't mind shooting, so long
N6QQQ @ N0ARY.#NORCAL.CA.USA.NOAM  | as the right people get shot."
+1 408 249 9630, log in as 'guest' | 
URL: http://www.kfu.com/~nsayer/   |     -- "Dirty" Harry Calahan