Hello,

first of all, big thanks to Miklos for rebasing the patch to a
newer kernel. :-)

On Mar 9 2007 17:00, Miklos Szeredi wrote:
>>>> I think this information would be a little easier to access if there
>>>> would be a single file per pid or thread containing something like:
>>>> 
>>>> handle     flags   pos     path
>>>> 0  0100002 1234    /dev/pts/1
>>>> 1  0100004 5678    /tmp/output
>>>> etc.
>>> 
>>> That would not be a good idea, as not all users have the same permissions
>>> for viewing this information.

Since /proc/$$/fd is S_IRWXU, only the user owning the process (plus
usually root) can view it. So making the single file you propose S_IRWXU
too should solve any security issue, should not it?

>I think the problem is not with permissions, but with scaling to large
>numbers of file descriptors.

Would not that be dealt accordingly with seq_file? (You do not seem to use
a seq_file in your patch.)

>The user is usually interested in a single file descriptor, so it
>would be a large waste of resources to put together all this info at
>the kernel end, just to let the user parse it all and select the
>single line in which s/he is interested in.

And in case s/he is interested in all fds, one could just run

        grep ^offset: /proc/$$/fdpos/*

and get a neat view.


Jan
-- 
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to