netdev
[Top] [All Lists]

Re: [PATCH] support for Cobalt Networks (x86 only) systems

To: Bogdan Costescu <bogdan.costescu@xxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [PATCH] support for Cobalt Networks (x86 only) systems
From: Chris Wing <wingc@xxxxxxxxxxxxxxx>
Date: Sat, 2 Jun 2001 11:35:14 -0400 (EDT)
Cc: netdev@xxxxxxxxxxx
Sender: owner-netdev@xxxxxxxxxxx
Bogdan:

> So far, to the problem of too often access to hardware, 2 solutions were
> proposed:
> 1. cache the values. You can then let the user shoot him-/her-self in the
>    foot by making too many ioctl calls. But this prevent any legit use of
>    current hardware state.
> 2. rate limiting. You don't let the user access the hardware too often (to
>    be defined), so he/she can't shoot his-/her-self in the foot. Legit use
>    of current hardware state is possible.

Why not provide cached data for unprivileged readers and only talk to the
hardware when a process with the appropriate capability makes a request?
All you'd need to do this is the memory required to store the cached data
and a timestamp. (an unprivileged read would only update the cached data
when it had exceeded a set age; this would provide rate limiting)

You could do this entirely in user space too, just keep a daemon running
that periodically makes queries and forwards the results. (and make it  
impossible for non-privileged users to ask the kernel at all)

-Chris Wing
wingc@xxxxxxxxxxxxxxx


<Prev in Thread] Current Thread [Next in Thread>