Re: [PATCH 1/4] vfs: adds the S_PRIVATE flag and adds use to security

From: Jeff Mahoney
Date: Thu Mar 03 2005 - 21:13:58 EST


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jeffrey Mahoney wrote:
> This patch adds an S_PRIVATE flag to inode->i_flags to mark an inode as
> filesystem-internal. As such, it should be excepted from the security
> infrastructure to allow the filesystem to perform its own access control.

> @@ -1459,12 +1469,16 @@ static inline void security_inode_post_l
> struct inode *dir,
> struct dentry *new_dentry)
> {
> + if (unlikely (IS_PRIVATE (new_dentry->d_inode)))
> + return;
> security_ops->inode_post_link (old_dentry, dir, new_dentry);
> }
>

Internal testing has shown that this operation will cause an Oops on
NFS. The assumption that a link operation will return an instantiated
dentry is invalid, and thus new_dentry->d_inode will be NULL on NFS
filesystems. I'll send out a revised version later this evening.

- -Jeff

- --
Jeff Mahoney
SuSE Labs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFCJ74eLPWxlyuTD7IRAg3zAJ4w5ThhGVHoTNKf+4TyqwU/NtRUvACfWnje
EIiFuTZPWZq245g/9xrkZLA=
=hTpo
-----END PGP SIGNATURE-----
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/