github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/linux/namespaces.txt (about) 1 # Copyright 2018 syzkaller project authors. All rights reserved. 2 # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. 3 4 include <uapi/linux/sched.h> 5 include <uapi/linux/nsfs.h> 6 7 resource fd_namespace[fd] 8 resource fd_userns[fd_namespace] 9 10 unshare(flags flags[unshare_flags]) 11 setns(fd fd_namespace, type flags[ns_type]) 12 13 syz_open_procfs$namespace(pid pid, file ptr[in, string[procfs_namespace_file]]) fd_namespace 14 syz_open_procfs$userns(pid pid, file ptr[in, string["ns/user"]]) fd_userns 15 16 ioctl$NS_GET_USERNS(fd fd_namespace, cmd const[NS_GET_USERNS], arg const[0]) 17 ioctl$NS_GET_PARENT(fd fd_namespace, cmd const[NS_GET_PARENT], arg const[0]) fd_namespace 18 ioctl$NS_GET_NSTYPE(fd fd_namespace, cmd const[NS_GET_NSTYPE], arg const[0]) 19 ioctl$NS_GET_OWNER_UID(fd fd_namespace, cmd const[NS_GET_OWNER_UID], arg ptr[out, uid]) 20 21 procfs_namespace_file = "ns/cgroup", "ns/ipc", "ns/mnt", "ns/net", "ns/pid", "ns/user", "ns/uts", "ns/pid_for_children", "ns/time", "ns/time_for_children" 22 23 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, CLONE_NEWTIME 24 ns_type = 0, CLONE_NEWIPC, CLONE_NEWNET, CLONE_NEWUTS, CLONE_NEWCGROUP, CLONE_NEWNS, CLONE_NEWPID, CLONE_NEWUSER, CLONE_NEWTIME