BUG: Why does ramfs always get built?

From: Petr Tesařík
Date: Tue Feb 10 2004 - 20:07:25 EST


ramfs cannot be removed from the kernel

Description:
Now, I wonder if there's any reason why the Simple RAM-based file
system, which is "more of an programming example than a usable file
system" (according to Configure.help), needs to be present in the
kernel.

Keywords: ramfs build Config.in

Kernel version:
Linux version 2.4.24 (root@metuzalem) (gcc version 2.95.4 20011002 (Debian prerelease)) #7 Ne úno 8 05:57:36 CET 2004

OK, it's line 55 of fs/Config.in, which reads:

define_bool CONFIG_RAMFS y

I think, it should read:

tristate 'Simple RAM-based file system support' CONFIG_RAMFS

but maybe this is a known issue and the ramfs is needed for something
I can't figure out (I recompiled my kernel without ramfs and it works
fine, so there is at least one configuration which does _NOT_ require
it and it should then definitely be optional anyway).

I know the piece of code is really small, but I don't want it
there. Just because I don't need it and any unnecessary code is
inherently dangerous, as any code is a potential security hole.

For convenience sake, I've included a patch.

Petr T.
diff -ruN linux-orig/fs/Config.in linux/fs/Config.in
--- linux-orig/fs/Config.in Sat Jan 24 19:00:51 2004
+++ linux/fs/Config.in Wed Feb 11 01:21:41 2004
@@ -52,7 +52,7 @@
fi
tristate 'Compressed ROM file system support' CONFIG_CRAMFS
bool 'Virtual memory file system support (former shm fs)' CONFIG_TMPFS
-define_bool CONFIG_RAMFS y
+tristate 'Simple RAM-based file system support' CONFIG_RAMFS

tristate 'ISO 9660 CDROM file system support' CONFIG_ISO9660_FS
dep_mbool ' Microsoft Joliet CDROM extensions' CONFIG_JOLIET $CONFIG_ISO9660_FS