lkml.org 
[lkml]   [1996]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: SMP & /sbin/clock past 1.3.72
Date
From "Ulrich Windl" at Apr 16, 96 12:57:34 pm

I wrote:

> [...]
> > iopl(3) which is what kills you. Using the current /sbin/clock on an
> > SMP box is about as intelligent as doing "cat /dev/urandom > /dev/port".
>
> This is true for every program that uses I/O ports? I'm thinking of
> Superprobe, X, svgalib, (what else?)...

What is missing from the context of the above is that /sbin/clock does
cli/sti from user space. It is not the actual iopl() call, but the dirty
things that it is allowed to do after that call.

Besides, unless you use ports above 0x3ff, you should be using ioperm()
and not iopl(). It is better to have you application SEGV than scribble
into random ports if it happens to have a bug. Quoting Alan's seat-belt
analogy from a previous thread on this topic:

cli in user space is illegal (yes iopl(3) lets you do it but
thats because iopl(3) is "I am root, I am doing funky hardware
stuff please remove the seatbelts, turn off the ABS and go to
manual controls"). If the clock binary takes a page fault with
interrupts off your box will die. The new driver looks very nice.

Paul.


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.029 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site