lkml.org 
[lkml]   [1996]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: proc_generic - cool new stuff

In article <XFMail.961106063146.rriggs@tesser.com>,
rriggs@tesser.com (Rob Riggs) writes:
> OK... proc_generic version 2 is here.
>
> This version offers cached and non-cached operation as well as
> a new toy I have been working on... proc fifos. This little
> gadget is great for logging kernel info and not filling up
> the log files or causing klogd/syslogd undue strain. I have
> implemented one in the sbpcd code for your wonderment.
>
> I have also (for Alan's sake) implemented /proc/net/route using
> the new non-cached model . When working for non-cached proc
> routines, proc_write() writes directly into the user buffer, and
> therefore must be OK to sleep in. It definitely cannot use cli/sti
> to lock it's tables. Anything still relying on cli/sti will need
> to be cached. (And hopefully some of these will be fixed by Keith
> Owens soon.)
>
> With the new non-caching code, a user routine can swallow the
> whole proc output in one read, if it finds it necessary. This
> will keep the proc data consistent (no missing or duplicate data),
> as was the original intent of the caching model.
>
> The included patch should apply cleanly to 2.1.7.
>
> Comments?

Yes,

what is to stop someone from finding the biggest cached /proc entry
(maybe there is even one you can cause to be big), open that one as many
times as he is allowed to open a file and not close it ?
Depending on how big the /proc entry is, he might drive the kernel out of
memory.

Ton
.

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