Re: [PATCH 1/2] [RFC] vfs: 'stat light' fstatat flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!

On Apr 7, 2009, at 6:23 AM, Andreas Dilger wrote:

- I'm not sure whether we want to force zeroing of the optional fields, or
 return whatever's in the inode (which may be stale, or just junk).
I think yes, since there have been security bugs filed in rare cases when other bits of kernel data are exposed to user space, even if just a byte
or two.

Well, this is not just some random stale data from the stack, this is just
stale information in inode, I presume.

-int vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) +int vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat,
+		int flags)
{
	if (inode->i_op->getattr)
-		return inode->i_op->getattr(mnt, dentry, stat);
+		return inode->i_op->getattr(mnt, dentry, stat, attr_flags);
Oleg's version added a second ->getattr_lite() call that passed the flags, which avoids changing all of the filesystems, though I guess it isn't a
huge deal either way.

Actually just changing the getattr for all filesystems is better approach, I just was too lazy to update all of the filesystems myself. Filesystems that do not care about this would just ignore the flags and return everything regardless, so
there is absolutely no need for 2 functions that do the same thing.

Bye,
    Oleg
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux