summaryrefslogtreecommitdiff
path: root/tools/virtiofsd/passthrough_seccomp.c
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2020-11-02 17:18:56 +0100
committerDr. David Alan Gilbert <dgilbert@redhat.com>2020-11-02 19:22:50 +0000
commitd672fce6baa0a02dfa64d717fb072c06e301d695 (patch)
tree5b94c03f929191f260d5b61a607e7aa1f4c1937b /tools/virtiofsd/passthrough_seccomp.c
parent84e319a575d04e9d53c24d801572a3ead538f9e4 (diff)
downloadqemu-d672fce6baa0a02dfa64d717fb072c06e301d695.zip
virtiofsd: Add mount ID to the lo_inode key
Using st_dev is not sufficient to uniquely identify a mount: You can mount the same device twice, but those are still separate trees, and e.g. by mounting something else inside one of them, they may differ. Using statx(), we can get a mount ID that uniquely identifies a mount. If that is available, add it to the lo_inode key. Most of this patch is taken from Miklos's mail here: https://marc.info/?l=fuse-devel&m=160062521827983 (virtiofsd-use-mount-id.patch attachment) Suggested-by: Miklos Szeredi <mszeredi@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20201102161859.156603-5-mreitz@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'tools/virtiofsd/passthrough_seccomp.c')
-rw-r--r--tools/virtiofsd/passthrough_seccomp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/virtiofsd/passthrough_seccomp.c b/tools/virtiofsd/passthrough_seccomp.c
index 672fb72a31..11623f56f2 100644
--- a/tools/virtiofsd/passthrough_seccomp.c
+++ b/tools/virtiofsd/passthrough_seccomp.c
@@ -76,6 +76,7 @@ static const int syscall_whitelist[] = {
SCMP_SYS(mremap),
SCMP_SYS(munmap),
SCMP_SYS(newfstatat),
+ SCMP_SYS(statx),
SCMP_SYS(open),
SCMP_SYS(openat),
SCMP_SYS(ppoll),