/proc dubious hack?

Chris Evans (chris@ferret.lmh.ox.ac.uk)
Wed, 21 Jan 1998 18:32:30 +0000 (GMT)


version: 2.1.79

I've noticed that in proc_put_inode, we set i_nlink = 0, so cached inodes
don't hang around in core. This is causing a conflict with my /proc/<pid>
variable permissions patch as this relies upon proc_write_inode being
called with the new permissions.

Are there plans to implement the FS_NO_DCACHE flag? This would probably be
the proper way to avoid caching /proc stuff; dirty inodes caused by
attempted changes could be sync_one()d immediately. proc_write_inode could
then selectively act upon various changed inode fields. The other changes
can be ignored and would be "refreshed" to the correct values on the next
iget which would cause a new non-cached inode lookup.

Is FS_NO_DCACHE planned for soon? Given a few pointers, I could probably
put together a patch for it.

I ask these questions because I have been getting a few e-mail recently
about my chmod /proc/<pid> patch, and was going to implement it cleanly
(it's a _very_ small simple patch), and try and get it in 2.2, as it is
very good for privacy and security. I was also going to have this feature
default to OFF, and have it enabled by a sysctl variable.