Re: [Virtio-fs] [PATCH 0/2] virtiofsd: Add capability to block xattrs

2021-09-22 Thread Dr. David Alan Gilbert
k certain xattrs > > docs/tools/virtiofsd.rst | 17 > tools/virtiofsd/helper.c | 3 + > tools/virtiofsd/passthrough_ll.c | 166 ++++++++++++--- > 3 files changed, 171 insertions(+), 15 deletions(-) > > -- > 2.31.1 > -- Dr. Davi

Re: [Virtio-fs] [PATCH] virtiofsd: Reverse req_list before processing it

2021-09-16 Thread Dr. David Alan Gilbert
@ static void *fv_queue_thread(void *opaque) > > /* Process all the requests. */ > if (!se->thread_pool_size && req_list != NULL) { > + req_list = g_list_reverse(req_list); > g_list_foreach(req_list, fv_queue_worker, qi); > g_list_

Re: [Virtio-fs] [PATCH] tools/virtiofsd: Add fstatfs64 syscall to the seccomp allowlist

2021-09-16 Thread Dr. David Alan Gilbert
d/passthrough_seccomp.c > +++ b/tools/virtiofsd/passthrough_seccomp.c > @@ -51,6 +51,7 @@ static const int syscall_allowlist[] = { > SCMP_SYS(fsetxattr), > SCMP_SYS(fstat), > SCMP_SYS(fstatfs), > +SCMP_SYS(fstatfs64), > SCMP_SYS(fsync), > SCMP

Re: [Virtio-fs] [PATCH v3 0/1] Relax restrictions on user.* xattr

2021-09-06 Thread Dr. David Alan Gilbert
r one of the directories that's already typically used for container fs's do - it's already what fileservers, and existing container systems do. Dave > > (With both LSMs configured or > > not configured on host). That's a requirement for virtiofs anyway. > > And if we agree on that,

Re: [Virtio-fs] [PATCH v3 0/1] Relax restrictions on user.* xattr

2021-09-06 Thread Dr. David Alan Gilbert
baggage (trusted not working on NFS, user. having the special rules on symlinks etc). Then every fs or application that trips over these arbitrary limits adds some hack to work around them in a different way to every other fs or app that's doing the same thing; (see 9p, overlayfs, fuse-overlayfs, crosvm et

Re: [Virtio-fs] [PATCH v3 09/10] virtiofsd: Optionally fill lo_inode.fhandle

2021-08-19 Thread Dr. David Alan Gilbert
e->nlookup) { > lo_map_remove(>ino_map, inode->fuse_ino); > g_hash_table_remove(lo->inodes_by_ids, >key); > +if (inode->fhandle) { > +g_hash_table_remove(lo->inodes_by_handle, inode->fhandle); > +} > if (lo->posix_lock) { > if (g_hash_table_size(inode->posix_locks)) { > fuse_log(FUSE_LOG_WARNING, "Hash table is not empty\n"); > @@ -4362,6 +4532,14 @@ int main(int argc, char *argv[]) > > lo.use_statx = true; > > +#if !defined(CONFIG_STATX) || !defined(STATX_MNT_ID) > +if (lo.inode_file_handles) { > +fuse_log(FUSE_LOG_WARNING, > + "No statx() or mount ID support: Will not be able to use > file " > + "handles for inodes\n"); > +} > +#endif > + > se = fuse_session_new(, _oper, sizeof(lo_oper), ); > if (se == NULL) { > goto err_out1; > diff --git a/tools/virtiofsd/passthrough_seccomp.c > b/tools/virtiofsd/passthrough_seccomp.c > index af04c638cb..ab4dc07e3f 100644 > --- a/tools/virtiofsd/passthrough_seccomp.c > +++ b/tools/virtiofsd/passthrough_seccomp.c > @@ -73,6 +73,7 @@ static const int syscall_allowlist[] = { > SCMP_SYS(mprotect), > SCMP_SYS(mremap), > SCMP_SYS(munmap), > +SCMP_SYS(name_to_handle_at), > SCMP_SYS(newfstatat), > SCMP_SYS(statx), > SCMP_SYS(open), > -- > 2.31.1 > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK ___ Virtio-fs mailing list Virtio-fs@redhat.com https://listman.redhat.com/mailman/listinfo/virtio-fs

Re: [Virtio-fs] [virtiofsd PATCH v4 3/4] virtiofsd: support per-file DAX negotiation in FUSE_INIT

2021-08-19 Thread Dr. David Alan Gilbert
* JeffleXu (jeffl...@linux.alibaba.com) wrote: > > > On 8/18/21 1:15 AM, Dr. David Alan Gilbert wrote: > > * Jeffle Xu (jeffl...@linux.alibaba.com) wrote: > >> In FUSE_INIT negotiating phase, server/client should advertise if it > >> supports per-file DAX. &

Re: [Virtio-fs] [virtiofsd PATCH v4 4/4] virtiofsd: support per-file DAX in FUSE_LOOKUP

2021-08-19 Thread Dr. David Alan Gilbert
* JeffleXu (jeffl...@linux.alibaba.com) wrote: > > > On 8/18/21 3:00 AM, Dr. David Alan Gilbert wrote: > > * Jeffle Xu (jeffl...@linux.alibaba.com) wrote: > >> For passthrough, when the corresponding virtiofs in guest is mounted > >> with '-o dax=inode', advertis

Re: [Virtio-fs] [virtiofsd PATCH v4 4/4] virtiofsd: support per-file DAX in FUSE_LOOKUP

2021-08-17 Thread Dr. David Alan Gilbert
ookup again. If inodep is non-NULL, the > @@ -1038,6 +1078,9 @@ static int lo_do_lookup(fuse_req_t req, fuse_ino_t > parent, const char *name, > e->attr_flags |= FUSE_ATTR_SUBMOUNT; > } > > +if (lo_should_enable_dax(lo, dir, name)) > + e->attr_flags |

Re: [Virtio-fs] [virtiofsd PATCH v4 3/4] virtiofsd: support per-file DAX negotiation in FUSE_INIT

2021-08-17 Thread Dr. David Alan Gilbert
through > + * FS_IOC_G[S]ETFLAGS ioctl, while xfs accesses this flag through > + * FS_IOC_FSG[S]ETXATTR ioctl. > + */ > +res = fstatfs(fd, ); > +if (!res) { > + if (statfs.f_type == EXT4_SUPER_MAGIC) > + lo->perfile_dax_cap = DAX_CAP_FLAGS; > + else if (statfs.f_type == XFS_SUPER_MAGIC) > + lo->perfile_dax_cap = DAX_CAP_XATTR; > +} > } > > static guint lo_key_hash(gconstpointer key) > -- > 2.27.0 > > ___ > Virtio-fs mailing list > Virtio-fs@redhat.com > https://listman.redhat.com/mailman/listinfo/virtio-fs > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK ___ Virtio-fs mailing list Virtio-fs@redhat.com https://listman.redhat.com/mailman/listinfo/virtio-fs

Re: [Virtio-fs] [PATCH v4 0/8] fuse,virtiofs: support per-file DAX

2021-08-17 Thread Dr. David Alan Gilbert
* Miklos Szeredi (mik...@szeredi.hu) wrote: > On Tue, 17 Aug 2021 at 11:32, Dr. David Alan Gilbert > wrote: > > > > * Miklos Szeredi (mik...@szeredi.hu) wrote: > > > On Tue, 17 Aug 2021 at 04:22, Jeffle Xu > > > wrote: > > > > > > >

Re: [Virtio-fs] [PATCH v4 6/8] fuse: mark inode DONT_CACHE when per-file DAX indication changes

2021-08-17 Thread Dr. David Alan Gilbert
s & FUSE_ATTR_DAX); > } > > static void fuse_init_inode(struct inode *inode, struct fuse_attr *attr) > -- > 2.27.0 > > ___ > Virtio-fs mailing list > Virtio-fs@redhat.com > https://listman.redhat.com/mailman/listinfo/virtio-fs > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK ___ Virtio-fs mailing list Virtio-fs@redhat.com https://listman.redhat.com/mailman/listinfo/virtio-fs

Re: [Virtio-fs] [PATCH v4 0/8] fuse,virtiofs: support per-file DAX

2021-08-17 Thread Dr. David Alan Gilbert
se out), so selectively DAXing files that are expected to be hot could help reduce cache churn. Dave > Thanks, > Miklos > > ___ > Virtio-fs mailing list > Virtio-fs@redhat.com > https://listman.redhat.com/mailman/listinfo/virt

Re: [Virtio-fs] Deleting files when using NFS as a shared folder

2021-08-02 Thread Dr. David Alan Gilbert
inodes. I thought if the guest sent the forget for the file then it got closed. Dave > Thanks, > > Gal. > ___________ > Virtio-fs mailing list > Virtio-fs@redhat.com > https://listman.redhat.com/mailman/listinfo/virtio-fs -- Dr. David Alan Gilbert / dgi

Re: [Virtio-fs] multiple virtiofsd's + overlapping shared subtree -> enforced compatible xattr maps?

2021-07-01 Thread Dr. David Alan Gilbert
* Harry G. Coin (hgc...@gmail.com) wrote: > > On 7/1/21 3:33 AM, Dr. David Alan Gilbert wrote: > > * Harry G. Coin (hgc...@gmail.com) wrote: > >> If two or more instances of virtiofsd have a common full or partially > >> shared directory tree path -- how

Re: [Virtio-fs] [RFC PATCH 0/1] xattr: Allow user.* xattr on symlink/special files if caller has CAP_SYS_RESOURCE

2021-07-01 Thread Dr. David Alan Gilbert
* Theodore Ts'o (ty...@mit.edu) wrote: > On Wed, Jun 30, 2021 at 04:01:42PM +0100, Dr. David Alan Gilbert wrote: > > > > Even if you fix symlinks, I don't think it fixes device nodes or > > anything else where the permissions bitmap isn't purely used as the > > permi

Re: [Virtio-fs] multiple virtiofsd's + overlapping shared subtree -> enforced compatible xattr maps?

2021-07-01 Thread Dr. David Alan Gilbert
ing list > Virtio-fs@redhat.com > https://listman.redhat.com/mailman/listinfo/virtio-fs -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK ___ Virtio-fs mailing list Virtio-fs@redhat.com https://listman.redhat.com/mailman/listinfo/virtio-fs

Re: [Virtio-fs] [PATCH v7 0/7] virtiofsd: Add support to enable/disable posix acls

2021-06-30 Thread Dr. David Alan Gilbert
assthrough_ll.c | 229 ++++++++-- > tools/virtiofsd/passthrough_seccomp.c | 1 + > 7 files changed, 249 insertions(+), 16 deletions(-) > > -- > 2.25.4 > > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK ___ Virtio-fs mailing list Virtio-fs@redhat.com https://listman.redhat.com/mailman/listinfo/virtio-fs

Re: [Virtio-fs] [PATCH] docs: describe the security considerations with virtiofsd xattr mapping

2021-06-30 Thread Dr. David Alan Gilbert
usted.' attributes > on the host. > The third rule stops a guest from explicitly setting > -the 'user.virtiofs.' path directly. > +the 'user.virtiofs.' path directly to prevent access > +control bypass on the target of the earlier prefix > +remapping. > Finally, the fourth rule lets all remaining attributes > through. > > -- > 2.31.1 > > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK ___ Virtio-fs mailing list Virtio-fs@redhat.com https://listman.redhat.com/mailman/listinfo/virtio-fs

Re: [Virtio-fs] [RFC PATCH 0/1] xattr: Allow user.* xattr on symlink/special files if caller has CAP_SYS_RESOURCE

2021-06-30 Thread Dr. David Alan Gilbert
* Theodore Ts'o (ty...@mit.edu) wrote: > On Wed, Jun 30, 2021 at 09:07:56AM +0100, Dr. David Alan Gilbert wrote: > > * Theodore Ts'o (ty...@mit.edu) wrote: > > > On Tue, Jun 29, 2021 at 04:28:24PM -0400, Daniel Walsh wrote: > > > > All this conversation is great,

Re: [Virtio-fs] [PATCH v7 1/7] virtiofsd: Fix fuse setxattr() API change issue

2021-06-30 Thread Dr. David Alan Gilbert
* Greg Kurz (gr...@kaod.org) wrote: > On Mon, 28 Jun 2021 15:46:40 +0100 > "Dr. David Alan Gilbert" wrote: > > > * Vivek Goyal (vgo...@redhat.com) wrote: > > > With kernel header updates fuse_setxattr_in struct has grown in size. > > > But this new stru

Re: [Virtio-fs] [PATCH v2] virtiofsd: Don't allow file creation with FUSE_OPEN

2021-06-30 Thread Dr. David Alan Gilbert
; The FUSE filesystem doesn't currently support O_TMPFILE, but the very > same would happen if O_TMPFILE was passed in a FUSE_OPEN request. Check > that as well. > > Signed-off-by: Greg Kurz Reviewed-by: Dr. David Alan Gilbert > --- > > v2: > - do the check in core FUSE code

Re: [Virtio-fs] [RFC PATCH 0/1] xattr: Allow user.* xattr on symlink/special files if caller has CAP_SYS_RESOURCE

2021-06-30 Thread Dr. David Alan Gilbert
not including it in the quota calculation isn't that > bad. :-) > > We also don't account for the disk space used by symbolic links (since > sometimes they can be stored in the inode as fast symlinks, and > sometimes they might consume a data block). But again,

Re: [Virtio-fs] [RFC PATCH 0/1] xattr: Allow user.* xattr on symlink/special files if caller has CAP_SYS_RESOURCE

2021-06-29 Thread Dr. David Alan Gilbert
cases. The use of namespaces > is well understood, especially in the container community. It > looks to me as if it would address your use case swimmingly. Yeh; although the details of getting the semantics right is tricky; in particular, the stuff which clears capabilitiies/setuid/etc on

Re: [Virtio-fs] [RFC PATCH 0/1] xattr: Allow user.* xattr on symlink/special files if caller has CAP_SYS_RESOURCE

2021-06-29 Thread Dr. David Alan Gilbert
* Casey Schaufler (ca...@schaufler-ca.com) wrote: > On 6/28/2021 9:28 AM, Dr. David Alan Gilbert wrote: > > * Casey Schaufler (ca...@schaufler-ca.com) wrote: > >> On 6/28/2021 6:36 AM, Daniel Walsh wrote: > >>> On 6/28/21 09:17, Vivek Goyal wrote: > >>>

Re: [Virtio-fs] [PATCH v7 5/7] virtiofsd: Add capability to change/restore umask

2021-06-28 Thread Dr. David Alan Gilbert
* Vivek Goyal (vgo...@redhat.com) wrote: > On Mon, Jun 28, 2021 at 07:36:18PM +0100, Dr. David Alan Gilbert wrote: > > * Vivek Goyal (vgo...@redhat.com) wrote: > > > On Mon, Jun 28, 2021 at 05:12:13PM +0100, Dr. David Alan Gilbert wrote: > > > > * Vivek G

Re: [Virtio-fs] [PATCH v7 5/7] virtiofsd: Add capability to change/restore umask

2021-06-28 Thread Dr. David Alan Gilbert
* Vivek Goyal (vgo...@redhat.com) wrote: > On Mon, Jun 28, 2021 at 05:12:13PM +0100, Dr. David Alan Gilbert wrote: > > * Vivek Goyal (vgo...@redhat.com) wrote: > > > When parent directory has default acl and a file is created in that > > > directory, then umas

Re: [Virtio-fs] [PATCH v7 3/7] virtiofsd: Add support for extended setxattr

2021-06-28 Thread Dr. David Alan Gilbert
* Vivek Goyal (vgo...@redhat.com) wrote: > On Mon, Jun 28, 2021 at 04:49:02PM +0100, Dr. David Alan Gilbert wrote: > > * Vivek Goyal (vgo...@redhat.com) wrote: > > > Add the bits to enable support for setxattr_ext if fuse offers it. Do not > > > enable it by default

Re: [Virtio-fs] [PATCH v7 7/7] virtiofsd: Add an option to enable/disable posix acls

2021-06-28 Thread Dr. David Alan Gilbert
sing -o no_posix_acl. > > As of now continuing to keeping the existing behavior if user did not > specify any option to disable acl support due to concerns about backward > compatibility. > > Signed-off-by: Vivek Goyal Reviewed-by: Dr. David Alan Gilbert (I'd have some

Re: [Virtio-fs] [PATCH v7 6/7] virtiofsd: Switch creds, drop FSETID for system.posix_acl_access xattr

2021-06-28 Thread Dr. David Alan Gilbert
em for future when idmapped mount > support is introduced. > > This patch only adds the capability to switch creds and drop FSETID > when acl xattr is set. This does not take affect yet. It can take > affect when next patch adds the capability to enable posix_acl. > > Reporte

Re: [Virtio-fs] [PATCH v7 6/7] virtiofsd: Switch creds, drop FSETID for system.posix_acl_access xattr

2021-06-28 Thread Dr. David Alan Gilbert
em for future when idmapped mount > support is introduced. > > This patch only adds the capability to switch creds and drop FSETID > when acl xattr is set. This does not take affect yet. It can take > affect when next patch adds the capability to enable posix_acl. > > Reporte

Re: [Virtio-fs] [RFC PATCH 0/1] xattr: Allow user.* xattr on symlink/special files if caller has CAP_SYS_RESOURCE

2021-06-28 Thread Dr. David Alan Gilbert
f the host has SELinux enabled then it can run without CAP_SYS_ADMIN or > > CAP_SYS_RESOURCE, but it will only be allowed to write labels that the host > > system understands, any label not understood will be blocked. Not only > > this, but the label that is running virtiofsd prett

Re: [Virtio-fs] [PATCH v7 5/7] virtiofsd: Add capability to change/restore umask

2021-06-28 Thread Dr. David Alan Gilbert
err = lo_change_cred(req, ); > +err = lo_change_cred(req, , lo->change_umask); > if (err) { > goto out; > } > @@ -1928,7 +1938,7 @@ static void lo_create(fuse_req_t req, fuse_ino_t > parent, const char *name, > fd = openat(parent_inode->fd, nam

Re: [Virtio-fs] [PATCH v7 3/7] virtiofsd: Add support for extended setxattr

2021-06-28 Thread Dr. David Alan Gilbert
e FUSE_CAP_SETXATTR_EXT (1 << 29) > > +/** > + * Indicates that file server supports extended struct fuse_setxattr_in > + */ > +#define FUSE_CAP_SETXATTR_EXT (1 << 29) > + You already added that in 1/7 - but other than that, Reviewed-by: Dr. David Alan Gilbert >

Re: [Virtio-fs] [PATCH v7 2/7] virtiofsd: Fix xattr operations overwriting errno

2021-06-28 Thread Dr. David Alan Gilbert
the existing code is actually safe; I don't think fchdir will/should set errno unless there's an error, and we're explictly asserting there isn't one. However, I do prefer doing this save since we already have the save variables and it makes the chance of screwing it up from any other forgotten sy

Re: [Virtio-fs] [PATCH v7 1/7] virtiofsd: Fix fuse setxattr() API change issue

2021-06-28 Thread Dr. David Alan Gilbert
Vivek Goyal Yeh it's a bit of a grim fix, but I think it's the best we can do, and we need to get it in since the headers have already been merged. (I don't think libfuse has a fix for this in yet itself, but it might survive because it doesn't bother copying the data like we do with m

Re: [Virtio-fs] [RFC PATCH 0/1] xattr: Allow user.* xattr on symlink/special files if caller has CAP_SYS_RESOURCE

2021-06-28 Thread Dr. David Alan Gilbert
hen you don't want the remapping; there are even some cases where you might want to allow the guest to set those xattrs; but then you really do have to start worrying about what the guest could do to your filesystem. The only thing getting in the way of the guest being able to do a full relabel seems to be the

Re: [Virtio-fs] [PATCH] virtiofsd: Don't allow file creation with FUSE_OPEN

2021-06-17 Thread Dr. David Alan Gilbert
eck this > in lo_open() and return an error to the client : EINVAL since this is > already what glibc returns with other illegal flag combinations. > > The FUSE filesystem doesn't currently support O_TMPFILE, but the very > same would happen if O_TMPFILE was passed in a FUSE_OPEN request. C

Re: [Virtio-fs] [PATCH v3 26/26] virtiofsd: Ask qemu to drop CAP_FSETID if client asked for it

2021-06-16 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@redhat.com) wrote: > On Wed, Jun 16, 2021 at 01:36:10PM +0100, Dr. David Alan Gilbert wrote: > > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > > On Thu, Jun 10, 2021 at 04:29:42PM +0100, Dr. David Alan Gilbert wrote: > > > > *

Re: [Virtio-fs] [PATCH v3 26/26] virtiofsd: Ask qemu to drop CAP_FSETID if client asked for it

2021-06-16 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@redhat.com) wrote: > On Thu, Jun 10, 2021 at 04:29:42PM +0100, Dr. David Alan Gilbert wrote: > > * Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: > > > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > > > > >

Re: [Virtio-fs] [PATCH] docs: describe the security considerations with virtiofsd xattr mapping

2021-06-16 Thread Dr. David Alan Gilbert
ting insecure configurations. > > Signed-off-by: Daniel P. Berrangé Reviewed-by: Dr. David Alan Gilbert Vivek's point about symlinks is something we should add but that's kind of separate to the clarification you've explained here. Dave > --- > docs/tools/virtiofsd.rst | 55 +

Re: [Virtio-fs] [PATCH] docs: describe the security considerations with virtiofsd xattr mapping

2021-06-16 Thread Dr. David Alan Gilbert
> > Here are some ideas I had, none especially nice > > > > - Use 'trusted.*' namespace for remapping instead of 'user.' > > > >virtiofsd needs to have CAP_SYS_ADMIN though which is > >quite horrible if your goal is to confi

Re: [Virtio-fs] [PATCH 5/7] io: use GDateTime for formatting timestamp for websock headers

2021-06-14 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > ping: anyone willing to review this > Reviewed-by: Dr. David Alan Gilbert > On Wed, May 05, 2021 at 11:37:00AM +0100, Daniel P. Berrangé wrote: > > The GDateTime APIs provided by GLib avoid portability pitfalls, such > &

Re: [Virtio-fs] [PATCH v3 26/26] virtiofsd: Ask qemu to drop CAP_FSETID if client asked for it

2021-06-10 Thread Dr. David Alan Gilbert
* Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > Instead I was thinking about VHOST_USER_DMA_READ/WRITE messages > > containing the address (a device IOVA, it could just be a guest physical > > memory

Re: [Virtio-fs] virtiofs mounted filesystems & SELinux

2021-06-08 Thread Dr. David Alan Gilbert
> make sure that mapping system works on both selinux and non-selinux > hosts.  Whether the host enforces those can be left to the host. As long as they map to user.something (e.g. user.virtiofsd.) then my understanding is the host should allow the virtiofsd to do what it likes with those; it wouldn't be able to see

Re: [Virtio-fs] [PATCH 8/9] virtiofsd: Optionally fill lo_inode.fhandle

2021-06-08 Thread Dr. David Alan Gilbert
p, inode->fuse_ino); > g_hash_table_remove(lo->inodes_by_ids, >key); > +if (inode->fhandle) { > +g_hash_table_remove(lo->inodes_by_handle, inode->fhandle); > +} > if (lo->posix_lock) { > if (g_hash_table_size(inode->posix_locks)) { > fuse_log(FUSE_LOG_WARNING, "Hash table is not empty\n"); > @@ -4156,6 +4300,14 @@ int main(int argc, char *argv[]) > > lo.use_statx = true; > > +#if !defined(CONFIG_STATX) || !defined(STATX_MNT_ID) > +if (lo.inode_file_handles) { > +fuse_log(FUSE_LOG_WARNING, > + "No statx() or mount ID support: Will not be able to use > file " > + "handles for inodes\n"); > +} > +#endif > + > se = fuse_session_new(, _oper, sizeof(lo_oper), ); > if (se == NULL) { > goto err_out1; > diff --git a/tools/virtiofsd/passthrough_seccomp.c > b/tools/virtiofsd/passthrough_seccomp.c > index e948f25ac1..ed23e67ba8 100644 > --- a/tools/virtiofsd/passthrough_seccomp.c > +++ b/tools/virtiofsd/passthrough_seccomp.c > @@ -73,6 +73,7 @@ static const int syscall_allowlist[] = { > SCMP_SYS(mprotect), > SCMP_SYS(mremap), > SCMP_SYS(munmap), > +SCMP_SYS(name_to_handle_at), > SCMP_SYS(newfstatat), > SCMP_SYS(statx), > SCMP_SYS(open), > -- > 2.31.1 > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK ___ Virtio-fs mailing list Virtio-fs@redhat.com https://listman.redhat.com/mailman/listinfo/virtio-fs

Re: [Virtio-fs] virtiofs mounted filesystems & SELinux

2021-06-03 Thread Dr. David Alan Gilbert
gt; > that it relies on using extended attributes in the file system to > > accomplish its labeling. > > > > Do you still experience this issue when you enable extended attribute > > support[1] in virtiofsd? The example in the optional parameters snippet > > enables extended

Re: [Virtio-fs] virtiofsd: doesn't garant write access at users allowed by group permission

2021-06-02 Thread Dr. David Alan Gilbert
r ;-) > > > Chirantan > > [1]: > https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2217534 > [2]: > https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2253493 > [3]: > https://chromium-review.googlesource.com/c/chromiumos/platfor

Re: [Virtio-fs] [PATCH v3 26/26] virtiofsd: Ask qemu to drop CAP_FSETID if client asked for it

2021-05-27 Thread Dr. David Alan Gilbert
y 06, 2021 at 04:37:04PM +0100, Stefan Hajnoczi wrote: > > > > > On Wed, Apr 28, 2021 at 12:01:00PM +0100, Dr. David Alan Gilbert > > > > > (git) wrote: > > > > > > From: Vivek Goyal > > > > > > > > > > > > If qemu

Re: [Virtio-fs] [PATCH v3 20/26] DAX/unmap virtiofsd: Parse unmappable elements

2021-05-27 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@redhat.com) wrote: > On Wed, Apr 28, 2021 at 12:00:54PM +0100, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > For some read/writes the virtio queue elements are unmappable by > > the daemon; these a

Re: [Virtio-fs] [PATCH v3 18/26] DAX/unmap: virtiofsd: Add VHOST_USER_SLAVE_FS_IO

2021-05-27 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@redhat.com) wrote: > On Wed, Apr 28, 2021 at 12:00:52PM +0100, Dr. David Alan Gilbert (git) wrote: > > @@ -220,6 +222,99 @@ uint64_t vhost_user_fs_slave_unmap(struct vhost_dev > > *dev, int message_size, > > return (uint64_t)res; >

Re: [Virtio-fs] [PATCH v3 18/26] DAX/unmap: virtiofsd: Add VHOST_USER_SLAVE_FS_IO

2021-05-27 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@redhat.com) wrote: > On Wed, Apr 28, 2021 at 12:00:52PM +0100, Dr. David Alan Gilbert (git) wrote: > > +close(fd); > > I looked back at the hw/virtio/vhost-user.c slave channel code and it > closes fds for us. Looks like this close(2) call

Re: [Virtio-fs] [PATCH v3 09/26] DAX: virtio-fs: Add vhost-user slave commands for mapping

2021-05-27 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@redhat.com) wrote: > On Wed, Apr 28, 2021 at 12:00:43PM +0100, Dr. David Alan Gilbert (git) wrote: > > diff --git a/hw/virtio/vhost-user-fs.c b/hw/virtio/vhost-user-fs.c > > index dd0a02aa99..169a146e72 100644 > > --- a/hw/virtio/vhost-user-fs.

Re: [Virtio-fs] [PATCH v3 03/26] DAX: vhost-user: Rework slave return values

2021-05-27 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@redhat.com) wrote: > On Wed, Apr 28, 2021 at 12:00:37PM +0100, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > All the current slave handlers on the qemu side generate an 'int' > > return value

Re: [Virtio-fs] [PATCH v2 0/7] virtiofsd: Few cleanups in virtio_send_data_iov()

2021-05-25 Thread Dr. David Alan Gilbert
->reply_sent right after sending reply > > tools/virtiofsd/fuse_virtio.c | 81 +++-------- > 1 file changed, 25 insertions(+), 56 deletions(-) > > -- > 2.25.4 > > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK _

Re: [Virtio-fs] virtiofs: Support for SEV encrypted guests

2021-05-24 Thread Dr. David Alan Gilbert
: > https://bugzilla.redhat.com/show_bug.cgi?id=1797058 Yes, although it wasn't clear if that was just a performance problem or not. Dave > Thanks for any insight, > Jim > > ___ > Virtio-fs mailing list > Virtio-fs@redhat.com &

Re: [Virtio-fs] [PATCH 1/3] virtiofsd: Find original inode ID of mount points

2021-05-20 Thread Dr. David Alan Gilbert
t; message and continue. > > Sure, why not. > > > I have couple of general questions about submounts. > > > > - What happens in case of single file mounted on top of another file. > > > >mount --bind foo.txt bar.txt > > > > Do submounts work when mount

Re: [Virtio-fs] Regression: Docker in vms broken.

2021-05-19 Thread Dr. David Alan Gilbert
i.9,addr=0x1 -watchdog-action reset -chardev > spicevmc,id=charredir0,name=usbredir -device > usb-redir,chardev=charredir0,id=redir0,bus=usb.0,port=2 -chardev > spicevmc,id=charredir1,name=usbredir -device > usb-redir,chardev=charredir1,id=redir1,bus=usb.0,port=3 -device > virtio-balloon-pci,id=balloon0,bus=pci.5,addr=0x0 -object > rng-random,id=

Re: [Virtio-fs] [PATCH 7/7] virtiofsd: Set req->reply_sent right after sending reply

2021-05-18 Thread Dr. David Alan Gilbert
ticular about it. So I will > change this to "out". Well, if it only does 'return ret' we can get rid of the label and just do return's at the places that did the goto's. Dave > Thanks > Vivek > > > > > - if (ret == 0) { > > > -req->rep

Re: [Virtio-fs] [PATCH 7/7] virtiofsd: Set req->reply_sent right after sending reply

2021-05-18 Thread Dr. David Alan Gilbert
* Vivek Goyal (vgo...@redhat.com) wrote: > There is no reason to set it in label "err". We should be able to set > it right after sending reply. It is easier to read. > > Signed-off-by: Vivek Goyal Reviewed-by: Dr. David Alan Gilbert > --- > tools/virtiofsd/fuse_

Re: [Virtio-fs] [PATCH 6/7] virtiofsd: Check EOF before short read

2021-05-18 Thread Dr. David Alan Gilbert
f while loop. > > Just that it is little simpler to read to the code. There is no need > to call "continue" and also one less call of "len-=ret". > > Signed-off-by: Vivek Goyal Reviewed-by: Dr. David Alan Gilbert > --- > tools/virtiofsd/fuse_virt

Re: [Virtio-fs] [PATCH 5/7] virtiofsd: Simplify skip byte logic

2021-05-18 Thread Dr. David Alan Gilbert
". Looks like we can do without it. > > Signed-off-by: Vivek Goyal Yep, now iov_discard_front makes it easy to skip. Reviewed-by: Dr. David Alan Gilbert > --- > tools/virtiofsd/fuse_virtio.c | 14 -- > 1 file changed, 4 insertions(+), 10 deletions(-) > &g

Re: [Virtio-fs] [PATCH 4/7] virtiofsd: get rid of in_sg_left variable

2021-05-18 Thread Dr. David Alan Gilbert
__func__, elem->index, tosend_len); > ret = E2BIG; > goto err; > } > > So in_sg_left seems like a redundant variable. It probably was useful for > debugging when code was being developed. Get rid of it. It helps simplify > this function. > > Signe

Re: [Virtio-fs] [PATCH 3/7] virtiofsd: Use iov_discard_front() to skip bytes

2021-05-18 Thread Dr. David Alan Gilbert
nice; I hadn't noticed that file; I bet there are loads of other places that can use it (and I still don't get why iov functions aren't part of libc) Reviewed-by: Dr. David Alan Gilbert > --- > tools/virtiofsd/fuse_virtio.c | 14 +++--- > 1 file changed, 3 insertions(+), 11 dele

Re: [Virtio-fs] [PATCH 2/7] virtiofsd: Get rid of unreachable code in read

2021-05-18 Thread Dr. David Alan Gilbert
Get rid of it. > > Signed-off-by: Vivek Goyal Reviewed-by: Dr. David Alan Gilbert > --- > tools/virtiofsd/fuse_virtio.c | 5 - > 1 file changed, 5 deletions(-) > > diff --git a/tools/virtiofsd/fuse_virtio.c b/tools/virtiofsd/fuse_virtio.c > index 32914f7e95..5dcd

Re: [Virtio-fs] [PATCH 1/7] virtiofsd: Check for EINTR in preadv() and retry

2021-05-18 Thread Dr. David Alan Gilbert
* Vivek Goyal (vgo...@redhat.com) wrote: > We don't seem to check for EINTR and retry. There are other places > in code where we check for EINTR. So lets add a check. > > Signed-off-by: Vivek Goyal Reviewed-by: Dr. David Alan Gilbert > --- > tools/virtiofsd/fuse_virtio.c

Re: [Virtio-fs] host-user reconnection and crash recovery

2021-05-13 Thread Dr. David Alan Gilbert
"Les Montalets"- 2, rue de Paris, > > 92196 Meudon Cedex, France > > Registration Number: 302 456 199 R.C.S. NANTERRE > > Capital: 4,572,000 Euros > > > > This e-mail and any attachments may contain confidential material for > >

Re: [Virtio-fs] Few queries about virtiofsd read implementation

2021-05-10 Thread Dr. David Alan Gilbert
ge. > >sg_init_fuse_pages() { > sg_set_page([i], pages[i], this_len, page_descs[i].offset); >} Hmm don't know. > 3. Who converts guest memory address (when) into qemu process address which is >accessible by virtiofsd. I think that's libvhost-user doing that

Re: [Virtio-fs] [PATCH 1/2] virtiofs, dax: Fix smatch warning about loss of info during shift

2021-05-06 Thread Dr. David Alan Gilbert
and_reclaim_dmap(struct fuse_conn_dax > *fcd, > { > int ret; > struct fuse_inode *fi = get_fuse_inode(inode); > - loff_t dmap_start = start_idx << FUSE_DAX_SHIFT; > + loff_t dmap_start = (loff_t)start_idx << FUSE_DAX_SHIFT; > loff_t dmap_en

[Virtio-fs] [PULL 10/12] virtiofsd: Changed allocations of fv_VuDev & its internals to GLib functions

2021-05-06 Thread Dr. David Alan Gilbert (git)
aken with allocating VuDev structs and fv_QueueInfo structs. Signed-off-by: Mahmoud Mandour Reviewed-by: Stefan Hajnoczi Message-Id: <20210420154643.58439-6-ma.mando...@gmail.com> Signed-off-by: Dr. David Alan Gilbert --- tools/virtiofsd/fuse_virtio.c | 19 ++- 1 file

[Virtio-fs] [PULL 02/12] virtiofsd: Allow use "-o xattrmap" without "-o xattr"

2021-05-06 Thread Dr. David Alan Gilbert (git)
From: Carlos Venegas When -o xattrmap is used, it will not work unless xattr is enabled. This patch enables xattr when -o xattrmap is used. Signed-off-by: Carlos Venegas Message-Id: <20210414201207.3612432-2-jose.carlos.venegas.mu...@intel.com> Signed-off-by: Dr. David Alan Gilbert Re

[Virtio-fs] [PULL 11/12] virtiofsd/passthrough_ll.c: Changed local allocations to GLib functions

2021-05-06 Thread Dr. David Alan Gilbert (git)
Message-Id: <20210420154643.58439-7-ma.mando...@gmail.com> Signed-off-by: Dr. David Alan Gilbert --- tools/virtiofsd/passthrough_ll.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c

[Virtio-fs] [PULL 12/12] virtiofsd/fuse_virtio.c: Changed allocations of locals to GLib

2021-05-06 Thread Dr. David Alan Gilbert (git)
: <20210420154643.58439-8-ma.mando...@gmail.com> Signed-off-by: Dr. David Alan Gilbert --- tools/virtiofsd/fuse_virtio.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tools/virtiofsd/fuse_virtio.c b/tools/virtiofsd/fuse_virtio.c index 828f0fa590..1170f375a5 100644 --- a

[Virtio-fs] [PULL 09/12] virtiofsd: Changed allocation of lo_map_elems to GLib's functions

2021-05-06 Thread Dr. David Alan Gilbert (git)
com> Signed-off-by: Dr. David Alan Gilbert --- tools/virtiofsd/passthrough_ll.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index 93a49db3cd..406b5bd10e 100644 --- a/tools/virtiofsd/passthrough_ll.c +++ b

[Virtio-fs] [PULL 07/12] virtiofsd: Changed allocations of iovec to GLib's functions

2021-05-06 Thread Dr. David Alan Gilbert (git)
-checking assertion. Not g_new0() because the buffer is immediately overwritten using memcpy. Signed-off-by: Mahmoud Mandour Message-Id: <20210427181333.148176-1-ma.mando...@gmail.com> Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Dr. David Alan Gilbert --- tools/virtiofsd/fuse_lowl

[Virtio-fs] [PULL 08/12] virtiofsd: Changed allocations of fuse_session to GLib's functions

2021-05-06 Thread Dr. David Alan Gilbert (git)
From: Mahmoud Mandour Replaced the allocation and deallocation of fuse_session structs from calloc() and free() calls to g_try_new0() and g_free(). Signed-off-by: Mahmoud Mandour Reviewed-by: Stefan Hajnoczi Message-Id: <20210420154643.58439-4-ma.mando...@gmail.com> Signed-off-by: Dr.

[Virtio-fs] [PULL 06/12] virtiofsd: Changed allocations of fuse_req to GLib functions

2021-05-06 Thread Dr. David Alan Gilbert (git)
by: Dr. David Alan Gilbert --- tools/virtiofsd/fuse_lowlevel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/virtiofsd/fuse_lowlevel.c b/tools/virtiofsd/fuse_lowlevel.c index 58e32fc963..812cef6ef6 100644 --- a/tools/virtiofsd/fuse_lowlevel.c +++ b/tools/vir

[Virtio-fs] [PULL 03/12] virtiofsd: Add help for -o xattr-mapping

2021-05-06 Thread Dr. David Alan Gilbert (git)
From: Carlos Venegas The option is not documented in help. Add small help about the option. Signed-off-by: Carlos Venegas Message-Id: <20210414201207.3612432-3-jose.carlos.venegas.mu...@intel.com> Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Connor Kuehl --- tools/virtiofsd/he

[Virtio-fs] [PULL 05/12] virtiofsd: Don't assume header layout

2021-05-06 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" virtiofsd incorrectly assumed a fixed set of header layout in the virt queue; assuming that the fuse and write headers were conveniently separated from the data; the spec doesn't allow us to take that convenience, so fix it up to deal with it the hard wa

[Virtio-fs] [PULL 04/12] virtiofs: Fixup printf args

2021-05-06 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Fixup some fuse_log printf args for 32bit compatibility. Signed-off-by: Dr. David Alan Gilbert Message-Id: <20210428110100.27757-2-dgilb...@redhat.com> Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Stefan Hajnoczi --- tools/virtiofsd/passt

[Virtio-fs] [PULL 01/12] virtiofsd: Fix side-effect in assert()

2021-05-06 Thread Dr. David Alan Gilbert (git)
t;root.fd); Fixes: bdfd66788349 ("virtiofsd: Fix xattr operations") Cc: misono.tomoh...@jp.fujitsu.com Signed-off-by: Greg Kurz Message-Id: <20210409100627.451573-1-gr...@kaod.org> Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Philippe Mathieu-Daudé --- tools/virtio

[Virtio-fs] [PULL 00/12] virtiofs queue

2021-05-06 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit d90f154867ec0ec22fd719164b88716e8fd48672: Merge remote-tracking branch 'remotes/dg-gitlab/tags/ppc-for-6.1-20210504' into staging (2021-05-05 20:29:14 +0100) are available in the Git repository at: https://gitlab

Re: [Virtio-fs] [PATCH 7/7] virtiofsd: use GDateTime for formatting timestamp for debug messages

2021-05-06 Thread Dr. David Alan Gilbert
* Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: > * Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > The GDateTime APIs provided by GLib avoid portability pitfalls, such > > > as some platforms where 's

Re: [Virtio-fs] [PATCH 7/7] virtiofsd: use GDateTime for formatting timestamp for debug messages

2021-05-06 Thread Dr. David Alan Gilbert
* Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > The GDateTime APIs provided by GLib avoid portability pitfalls, such > > as some platforms where 'struct timeval.tv_sec' field is still 'long' > > instead of 't

Re: [Virtio-fs] [PATCH v3 02/26] virtiofsd: Don't assume header layout

2021-05-06 Thread Dr. David Alan Gilbert
* Dr. David Alan Gilbert (git) (dgilb...@redhat.com) wrote: > From: "Dr. David Alan Gilbert" > > virtiofsd incorrectly assumed a fixed set of header layout in the virt > queue; assuming that the fuse and write headers were conveniently > separated from the data;

Re: [Virtio-fs] [PATCH v3 01/26] virtiofs: Fixup printf args

2021-05-06 Thread Dr. David Alan Gilbert
* Dr. David Alan Gilbert (git) (dgilb...@redhat.com) wrote: > From: "Dr. David Alan Gilbert" > > Fixup some fuse_log printf args for 32bit compatibility. > > Signed-off-by: Dr. David Alan Gilbert queued this 1/26 only > --- > tools/virtiofsd/passthrough_ll.c

Re: [Virtio-fs] [PATCH 0/2] virtiofsd: Enable xattr if xattrmap is used

2021-05-06 Thread Dr. David Alan Gilbert
g > > tools/virtiofsd/helper.c | 3 +++ > tools/virtiofsd/passthrough_ll.c | 1 + > 2 files changed, 4 insertions(+) > > -- > 2.25.1 > > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK ___ Virtio-

Re: [Virtio-fs] [PATCH] virtiofsd: Fix side-effect in assert()

2021-05-06 Thread Dr. David Alan Gilbert
t; } > > saverr = ret == -1 ? errno : 0; > @@ -3066,9 +3071,9 @@ static void lo_removexattr(fuse_req_t req, fuse_ino_t > ino, const char *in_name) > ret = fremovexattr(fd, name); > } else { > /* fchdir should not fail here */ > - assert(

Re: [Virtio-fs] [PATCH 1/2] virtiofsd: Allow use "-o xattrmap" without "-o xattr"

2021-05-06 Thread Dr. David Alan Gilbert
e > _______ > Virtio-fs mailing list > Virtio-fs@redhat.com > https://listman.redhat.com/mailman/listinfo/virtio-fs -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK ___ Virtio-fs mailing list Virtio-fs@redhat.com https://listman.redhat.com/mailman/listinfo/virtio-fs

Re: [Virtio-fs] [PATCH v3 2/7] virtiofsd: Changed allocations of iovec to GLib's functions

2021-05-06 Thread Dr. David Alan Gilbert
g_new() instead of a call > to calloc() and a null-checking assertion. Not g_new0() > because the buffer is immediately overwritten using memcpy. > > Signed-off-by: Mahmoud Mandour Thanks, Reviewed-by: Dr. David Alan Gilbert > --- > v2 -> v3: > * Remov

Re: [Virtio-fs] [PATCH v3 08/26] DAX: virtio-fs: Add cache BAR

2021-05-05 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@redhat.com) wrote: > On Wed, Apr 28, 2021 at 12:00:42PM +0100, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > Add a cache BAR into which files will be directly mapped. > > The size can be s

Re: [Virtio-fs] [PATCH 7/7] virtiofsd: use GDateTime for formatting timestamp for debug messages

2021-05-05 Thread Dr. David Alan Gilbert
simpler code too. > > Signed-off-by: Daniel P. Berrangé Reviewed-by: Dr. David Alan Gilbert > --- > tools/virtiofsd/passthrough_ll.c | 25 - > 1 file changed, 4 insertions(+), 21 deletions(-) > > diff --git a/tools/virtiofsd/passthrough_ll.c >

Re: [Virtio-fs] [PATCH v3 01/26] virtiofs: Fixup printf args

2021-05-05 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@redhat.com) wrote: > On Wed, Apr 28, 2021 at 12:00:35PM +0100, Dr. David Alan Gilbert (git) wrote: > > @@ -3097,9 +3097,10 @@ static void lo_copy_file_range(fuse_req_t req, > > fuse_ino_t ino_in, off_t off_in, > > > >

Re: [Virtio-fs] [PATCH v3 06/26] DAX subprojects/libvhost-user: Add virtio-fs slave types

2021-04-29 Thread Dr. David Alan Gilbert
* Dr. David Alan Gilbert (git) (dgilb...@redhat.com) wrote: > From: "Dr. David Alan Gilbert" > > Add virtio-fs definitions to libvhost-user > > Signed-off-by: Dr. David Alan Gilbert > Reviewed-by: Stefan Hajnoczi I'm going to need to rework this > +/* St

Re: [Virtio-fs] [PATCH 0/2] virtiofsd: Meson build fixes

2021-04-28 Thread Dr. David Alan Gilbert
nfiguration make sense to support? I thought > virtiofsd was only of use with system emulation ? It probably is; although arguably it makes sense to build virtiofsd by itself without either emulation. Dave > thanks > -- PMM > -- Dr. David Ala

Re: [Virtio-fs] [PATCH v3 19/26] DAX/unmap virtiofsd: Add wrappers for VHOST_USER_SLAVE_FS_IO

2021-04-28 Thread Dr. David Alan Gilbert
* Dr. David Alan Gilbert (git) (dgilb...@redhat.com) wrote: > From: "Dr. David Alan Gilbert" > > Add a wrapper to send VHOST_USER_SLAVE_FS_IO commands and a > further wrapper for sending a fuse_buf write using the FS_IO > slave command. > > Signed-off-by: Dr.

[Virtio-fs] [PATCH v3 26/26] virtiofsd: Ask qemu to drop CAP_FSETID if client asked for it

2021-04-28 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal If qemu guest asked to drop CAP_FSETID upon write, send that info to qemu in SLAVE_FS_IO message so that qemu can drop capability before WRITE. This is to make sure that any setuid bit is killed on fd (if there is one set). Signed-off-by: Vivek Goyal ---

[Virtio-fs] [PATCH v3 25/26] vhost-user-fs: Implement drop CAP_FSETID functionality

2021-04-28 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal As part of slave_io message, slave can ask to do I/O on an fd. Additionally slave can ask for dropping CAP_FSETID (if master has it) before doing I/O. Implement functionality to drop CAP_FSETID and gain it back after the operation. This also creates a dependency on libcap-ng.

[Virtio-fs] [PATCH v3 24/26] vhost-user-fs: Extend VhostUserFSSlaveMsg to pass additional info

2021-04-28 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Extend VhostUserFSSlaveMsg so that slave can ask it to drop CAP_FSETID before doing I/O on fd. In some cases, virtiofsd takes the onus of clearing setuid bit on a file when WRITE happens. Generally virtiofsd does the WRITE to fd (from guest memory which is mapped in virtiofsd

[Virtio-fs] [PATCH v3 16/26] DAX: virtiofsd: route se down to destroy method

2021-04-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" We're going to need to pass the session down to destroy so that it can pass it back to do the remove mapping. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Stefan Hajnoczi --- tools/virtiofsd/fuse_lowlevel.c | 6 +++--- tools/virtiofsd/fuse_

<    1   2   3   4   5   6   7   >