Hello. Valdis.Kletnieks@vt.edu wrote:Yes. The final implementation will become so. This is a temporal hack to keep all functions and variables "static". Yes. The memory for superblock is allocated for each instance. Thus, mounting one as syaoran and the other as tmpfs won't cause problems. Oh, good idea. This patch replaces the previous patch and this patch modifies only tmpfs (fs/shm*) files. I'm no longer modifying ramfs (fs/ramfs/*) files. Please forget this question. I'm no longer setting "ramfs_dir_inode_operations.setattr" field. OK. Yes. It is a line-by-line processable format defined as: filename permission owner group flags type [ symlink_data | major minor ] where flags are bit-wised combinations of * 1: Allow creation of the file. * 2: Allow deletion of the file. * 4: Allow changing permissions of the file. * 8: Allow changing owner or group of the file. * 16: For internal use. Remembers whether this file is opened or not. * 32: Don't create this file at mount time. and here are some example entries: pts 755 0 0 0 d shm 755 0 0 0 d fd 777 0 0 0 l /proc/self/fd stdin 777 0 0 0 l /proc/self/fd/0 stdout 777 0 0 0 l /proc/self/fd/1 stderr 777 0 0 0 l /proc/self/fd/2 null 666 0 0 0 c 1 3 zero 666 0 0 0 c 1 5 random 644 0 0 0 c 1 8 urandom 644 0 0 0 c 1 9 tty 666 0 0 0 c 5 0 tty0 600 0 0 12 c 4 0 cdrom 777 0 0 3 l /dev/scd0 console 600 0 0 1 c 5 1 hda 660 0 6 0 b 3 0 hda1 660 0 6 0 b 3 1 initctl 600 0 0 3 p log 666 0 0 15 s rtc 644 0 0 0 c 10 135 ptmx 666 0 0 0 c 5 2 ram 777 0 0 3 l /dev/ram0 ram0 660 0 6 0 b 1 0 ram1 660 0 6 0 b 1 1 sda 660 0 6 0 b 8 0 initrd 660 0 6 1 b 1 250 Full documentation of this filesystem is at http://tomoyo.sourceforge.jp/en/1.5.x/policy-syaoran.html What race condition is possible? Are you worrying that the file gets modified while reading? If you worry that the file gets modified while reading in kernel space, you will also worry that the file gets modified while doing "cat config.file > /configfs/syaoran". To use configfs (or whatever approach that is done before mount syscall), some tag for associating "list of permitted entries" and "mount point" is needed so that an administrator can mount this filesystem for each chroot'ed environment with different "list of permitted entries" (e.g. /dev with all entries, /var/jail1/dev with only "null", /var/jail2/dev with only "null" and "random"). It would be possible to pass "list of permitted entries" (which is the content of a config file) through mount syscall's parameter. But since the number of entries in "list of permitted entries" is not constant, it sometimes requires much memory for passing whole entries at once upon mount syscall. I wonder why many of kernel developers hate opening files in kernel space. I think it won't cause bugs as long as the file is alive within single syscall. I'm using a path to config file as a tag for associating "list of permitted entries" and "mount point". I'm opening a config file and reading the file and closing the file within a single mount() syscall. It is named as "debug", but is not a debug interface. It is a interface for obtaining snapshots of "flags" values. The kernel updates "flags" values if this filesytem is mounted with "accept=" option. (The kernel doesn't update if mounted with "enforce=" option.) Yes. /bin/mount parses common mount options like "noatime" and "noexec" and passes common mount options stored in "mountflags" variable of mount(2) and passes non-common mount options stored in "data" variable of mount(2). In that case, mount(2) receives MS_NOATIME stored in "mountflags" and "accept=/some/path/ramfs.cfg" stored in "data". sys_open() calls open_pathname() with AT_FDCWD. So, it is the same thing as calling open("../../path/to/bad_data.cfg", O_RDONLY) from the userland. May be. But I think KERN_WARNING is enough because this is not such emergent error. Thank you. - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Jeff Garzik | Re: fallocate-implementation-on-i86-x86_64-and-powerpc.patch |
git: | |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Arjan van de Ven | Re: [GIT]: Networking |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| Natalie Protasevich | [BUG] New Kernel Bugs |
