User: Password:
|
|
Subscribe / Log in / New account

Another union filesystem approach

Another union filesystem approach

Posted Sep 2, 2010 15:01 UTC (Thu) by dpquigl (guest, #52852)
Parent article: Another union filesystem approach

I'd like to clarify my stance on inode_permission a bit. In this implementation what they want to do would be needed. However something that wasn't captured since Val and I had a brief exchange offlist was that I believe that her proposed implementation is superior to pushing the dentry into inode_permission. She had a new function called path_permission. With the inclusion of the path based hooks in the LSM framework I think if you want to add anything that will be checking permissions based on path we've decided that it should be its own check. That's why adding a path_permission check at the appropriate points in the vfs is a superior situation to pushing the dentry down into the inode operation.


(Log in to post comments)

Another union filesystem approach

Posted Sep 3, 2010 5:34 UTC (Fri) by neilbrown (subscriber, #359) [Link]

Here is a question for you - why should 'readlink' take a dentry while 'permission' only gets the inode?

I don't know either, but given the prevalence of dentry being passed around, it seems hard to justify not letting permission get a dentry.

The core reason that the hybrid unionfs needs permission() to take a dentry is because Miklos chose to store the 'struct union_entry' in the dentry rather than in the inode. It would be fairly straight forward to store that structure in the inode instead, thus removing any need to change 'permission'. However that would require allocating an inode for every active file (rather than just for each directory) which might be seen as a waste of memory.

The concept of "permission checking based on path", while seemingly suggested by the change-log entry for the patch which gives dentry to permission(), is actually irrelevant here.


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds