[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 24/26] vhost-user-fs: Extend VhostUserFSSlaveMsg to pass a
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH v3 24/26] vhost-user-fs: Extend VhostUserFSSlaveMsg to pass additional info |
Date: |
Thu, 6 May 2021 16:31:22 +0100 |
On Wed, Apr 28, 2021 at 12:00:58PM +0100, Dr. David Alan Gilbert (git) wrote:
> From: Vivek Goyal <vgoyal@redhat.com>
>
> 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 as well), but if this memory is
> unmappable in virtiofsd (like cache window), then virtiofsd asks qemu
> to do the I/O instead.
>
> To retain the capability to drop suid bit on write, qemu needs to
> drop the CAP_FSETID as well before write to fd. Extend VhostUserFSSlaveMsg
> so that virtiofsd can specify in message if CAP_FSETID needs to be
> dropped.
>
> Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
> ---
> hw/virtio/vhost-user-fs.c | 5 +++++
> include/hw/virtio/vhost-user-fs.h | 6 ++++++
> subprojects/libvhost-user/libvhost-user.h | 6 ++++++
> 3 files changed, 17 insertions(+)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
signature.asc
Description: PGP signature
- Re: [PATCH v3 24/26] vhost-user-fs: Extend VhostUserFSSlaveMsg to pass additional info,
Stefan Hajnoczi <=