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
@ 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_
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
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,
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
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
* 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.
&
* 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
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 |
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
* 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:
> > > >
> > >
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
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
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
* 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
* 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
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
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
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
* 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,
* 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
; 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
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,
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
* 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:
> >>>
* 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
* 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
* 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
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
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
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
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
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
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
>
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
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
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
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
* 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:
> > > > *
* 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:
> >
> >
> >
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 +
> > 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
* 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
> &
* 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
> 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
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
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
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
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
* 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
* 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;
>
* 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
* 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.
* 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
->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
_
:
> 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
&
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
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=
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
* 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_
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
". 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
__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
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
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
* 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
"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
> >
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
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
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
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
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
: <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
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
-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
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.
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
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
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
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
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
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
* 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
* 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
* 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;
* 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
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-
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(
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
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
* 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
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
>
* 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,
> >
> >
* 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
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
* 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.
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
---
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.
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
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_
101 - 200 of 672 matches
Mail list logo