|
|
77609c |
From b615b79feaa73bbaa32bb8c30401a4f6f0c0205e Mon Sep 17 00:00:00 2001
|
|
|
a83cc2 |
From: Thomas Huth <thuth@redhat.com>
|
|
|
a83cc2 |
Date: Tue, 14 Sep 2021 13:29:59 +0200
|
|
|
77609c |
Subject: [PATCH 2/2] tools/virtiofsd: Add fstatfs64 syscall to the seccomp
|
|
|
a83cc2 |
allowlist
|
|
|
a83cc2 |
MIME-Version: 1.0
|
|
|
a83cc2 |
Content-Type: text/plain; charset=UTF-8
|
|
|
a83cc2 |
Content-Transfer-Encoding: 8bit
|
|
|
a83cc2 |
|
|
|
77609c |
RH-Author: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
77609c |
RH-MergeRequest: 44: Apply RHEL 9.0.0 Beta fixes to RHEL 9.0.0
|
|
|
77609c |
RH-Commit: [2/2] 0085289cefb57d49d2423b4f3376e8cf4a970012 (mrezanin/centos-src-qemu-kvm)
|
|
|
77609c |
RH-Bugzilla: 2005026
|
|
|
a83cc2 |
RH-Acked-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
77609c |
RH-Acked-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
a83cc2 |
|
|
|
a83cc2 |
The virtiofsd currently crashes on s390x when doing something like
|
|
|
a83cc2 |
this in the guest:
|
|
|
a83cc2 |
|
|
|
a83cc2 |
mkdir -p /mnt/myfs
|
|
|
a83cc2 |
mount -t virtiofs myfs /mnt/myfs
|
|
|
a83cc2 |
touch /mnt/myfs/foo.txt
|
|
|
a83cc2 |
stat -f /mnt/myfs/foo.txt
|
|
|
a83cc2 |
|
|
|
a83cc2 |
The problem is that the fstatfs64 syscall is called in this case
|
|
|
a83cc2 |
from the virtiofsd. We have to put it on the seccomp allowlist to
|
|
|
a83cc2 |
avoid that the daemon gets killed in this case.
|
|
|
a83cc2 |
|
|
|
77609c |
(cherry picked from commit 8cfd339b3d402f913fe520a4f35f30152fb4fb80)
|
|
|
a83cc2 |
Suggested-by: Vivek Goyal <vgoyal@redhat.com>
|
|
|
a83cc2 |
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
|
|
77609c |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
a83cc2 |
---
|
|
|
a83cc2 |
tools/virtiofsd/passthrough_seccomp.c | 1 +
|
|
|
a83cc2 |
1 file changed, 1 insertion(+)
|
|
|
a83cc2 |
|
|
|
a83cc2 |
diff --git a/tools/virtiofsd/passthrough_seccomp.c b/tools/virtiofsd/passthrough_seccomp.c
|
|
|
77609c |
index f49ed94b5e..a3ce9f898d 100644
|
|
|
a83cc2 |
--- a/tools/virtiofsd/passthrough_seccomp.c
|
|
|
a83cc2 |
+++ b/tools/virtiofsd/passthrough_seccomp.c
|
|
|
a83cc2 |
@@ -51,6 +51,7 @@ static const int syscall_allowlist[] = {
|
|
|
a83cc2 |
SCMP_SYS(fsetxattr),
|
|
|
a83cc2 |
SCMP_SYS(fstat),
|
|
|
a83cc2 |
SCMP_SYS(fstatfs),
|
|
|
a83cc2 |
+ SCMP_SYS(fstatfs64),
|
|
|
a83cc2 |
SCMP_SYS(fsync),
|
|
|
a83cc2 |
SCMP_SYS(ftruncate),
|
|
|
a83cc2 |
SCMP_SYS(futex),
|
|
|
a83cc2 |
--
|
|
|
a83cc2 |
2.27.0
|
|
|
a83cc2 |
|