Re: [RFC PATCH] rootfs: Use tmpfs for rootfs even if root= is given

From: Stefan Berger
Date: Tue Oct 31 2023 - 17:03:12 EST




On 10/31/23 16:33, H. Peter Anvin wrote:
On October 31, 2023 10:11:01 AM PDT, Stefan Berger <stefanb@xxxxxxxxxxxxx> wrote:

On 10/31/23 12:56, Greg Kroah-Hartman wrote:
On Tue, Oct 31, 2023 at 11:44:17AM -0400, Stefan Berger wrote:
rootfs currently does not use tmpfs if the root= boot option is passed
even though the documentation about rootfs (added in 6e19eded3684) in
Documentation/filesystems/ramfs-rootfs-initramfs.rst states:

If CONFIG_TMPFS is enabled, rootfs will use tmpfs instead of ramfs by
default. To force ramfs, add "rootfstype=ramfs" to the kernel command
line.
At this point in time, is there even any difference between ramfs and
tmpfs anymore? Why would you want to choose one over the other here?

CONFIG_TPMFS_XATTRS allows us to set xattrs, such as security.ima.

   Stefan


thanks,

greg k-h
Why do we even keep ramfs as a standalone file system? To guarantee it cannot be swapped out? Does anyone actually use it?

Probably all machines that have root= on the boot command line use it...