Question about detecting filesystem type.

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

 



Is there a way to tell from "struct dentry" or "struct vfsmount" that whether
the directory entries are controllable from userspace's requests or not?

TOMOYO wants to use /proc/self/ rather than /proc/$PID/ if $PID matches current
thread's process ID in order to prevent current thread from accessing other
process's information unless needed. Converting "$PID" to "self" in core code
(i.e. __d_path()) was refused in the past, with a response "do the conversion
after returning from __d_path()". But since procfs can be mounted on various
locations (e.g. /proc/ /proc2/ /p/ /tmp/foo/100/p/ ), the caller of __d_path()
(i.e. TOMOYO) cannot tell that whether the numeric part in the returned string
represents process ID or not. If TOMOYO traverses the vfsmount tree up manually
in order to detect the process ID part, TOMOYO will no longer use __d_path().

Thus, I'm considering to use a different way for representing files on procfs
(e.g. proc:$PID/mounts rather than /proc/$PID/mounts) so that TOMOYO can
convert "$PID" to "self". That will be possible.

There are two types of filesystems. One is filesystems (e.g. ext3 tmpfs nfs)
where dentries can be controlled from userspace using creat()/rename()/link()
etc. The other is filesystems (e.g. procfs sysfs securityfs) where dentries
cannot be controlled from userspace using creat()/rename()/link() etc.

Using different way for representing files on only procfs sounds a bit strange.
Thus, I'm considering to use a unified way for representing files on the latter
type of filesystems (e.g. proc:$PID/mounts sys:power/state ).
But I don't know how to tell the former type and the latter type.
Is there a way to tell it from "struct dentry" or "struct vfsmount"?

Regards.
--
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