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]
Message-ID: <8268c602-7852-4d5b-86de-54b0a38cf244@redhat.com>
Date: Thu, 11 Jul 2024 10:31:31 +0200
From: Hanna Czenczek <hreitz@...hat.com>
To: Stefan Hajnoczi <stefanha@...hat.com>
Cc: linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
 linux-doc@...r.kernel.org, virtualization@...ts.linux.dev,
 Miklos Szeredi <mszeredi@...hat.com>, German Maglione
 <gmaglione@...hat.com>, Eugenio Pérez
 <eperezma@...hat.com>, Jonathan Corbet <corbet@....net>,
 Vivek Goyal <vgoyal@...hat.com>
Subject: Re: [PATCH 0/2] virtio-fs: Add 'file' mount option

On 10.07.24 19:28, Stefan Hajnoczi wrote:
> On Tue, Jul 09, 2024 at 01:19:16PM +0200, Hanna Czenczek wrote:
>> Hi,
>>
>> We want to be able to mount filesystems that just consist of one regular
>> file via virtio-fs, i.e. no root directory, just a file as the root
>> node.
>>
>> While that is possible via FUSE itself (through the 'rootmode' mount
>> option, which is automatically set by the fusermount help program to
>> match the mount point's inode mode), there is no virtio-fs option yet
>> that would allow changing the rootmode from S_IFDIR to S_IFREG.
>>
>> To do that, this series introduces a new 'file' mount option that does
>> precisely that.  Alternatively, we could provide the same 'rootmode'
>> option that FUSE has, but as laid out in patch 1's commit description,
>> that option is a bit cumbersome for virtio-fs (in a way that it is not
>> for FUSE), and its usefulness as a more general option is limited.
>>
>>
>> Hanna Czenczek (2):
>>    virtio-fs: Add 'file' mount option
>>    virtio-fs: Document 'file' mount option
>>
>>   fs/fuse/virtio_fs.c                    | 9 ++++++++-
>>   Documentation/filesystems/virtiofs.rst | 5 ++++-
>>   2 files changed, 12 insertions(+), 2 deletions(-)
>>
>> -- 
>> 2.45.1
>>
> Looks good to me. Maybe add the 'file' option to FUSE as well to keep
> them in sync (eventually rootmode could be exposed to virtiofs too, if
> necessary)?

I don’t think this option makes much sense for FUSE, like Josef has 
said; it would just duplicate a subset of 'rootmode', and because FUSE 
filesystems are rarely mounted by hand, I don’t think anyone would ever 
use it.

If it were important to keep them in sync, I’d rather have virtio-fs 
provide 'rootmode' instead.  Personally, I don’t think it’s that 
important, and I’d rather have a simple '-o file' instead of '-o 
rootmode=0100000' (hope I counted the 0s right) for a filesystem that is 
actually not rarely mounted by hand.

If we ever do find out that we want to support other root modes than 
S_IFREG and S_IFDIR, we will probably want 'rootmode' for virtio-fs, 
too, yes.  But I can’t see that right now.

> Reviewed-by: Stefan Hajnoczi <stefanha@...hat.com>

Thanks!

Hanna


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ