From: Vivek Goyal <vgoyal@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: virtio-fs@redhat.com, qemu-s390x@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Virtio-fs] [PATCH] tools/virtiofsd: Add fstatfs64 syscall to the seccomp allowlist
Date: Tue, 14 Sep 2021 08:53:19 -0400 [thread overview]
Message-ID: <YUCbP3lF4cgPkadR@redhat.com> (raw)
In-Reply-To: <20210914123214.181885-1-thuth@redhat.com>
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 <vgoyal@redhat.com>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Vivek Goyal <vgoyal@redhat.com>
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
>
WARNING: multiple messages have this Message-ID (diff)
From: Vivek Goyal <vgoyal@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: virtio-fs@redhat.com, qemu-s390x@nongnu.org,
qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>
Subject: Re: [PATCH] tools/virtiofsd: Add fstatfs64 syscall to the seccomp allowlist
Date: Tue, 14 Sep 2021 08:53:19 -0400 [thread overview]
Message-ID: <YUCbP3lF4cgPkadR@redhat.com> (raw)
In-Reply-To: <20210914123214.181885-1-thuth@redhat.com>
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 <vgoyal@redhat.com>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Vivek Goyal <vgoyal@redhat.com>
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
>
next prev parent reply other threads:[~2021-09-14 12:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-14 12:32 [Virtio-fs] [PATCH] tools/virtiofsd: Add fstatfs64 syscall to the seccomp allowlist Thomas Huth
2021-09-14 12:32 ` Thomas Huth
2021-09-14 12:53 ` Vivek Goyal [this message]
2021-09-14 12:53 ` Vivek Goyal
2021-09-14 13:32 ` [Virtio-fs] " Sergio Lopez
2021-09-14 13:32 ` Sergio Lopez
2021-09-15 14:45 ` Stefan Hajnoczi
2021-09-15 14:45 ` Stefan Hajnoczi
2021-09-16 9:44 ` [Virtio-fs] " Dr. David Alan Gilbert
2021-09-16 9:44 ` Dr. David Alan Gilbert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YUCbP3lF4cgPkadR@redhat.com \
--to=vgoyal@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=thuth@redhat.com \
--cc=virtio-fs@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.