lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 8 Jun 2021 13:38:56 -0500
From:   "Harry G. Coin" <hgcoin@...il.com>
To:     Vivek Goyal <vgoyal@...hat.com>, linux-fsdevel@...r.kernel.org,
        virtio-fs@...hat.com,
        linux kernel mailing list <linux-kernel@...r.kernel.org>
Cc:     Miklos Szeredi <miklos@...redi.hu>,
        Richard Weinberger <richard.weinberger@...il.com>,
        Dominique Martinet <asmadeus@...ewreck.org>,
        David Howells <dhowells@...hat.com>, viro@...iv.linux.org.uk,
        v9fs-developer@...ts.sourceforge.net
Subject: Re: [Virtio-fs] [PATCH] init/do_mounts.c: Add root="fstag:<tag>"
 syntax for root device

On 6/8/21 10:35 AM, Vivek Goyal wrote:
> We want to be able to mount virtiofs as rootfs and pass appropriate
> kernel command line. Right now there does not seem to be a good way
> to do that. If I specify "root=myfs rootfstype=virtiofs", system
> panics.
>
> virtio-fs: tag </dev/root> not found
> ..
> ..
> [ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]

Whatever the best direction forward might be for kernel patches
regarding 'not block device as root', it would ease learning curves if
'the patterns that set config issue X' were the same across root 'not
block device options' whether cephfs, nfs, 9p, virtiofs.  All of them
will have to handle the selinux xattr/issue, posix and flock issues,
caching etc.  While by definition virtiofs has to exist only in a vm
guest, the others could be baremetal or vm guest roots.  (How much 9p's
other-than-guest transports are used I don't know).

FYI (though patching the kernel may be the best option)  there is a case
that does not have those kernel panics for virtiofs-root and 9p root
using stock fc34.  As 9p, the virtiofs method uses the initrd creation
mechanisms provided by 'dracut' or 'initramfs' to provide the 'sysroot
pivot glue'.

On the fc34 guest a successful 'direct kernel boot' today looks like:

kernel path: /vmsystems/fedora_generic/boot/vmlinuz

initrd path: /vmsystems/fedora_generic/boot/initrd.img

Kernel args: root=virtiofs:myfs rd.shell rd.fstab


The xml to pass through virtio-fs is:

<filesystem type="mount" accessmode="passthrough">
  <driver type="virtiofs" queue="1024"/>
  <binary xattr="on">
    <lock posix="on" flock="on"/>
  </binary>
  <source dir="/vmsystems/fedora_generic"/>
  <target dir="myfs"/>
</filesystem>

The guest fstab is:

myfs / virtiofs defaults 0 0

HTH

Harry Coin



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ