lkml.org 
[lkml]   [2005]   [Jan]   [27]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: /proc parent &proc_root == NULL?
From Valdis.Kletnieks@vt ...
DateThu, 27 Jan 2005 01:53:57 -0500
On Thu, 27 Jan 2005 01:40:12 EST, Valdis.Kletnieks@vt.edu said:

> You may want to use a properly timed initcall() to create a callback that
> happens after proc_misc_init() happens, but before userspace gets going, and
> walk through the /proc tree at that time and cache info on the files you care
> about, so you don't have to re-walk /proc every time permission() gets called

Blarg.

The proper time to walk the /proc filesystem and cache such info, is, of
course, in the ->sp_post_addmount() LSM hook.  Check @mnt and @mountpoint_nd to
see if it's /proc, and if so, go snarf all the info you need to make your tests
fast..

Not sure if you'd need to redo your cache in sp_post_remount(), for the odd case
where /proc gets remounted....
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:09    [from the cache]
©2003-2008