Subject: Re: WD8013 died (SMC howto fix)
To: Phil Knaack <flipk@ncremp.ag.iastate.edu>
From: Chris G Demetriou <Chris_G_Demetriou@UX2.SP.CS.CMU.EDU>
List: port-i386
Date: 03/18/1996 02:10:40
> >> All you had to do to outb() to the lpt port is
>
> >> (1) #include <machine/pio.h>
> >> (2) open("/dev/io", O_RDWR) (have to be root of course)
> >> (3) outb(0x3bc, VALUE)
>
> >> I never had to mess with i386_iopl.
>
> >Unless I'm mistaken, this is a deprecated interface, and will cease to
> >be supported at some point in the future.
>
> Aha! Useful information I didn't know.
>
> I guess it sure makes sense. It has occured to me that opening /dev/io was
> a little too all-or-nothing.
Slightly worse than that, I think: it's a security hole in the making.
consider, if I/O access enabled by open of /dev/io, and I/O access
revoke by close:
UNIX driver semantics say that the driver sees every open -- and
therefore frob bits in the proc doing the opening, if it wants -- but
only sees the _last_ close.
"oops."