Re: [RFC PATCH] fs: register_filesystem: Don't allow '\t' and '\n'.

From: Johannes Weiner
Date: Thu Apr 09 2009 - 11:09:22 EST


On Thu, Apr 09, 2009 at 08:18:20PM +0900, Tetsuo Handa wrote:
> Is it legal to use '\t' and '\n' in filesystem's name?
> If legal, we should use \ooo escape for /proc/filesystems .
>
> ----------
> [RFC PATCH] fs: register_filesystem: Don't allow '\t' and '\n'.
>
> Registering a filesystem with broken name
>
> static struct file_system_type dummy_fs_type = {
> .name = "a\tb\nc",
> };
>
> results in broken output
>
> # cat /proc/filesystems
> nodev sysfs
> nodev rootfs
> nodev bdev
> nodev proc
> nodev debugfs
> nodev sockfs
> nodev usbfs
> nodev pipefs
> nodev anon_inodefs
> nodev tmpfs
> nodev inotifyfs
> nodev devpts
> ext3
> ext2
> cramfs
> nodev ramfs
> vfat
> iso9660
> nodev nfsd
> nodev smbfs
> nodev a b
> c
> nodev rpc_pipefs
>
> Why not forbid '\t' and '\n'?

Which filesystem does that? Shouldn't the filesystem get changed
instead?

Hannes
--
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/