aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux
diff options
context:
space:
mode:
authorMickaël Salaün <mic@linux.microsoft.com>2021-01-08 11:32:10 +0100
committerDmitry Vyukov <dvyukov@google.com>2021-02-04 16:59:33 +0100
commitdd7bedf2b24e30cb4df9fc5ce976f7971527c54c (patch)
tree92ee615e243c830865dc7340ef0dcda3b1fa4d0b /sys/linux
parent4cc276ec62f6914b497d4384f7baa0dcf8e9ed62 (diff)
sys/linux: add mount$bind variant
mount$bind() is useful for Landlock fuzzing. Signed-off-by: Mickaël Salaün <mic@linux.microsoft.com>
Diffstat (limited to 'sys/linux')
-rw-r--r--sys/linux/filesystem.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/linux/filesystem.txt b/sys/linux/filesystem.txt
index ec40601c3..64383c98f 100644
--- a/sys/linux/filesystem.txt
+++ b/sys/linux/filesystem.txt
@@ -12,6 +12,12 @@ mount$bpf(src const[0], dst ptr[in, filename], type ptr[in, string["bpf"]], flag
mount$overlay(src const[0], dst ptr[in, filename], type ptr[in, string["overlay"]], flags flags[mount_flags], opts ptr[in, fs_options[overlay_options]])
mount$binder(src const[0], dst ptr[in, filename], type ptr[in, string["binder"]], flags flags[mount_flags], opts ptr[in, fs_options[binder_options]])
+# A bind mount ignores the filesystem type argument, but
+# pkg/host/syscalls_linux.go:isSupportedFilesystem() requires one in
+# /proc/filesystems. Use a common and valid filesystem string ("pipefs") to
+# pass the check.
+mount$bind(src ptr[in, filename], dst ptr[in, filename], type ptr[in, string["pipefs"]], flags flags[mount_flags], data const[0])
+
# esdfs is ChromeOS-specific:
# https://chromium.googlesource.com/chromiumos/third_party/kernel/+/d2c1fb9fcdb53%5E%21/
mount$esdfs(src ptr[in, filename], dst ptr[in, filename], type ptr[in, string["esdfs"]], flags flags[mount_flags], opts ptr[in, fs_options[esdfs_options]])