tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: scheduler support to lock user processes out?
On Mon, Feb 18, 2008 at 11:05:02PM +0100, Matthias Drochner wrote:
>
> dyoung%pobox.com@localhost said:
> > I can show several examples why it is not a technical requirement. :-)
> > I routinely suspend several devices that are in-use, including
> > ethernet & WLAN NICs, and I have even suspended the HDD where root is
> > mounted.
>
> Imo this is by some luck, likely helped by KERNEL_LOCK which
> protects all network code in particular.
>
> Imagine a driver function called in user context, which blocks
> in-kernel, waiting for something, tsleep or mutex or whatever.
> Now the user suspends the device, which causes register accesses
> deliver nonsense, or worse.
> Even if the device was shut down properly in the suspend function,
> the blocking function might awake. Spurious wakeups can occur,
> or in case of a wait for malloc(WAITOK) it is obvious that it
> can happen anytime.
> This means that drivers would have to check after each call
> which might block whether the device is still usable. Or
> implement a per-device lock, which even FreeBSD has only done
> for a subset of their drivers. I wouldn't consider that realistic.
I understand your position on the matter. I do not see any reason to
try to convince you otherwise. If I'm trying to do something impossible,
then it's my time to waste. :-)
Dave
--
David Young OJC Technologies
dyoung%ojctech.com@localhost Urbana, IL * (217) 278-3933 ext 24
Home |
Main Index |
Thread Index |
Old Index