aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux/namespaces.txt
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-04-27 18:47:24 +0200
committerDmitry Vyukov <dvyukov@google.com>2018-04-27 18:47:58 +0200
commit190d92e056bae96ec13f320400f80e94dc8e9ea0 (patch)
tree13f71db28373df61e40cebfda47ef00411a504d4 /sys/linux/namespaces.txt
parent195cc154e260ce9d7172c0ad3d6aab4b4c849495 (diff)
sys/linux: extend namespace desciptions
Slightly extend namespace descriptions and move them to a separate file.
Diffstat (limited to 'sys/linux/namespaces.txt')
-rw-r--r--sys/linux/namespaces.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/sys/linux/namespaces.txt b/sys/linux/namespaces.txt
new file mode 100644
index 000000000..3c1a44b60
--- /dev/null
+++ b/sys/linux/namespaces.txt
@@ -0,0 +1,16 @@
+# Copyright 2018 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+
+include <uapi/linux/sched.h>
+
+resource fd_namespace[fd]
+
+unshare(flags flags[unshare_flags])
+setns(fd fd_namespace, type flags[ns_type])
+
+syz_open_procfs$namespace(pid pid, file ptr[in, string[procfs_namespace_file]]) fd_namespace
+
+procfs_namespace_file = "ns/cgroup", "ns/ipc", "ns/mnt", "ns/net", "ns/pid", "ns/user", "ns/uts", "ns/pid_for_children"
+
+unshare_flags = CLONE_FILES, CLONE_FS, CLONE_NEWCGROUP, CLONE_NEWIPC, CLONE_NEWNET, CLONE_NEWNS, CLONE_NEWPID, CLONE_NEWUSER, CLONE_NEWUTS, CLONE_SYSVSEM, CLONE_THREAD, CLONE_SIGHAND, CLONE_VM
+ns_type = 0, CLONE_NEWIPC, CLONE_NEWNET, CLONE_NEWUTS, CLONE_NEWCGROUP, CLONE_NEWNS, CLONE_NEWPID, CLONE_NEWUSER