Skip to contentSkip to conversation

multiple virtiofsd's + overlapping shared subtree -> enforced compatible xattr maps?

Virtio-fs Harry G. Coin 2 participants 4 messages Jun 30, 2021 – Jul 1, 2021

lore
Share & tools
lore
#0 lore raw

If two or more instances of virtiofsd have a common full or partially shared directory tree path -- how will those instances 'enforce' a 'compatible' xattr map lest the host+guest(s) have quite the selinux attribute salad?   How much does virtiofsd need to feel like nfsd...?

#1 lore raw
Quoted 4 lines · * Harry G. Coin ([email protected]) wrote:

If two or more instances of virtiofsd have a common full or partially shared directory tree path -- how will those instances 'enforce' a 'compatible' xattr map lest the host+guest(s) have quite the selinux attribute salad?

Virtiofsd instances are independent; it's upto whatever runs the daemons to pick the options in a sane way.

Quoted 1 line

  How much does virtiofsd need to feel like nfsd...?

What does nfsd do for this?

Dave

Quoted 10 lines

_______________________________________________
Virtio-fs mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/virtio-fs

Signature · 1 line
Dr. David Alan Gilbert / [email protected] / Manchester, UK
#2 lore raw
Quoted 7 lines · Dr. David Alan Gilbert
Quoted 4 lines · * Harry G. Coin ([email protected]) wrote:

If two or more instances of virtiofsd have a common full or partially shared directory tree path -- how will those instances 'enforce' a 'compatible' xattr map lest the host+guest(s) have quite the selinux attribute salad?

Virtiofsd instances are independent; it's upto whatever runs the daemons to pick the options in a sane way.

While that's the current case, because the intention was to rely on the underlying fs to manage contention among virtiofsds: the moment xattrmaps happened virtiofsd entered the layer all network file system daemons face.  Roughly speaking: a shift from one process per client to some IPC or threaded approach with a 'manager' process/thread that coordinates 'compatible' xattrmaps, acl maps, 'root squashing' etc. etc..

Quoted 2 lines
Quoted 1 line

  How much does virtiofsd need to feel like nfsd...?

What does nfsd do for this?

A couple attempts over the last decade, the most landed in 5.9:
https://www.phoronix.com/scan.php?page=news_item&px=Linux-5.9-NFS-Server-User-Xattr

#3 lore raw
Quoted 10 lines · * Harry G. Coin ([email protected]) wrote:
Quoted 7 lines · Dr. David Alan Gilbert
Quoted 4 lines · * Harry G. Coin ([email protected]) wrote:

If two or more instances of virtiofsd have a common full or partially shared directory tree path -- how will those instances 'enforce' a 'compatible' xattr map lest the host+guest(s) have quite the selinux attribute salad?

Virtiofsd instances are independent; it's upto whatever runs the daemons to pick the options in a sane way.

Quoted 6 lines

While that's the current case, because the intention was to rely on the underlying fs to manage contention among virtiofsds: the moment xattrmaps happened virtiofsd entered the layer all network file system daemons face.  Roughly speaking: a shift from one process per client to some IPC or threaded approach with a 'manager' process/thread that coordinates 'compatible' xattrmaps, acl maps, 'root squashing' etc. etc..

I really want to stick with one process per client; it makes the security a lot easier; you never have to worry about accidentally leaking data between clients within the process.
Now, that doesn't mean you can't have some coordination up a layer - i.e. something that starts all the qemu's and virtiofsd's (like libvirt etc) but that chose sane mappings.

Quoted 5 lines
Quoted 2 lines
Quoted 1 line

  How much does virtiofsd need to feel like nfsd...?

What does nfsd do for this?

A couple attempts over the last decade, the most landed in 5.9:
https://www.phoronix.com/scan.php?page=news_item&px=Linux-5.9-NFS-Server-User-Xattr

So I saw that; but what I didn't see was a descriptionof what they actually do with their xattr's; do the NFS servers just pass them through or do they map?

Dave

Quoted 5 lines
Signature · 1 line
Dr. David Alan Gilbert / [email protected] / Manchester, UK