[lkml]   [1996]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: 1.99.14 & duplicate NE2000
- From "Herbert Rosmanith" at Jun 9, 96 09:04:56 pm

> hm .... a feature ? I don't want to be impoilte, but I think it's a
> design flaw ...

Ah well, feature, design-flaw, beauty-wart, same thing...

> when an OS can stop the sysop to do stupid things, it should do so, imo.
> don't! trust the operator ! here we have a saying: "trust is good,
> controlling is better"....

To a certain extent, where worthwhile and easily implemented, yes...

> a driver, that does an autoprobe, must neither probe in "reserved", nor
> in "assigned" regions.
> a driver, that does a specific probe, is allowed to probe in "reserverd"
> regions. however, it is not allowed to probe in "assigned" regions.

This sounds reasonable, and could/should be implemented in a backwards
compatible fashion, simply by altering check_region() to return -EPERM
if the region is reserved, -EBUSY if a driver has already snarfed it
up, or zero if free. Drivers that want to probe into reserved regions
when given an explicit i/o would then be updated to check for the EPERM
return value, so that "reserve=" still works as it was intended to.

Okay, lets say we add the extra book-keeping to do the above. Now you
are happy that you have stopped me from loading a driver multiple times
for the same piece of hardware right? <insert long think pause here>

Wrong. I can still come along and screw your machine up via:

# insmod ne.o io=0x340 irq=15
# insmod ne.o io=0x740 irq=7
# insmod ne.o io=0xb40 irq=5


LILO: linux ether=15,0x340,eth0 ether=7,0x740,eth1 ether=5,0xb40,eth2

Now the design flaw is down to the dain-bramage of the ISA bus. Do we
now start doing things like

if (!PCI && !EISA && !MCA)
iobase %= 0x400;

to prevent the operator from doing silly things? I hope not. This
"double module load bug" is in one of those grey areas where we have to
decide whether it is worthwhile watching for and trapping. I really
don't care either way, but I wanted to make sure that people were aware
of the fact that the behaviour of "reserve=" relied on it, and didn't
break that in the process of changing things.

Remember that no matter how hard you bend over backwards, there are still
a zillion ways root can shoot himself in the foot. (I think my favourite
is "cat /dev/urandom > /dev/port" -- a new surprise each time ;-)


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