From dd7bedf2b24e30cb4df9fc5ce976f7971527c54c Mon Sep 17 00:00:00 2001 From: Mickaël Salaün Date: Fri, 8 Jan 2021 11:32:10 +0100 Subject: sys/linux: add mount$bind variant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mount$bind() is useful for Landlock fuzzing. Signed-off-by: Mickaël Salaün --- sys/linux/filesystem.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sys/linux/filesystem.txt') 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]]) -- cgit mrf-deployment