aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2022-03-16 11:18:40 +0100
committerDmitry Vyukov <dvyukov@google.com>2022-03-16 15:11:05 +0100
commit46cc3b2193a3be0e0043d9cb98af1121aeebf09d (patch)
treeadb896e692d32bd340d27494e51cfa05718100de /sys/linux
parent3f1e91ed11e657c596a375b100695a8b4e0d6e37 (diff)
sys/linux: update watch queue descriptions
The interface has significantly changed since the first version. Update to the upstreammed interface. Fixes #3030
Diffstat (limited to 'sys/linux')
-rw-r--r--sys/linux/key.txt1
-rw-r--r--sys/linux/key.txt.const1
-rw-r--r--sys/linux/sys.txt3
-rw-r--r--sys/linux/sys.txt.const1
-rw-r--r--sys/linux/watch_queue.txt (renamed from sys/linux/dev_watch_queue.txt)10
-rw-r--r--sys/linux/watch_queue.txt.const8
6 files changed, 19 insertions, 5 deletions
diff --git a/sys/linux/key.txt b/sys/linux/key.txt
index 86ccaae29..c769849e2 100644
--- a/sys/linux/key.txt
+++ b/sys/linux/key.txt
@@ -58,6 +58,7 @@ keyctl$KEYCTL_PKEY_VERIFY(code const[KEYCTL_PKEY_VERIFY], params ptr[in, keyctl_
keyctl$KEYCTL_RESTRICT_KEYRING(code const[KEYCTL_RESTRICT_KEYRING], key key, type ptr[in, string[key_type], opt], restriction ptr[in, key_restriction, opt])
keyctl$KEYCTL_MOVE(code const[KEYCTL_MOVE], key key, from_keyring keyring, to_keyring keyring, flags flags[keyctl_move_flags])
keyctl$KEYCTL_CAPABILITIES(code const[KEYCTL_CAPABILITIES], buffer ptr[out, array[int8]], buflen len[buffer])
+keyctl$KEYCTL_WATCH_KEY(code const[KEYCTL_WATCH_KEY], id key, watch_queue_fd fd_watch_queue, watch_id intptr[0:0xff])
reqkey_keyring = KEY_REQKEY_DEFL_NO_CHANGE, KEY_REQKEY_DEFL_DEFAULT, KEY_REQKEY_DEFL_THREAD_KEYRING, KEY_REQKEY_DEFL_PROCESS_KEYRING, KEY_REQKEY_DEFL_SESSION_KEYRING, KEY_REQKEY_DEFL_USER_KEYRING, KEY_REQKEY_DEFL_USER_SESSION_KEYRING, KEY_REQKEY_DEFL_GROUP_KEYRING, KEY_REQKEY_DEFL_REQUESTOR_KEYRING
keyctl_move_flags = KEYCTL_MOVE_EXCL
diff --git a/sys/linux/key.txt.const b/sys/linux/key.txt.const
index 916806d70..ce1496686 100644
--- a/sys/linux/key.txt.const
+++ b/sys/linux/key.txt.const
@@ -34,6 +34,7 @@ KEYCTL_SET_REQKEY_KEYRING = 14
KEYCTL_SET_TIMEOUT = 15
KEYCTL_UNLINK = 9
KEYCTL_UPDATE = 2
+KEYCTL_WATCH_KEY = 32
KEY_GRP_LINK = 4096
KEY_GRP_READ = 512
KEY_GRP_SEARCH = 2048
diff --git a/sys/linux/sys.txt b/sys/linux/sys.txt
index 90de42bd0..3a6c23f52 100644
--- a/sys/linux/sys.txt
+++ b/sys/linux/sys.txt
@@ -53,6 +53,7 @@ include <uapi/linux/kcov.h>
include <uapi/linux/membarrier.h>
include <uapi/linux/capability.h>
include <uapi/linux/seccomp.h>
+include <uapi/linux/watch_queue.h>
include <kernel/sched/sched.h>
include <uapi/linux/close_range.h>
@@ -1233,7 +1234,7 @@ mmap_flags = MAP_SHARED, MAP_PRIVATE, MAP_32BIT, MAP_ANONYMOUS, MAP_DENYWRITE, M
mremap_flags = MREMAP_MAYMOVE, MREMAP_FIXED, MREMAP_DONTUNMAP
mbind_mode = MPOL_DEFAULT, MPOL_BIND, MPOL_INTERLEAVE, MPOL_PREFERRED, MPOL_F_STATIC_NODES, MPOL_F_RELATIVE_NODES
mbind_flags = MPOL_MF_STRICT, MPOL_MF_MOVE, MPOL_MF_MOVE_ALL
-pipe_flags = O_NONBLOCK, O_CLOEXEC, O_DIRECT
+pipe_flags = O_NONBLOCK, O_CLOEXEC, O_DIRECT, O_NOTIFICATION_PIPE
mlock_flags = MLOCK_ONFAULT
mlockall_flags = MCL_CURRENT, MCL_FUTURE, MCL_ONFAULT
dup_flags = O_CLOEXEC
diff --git a/sys/linux/sys.txt.const b/sys/linux/sys.txt.const
index 861f1a55d..d7322aa69 100644
--- a/sys/linux/sys.txt.const
+++ b/sys/linux/sys.txt.const
@@ -323,6 +323,7 @@ O_NOATIME = 262144
O_NOCTTY = 256, mips64le:2048
O_NOFOLLOW = 131072, arm:arm64:ppc64le:32768
O_NONBLOCK = 2048, mips64le:128
+O_NOTIFICATION_PIPE = 128, mips64le:1024
O_PATH = 2097152
O_RDONLY = 0
O_RDWR = 2
diff --git a/sys/linux/dev_watch_queue.txt b/sys/linux/watch_queue.txt
index c414f184b..f10bafbf4 100644
--- a/sys/linux/dev_watch_queue.txt
+++ b/sys/linux/watch_queue.txt
@@ -7,12 +7,15 @@ include <uapi/linux/watch_queue.h>
resource fd_watch_queue[fd]
-openat$watch_queue(fd const[AT_FDCWD], file ptr[in, string["/dev/watch_queue"]], flags flags[open_flags], mode const[0]) fd_watch_queue
-mmap$watch_queue(addr vma, len len[addr], prot flags[mmap_prot], flags flags[mmap_flags], fd fd_watch_queue, offset const[0])
+pipe2$watch_queue(pipefd ptr[out, pipefd$watch_queue], flags const[O_NOTIFICATION_PIPE])
+read$watch_queue(fd fd_watch_queue, buf buffer[out], count len[buf])
ioctl$IOC_WATCH_QUEUE_SET_SIZE(fd fd_watch_queue, cmd const[IOC_WATCH_QUEUE_SET_SIZE], arg flags[watch_queue_size])
ioctl$IOC_WATCH_QUEUE_SET_FILTER(fd fd_watch_queue, cmd const[IOC_WATCH_QUEUE_SET_FILTER], arg ptr[in, watch_notification_filter])
-watch_devices(watch_fd fd_watch_queue, watch_id intptr[-1:0xff], flags const[0])
+pipefd$watch_queue {
+ rfd fd_watch_queue
+ wfd fd
+}
watch_notification_filter {
nr_filters len[filters, int32]
@@ -28,4 +31,3 @@ watch_notification_type_filter {
}
watch_queue_size = 1, 2, 4, 8, 16
-_ = __NR_mmap2
diff --git a/sys/linux/watch_queue.txt.const b/sys/linux/watch_queue.txt.const
new file mode 100644
index 000000000..6d4fd72a0
--- /dev/null
+++ b/sys/linux/watch_queue.txt.const
@@ -0,0 +1,8 @@
+# Code generated by syz-sysgen. DO NOT EDIT.
+arches = 386, amd64, arm, arm64, mips64le, ppc64le, riscv64, s390x
+IOC_WATCH_QUEUE_SET_FILTER = 22369, mips64le:ppc64le:536893281
+IOC_WATCH_QUEUE_SET_SIZE = 22368, mips64le:ppc64le:536893280
+O_NOTIFICATION_PIPE = 128, mips64le:1024
+__NR_ioctl = 54, amd64:16, arm64:riscv64:29, mips64le:5015
+__NR_pipe2 = 59, 386:331, amd64:293, arm:359, mips64le:5287, ppc64le:317, s390x:325
+__NR_read = 3, amd64:0, arm64:riscv64:63, mips64le:5000