Date: Tue, 14 Sep 2021 08:53:19 -0400 From: Vivek Goyal Message-ID: References: <20210914123214.181885-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210914123214.181885-1-thuth@redhat.com> Subject: Re: [Virtio-fs] [PATCH] tools/virtiofsd: Add fstatfs64 syscall to the seccomp allowlist List-Id: Development discussions about virtio-fs List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth Cc: virtio-fs@redhat.com, qemu-s390x@nongnu.org, qemu-devel@nongnu.org On Tue, Sep 14, 2021 at 02:32:14PM +0200, Thomas Huth wrote: > The virtiofsd currently crashes on s390x when doing something like > this in the guest: > > mkdir -p /mnt/myfs > mount -t virtiofs myfs /mnt/myfs > touch /mnt/myfs/foo.txt > stat -f /mnt/myfs/foo.txt > > The problem is that the fstatfs64 syscall is called in this case > from the virtiofsd. We have to put it on the seccomp allowlist to > avoid that the daemon gets killed in this case. > > Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2001728 > Suggested-by: Vivek Goyal > Signed-off-by: Thomas Huth Reviewed-by: Vivek Goyal Thanks Thomas for the patch. Vivek > --- > tools/virtiofsd/passthrough_seccomp.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tools/virtiofsd/passthrough_seccomp.c b/tools/virtiofsd/passthrough_seccomp.c > index f49ed94b5e..a3ce9f898d 100644 > --- a/tools/virtiofsd/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_SYS(ftruncate), > SCMP_SYS(futex), > -- > 2.27.0 >