On Sat, 2 Jun 2001, Chris Wing wrote:
> Why not provide cached data for unprivileged readers and only talk to the
> hardware when a process with the appropriate capability makes a request?
Yes, I already proposed this in a reply to Dave Miller.
> 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)
My last message expressed my oppinion about the implementation issues -
caching would need to many resources and/or changes. However, I might be
wrong, I'm not an expert in kernel programming 8-)
> 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)
That was something that I also "envisioned" when I proposed the unlimited
root (or CAP_NET_ADMIN) access. However, the initial problem was access
not only to MII registers, but also to some other hardware. The discussion
tried to be generic enough to cover all these cases and I don't think that
a daemon to handle MII, batery status and others all at once would be a
good ideea; neither the ideea to have a separate daemon for each of
these... However, if we decide that MII is a special case that could be
solved this way, it fine by me.
Sincerely,
Bogdan Costescu
IWR - Interdisziplinaeres Zentrum fuer Wissenschaftliches Rechnen
Universitaet Heidelberg, INF 368, D-69120 Heidelberg, GERMANY
Telephone: +49 6221 54 8869, Telefax: +49 6221 54 8868
E-mail: Bogdan.Costescu@xxxxxxxxxxxxxxxxxxxxx
|