aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-06-08 18:55:53 +0200
committerDmitry Vyukov <dvyukov@google.com>2018-06-08 18:55:53 +0200
commitc5ca9ff98c37eaae6ef891e675c02514513684f4 (patch)
tree10567bd9d3a0a8d93939d4dfcb9559e6664ce94e /sys/linux
parent83f945db79eb902458b40875fa8a10b0dbb49172 (diff)
sys/linux: move aio descriptions into separate file
Diffstat (limited to 'sys/linux')
-rw-r--r--sys/linux/aio.txt40
-rw-r--r--sys/linux/aio_386.const14
-rw-r--r--sys/linux/aio_amd64.const14
-rw-r--r--sys/linux/aio_arm.const14
-rw-r--r--sys/linux/aio_arm64.const14
-rw-r--r--sys/linux/aio_ppc64le.const14
-rw-r--r--sys/linux/sys.txt37
-rw-r--r--sys/linux/sys_386.const13
-rw-r--r--sys/linux/sys_amd64.const13
-rw-r--r--sys/linux/sys_arm.const13
-rw-r--r--sys/linux/sys_arm64.const13
-rw-r--r--sys/linux/sys_ppc64le.const13
12 files changed, 111 insertions, 101 deletions
diff --git a/sys/linux/aio.txt b/sys/linux/aio.txt
new file mode 100644
index 000000000..16f42d055
--- /dev/null
+++ b/sys/linux/aio.txt
@@ -0,0 +1,40 @@
+# 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 <linux/aio_abi.h>
+
+resource io_ctx[intptr]
+
+io_setup(n int32, ctx ptr[out, io_ctx])
+io_destroy(ctx io_ctx)
+io_getevents(ctx io_ctx, min_nr intptr, nr len[events], events ptr[out, array[io_event]], timeout ptr[in, timespec])
+# TODO: kernel identifies requets by address, so pointers passed to io_submit
+# need to be forwarded to io_cancel somehow.
+io_submit(ctx io_ctx, nr len[iocbpp], iocbpp ptr[in, array[ptr[in, iocb]]])
+io_cancel(ctx io_ctx, iocb ptr[in, iocb], res ptr[out, io_event])
+
+lio_opcode = IOCB_CMD_PREAD, IOCB_CMD_PWRITE, IOCB_CMD_FSYNC, IOCB_CMD_FDSYNC, IOCB_CMD_NOOP, IOCB_CMD_PREADV, IOCB_CMD_PWRITEV
+iocb_flags = 0, IOCB_FLAG_RESFD
+iocb_key = 0
+
+io_event {
+ data int64
+ obj int64
+ res int64
+ res2 int32
+}
+
+iocb {
+ data const[0, int64]
+ key flags[iocb_key, int32]
+ pad const[0, int32]
+ op flags[lio_opcode, int16]
+ prio int16
+ fd fd
+ buf ptr64[inout, array[int8]]
+ nbytes len[buf, int64]
+ offset int64
+ reserv const[0, int64]
+ flags flags[iocb_flags, int32]
+ resfd fd_event
+}
diff --git a/sys/linux/aio_386.const b/sys/linux/aio_386.const
new file mode 100644
index 000000000..0fa68e2d6
--- /dev/null
+++ b/sys/linux/aio_386.const
@@ -0,0 +1,14 @@
+# AUTOGENERATED FILE
+IOCB_CMD_FDSYNC = 3
+IOCB_CMD_FSYNC = 2
+IOCB_CMD_NOOP = 6
+IOCB_CMD_PREAD = 0
+IOCB_CMD_PREADV = 7
+IOCB_CMD_PWRITE = 1
+IOCB_CMD_PWRITEV = 8
+IOCB_FLAG_RESFD = 1
+__NR_io_cancel = 249
+__NR_io_destroy = 246
+__NR_io_getevents = 247
+__NR_io_setup = 245
+__NR_io_submit = 248
diff --git a/sys/linux/aio_amd64.const b/sys/linux/aio_amd64.const
new file mode 100644
index 000000000..6858a3021
--- /dev/null
+++ b/sys/linux/aio_amd64.const
@@ -0,0 +1,14 @@
+# AUTOGENERATED FILE
+IOCB_CMD_FDSYNC = 3
+IOCB_CMD_FSYNC = 2
+IOCB_CMD_NOOP = 6
+IOCB_CMD_PREAD = 0
+IOCB_CMD_PREADV = 7
+IOCB_CMD_PWRITE = 1
+IOCB_CMD_PWRITEV = 8
+IOCB_FLAG_RESFD = 1
+__NR_io_cancel = 210
+__NR_io_destroy = 207
+__NR_io_getevents = 208
+__NR_io_setup = 206
+__NR_io_submit = 209
diff --git a/sys/linux/aio_arm.const b/sys/linux/aio_arm.const
new file mode 100644
index 000000000..688200bc1
--- /dev/null
+++ b/sys/linux/aio_arm.const
@@ -0,0 +1,14 @@
+# AUTOGENERATED FILE
+IOCB_CMD_FDSYNC = 3
+IOCB_CMD_FSYNC = 2
+IOCB_CMD_NOOP = 6
+IOCB_CMD_PREAD = 0
+IOCB_CMD_PREADV = 7
+IOCB_CMD_PWRITE = 1
+IOCB_CMD_PWRITEV = 8
+IOCB_FLAG_RESFD = 1
+__NR_io_cancel = 247
+__NR_io_destroy = 244
+__NR_io_getevents = 245
+__NR_io_setup = 243
+__NR_io_submit = 246
diff --git a/sys/linux/aio_arm64.const b/sys/linux/aio_arm64.const
new file mode 100644
index 000000000..39f5c942d
--- /dev/null
+++ b/sys/linux/aio_arm64.const
@@ -0,0 +1,14 @@
+# AUTOGENERATED FILE
+IOCB_CMD_FDSYNC = 3
+IOCB_CMD_FSYNC = 2
+IOCB_CMD_NOOP = 6
+IOCB_CMD_PREAD = 0
+IOCB_CMD_PREADV = 7
+IOCB_CMD_PWRITE = 1
+IOCB_CMD_PWRITEV = 8
+IOCB_FLAG_RESFD = 1
+__NR_io_cancel = 3
+__NR_io_destroy = 1
+__NR_io_getevents = 4
+__NR_io_setup = 0
+__NR_io_submit = 2
diff --git a/sys/linux/aio_ppc64le.const b/sys/linux/aio_ppc64le.const
new file mode 100644
index 000000000..08af1fc3a
--- /dev/null
+++ b/sys/linux/aio_ppc64le.const
@@ -0,0 +1,14 @@
+# AUTOGENERATED FILE
+IOCB_CMD_FDSYNC = 3
+IOCB_CMD_FSYNC = 2
+IOCB_CMD_NOOP = 6
+IOCB_CMD_PREAD = 0
+IOCB_CMD_PREADV = 7
+IOCB_CMD_PWRITE = 1
+IOCB_CMD_PWRITEV = 8
+IOCB_FLAG_RESFD = 1
+__NR_io_cancel = 231
+__NR_io_destroy = 228
+__NR_io_getevents = 229
+__NR_io_setup = 227
+__NR_io_submit = 230
diff --git a/sys/linux/sys.txt b/sys/linux/sys.txt
index ede4aadfd..5bfe4688a 100644
--- a/sys/linux/sys.txt
+++ b/sys/linux/sys.txt
@@ -26,7 +26,6 @@ include <linux/ioctl.h>
include <linux/fadvise.h>
include <linux/falloc.h>
include <linux/futex.h>
-include <linux/aio_abi.h>
include <linux/kexec.h>
include <linux/seccomp.h>
include <linux/elf.h>
@@ -48,7 +47,7 @@ include <linux/tcp.h>
include <linux/udp.h>
include <linux/kcmp.h>
include <linux/syslog.h>
-include <linux/memfd.h>
+include <uapi/linux/memfd.h>
include <uapi/linux/module.h>
include <asm/prctl.h>
include <linux/ioprio.h>
@@ -208,15 +207,6 @@ seccomp_metadata {
flags const[0, int32]
}
-resource io_ctx[intptr]
-io_setup(n int32, ctx ptr[out, io_ctx])
-io_destroy(ctx io_ctx)
-io_getevents(ctx io_ctx, min_nr intptr, nr len[events], events ptr[out, array[io_event]], timeout ptr[in, timespec])
-# TODO: kernel identifies requets by address, so pointers passed to io_submit
-# need to be forwarded to io_cancel somehow.
-io_submit(ctx io_ctx, nr len[iocbpp], iocbpp ptr[in, array[ptr[in, iocb]]])
-io_cancel(ctx io_ctx, iocb ptr[in, iocb], res ptr[out, io_event])
-
capget(hdr ptr[in, cap_header], data ptr[in, cap_data])
capset(hdr ptr[in, cap_header], data ptr[in, cap_data])
@@ -604,28 +594,6 @@ utimbuf {
modtime intptr
}
-io_event {
- data int64
- obj int64
- res int64
- res2 int32
-}
-
-iocb {
- data const[0, int64]
- key flags[iocb_key, int32]
- pad const[0, int32]
- op flags[lio_opcode, int16]
- prio int16
- fd fd
- buf ptr64[inout, array[int8]]
- nbytes len[buf, int64]
- offset int64
- reserv const[0, int64]
- flags flags[iocb_flags, int32]
- resfd fd_event
-}
-
sigevent {
val const[0, intptr]
signo signalno
@@ -906,9 +874,6 @@ eventfd_flags = EFD_CLOEXEC, EFD_NONBLOCK, EFD_SEMAPHORE
timerfd_create_flags = TFD_NONBLOCK, TFD_CLOEXEC
timerfd_settime_flags = TFD_TIMER_ABSTIME
clock_type = CLOCK_REALTIME, CLOCK_REALTIME_COARSE, CLOCK_MONOTONIC, CLOCK_MONOTONIC_COARSE, CLOCK_MONOTONIC_RAW, CLOCK_BOOTTIME, CLOCK_PROCESS_CPUTIME_ID, CLOCK_THREAD_CPUTIME_ID
-lio_opcode = IOCB_CMD_PREAD, IOCB_CMD_PWRITE, IOCB_CMD_FSYNC, IOCB_CMD_FDSYNC, IOCB_CMD_NOOP, IOCB_CMD_PREADV, IOCB_CMD_PWRITEV
-iocb_flags = 0, IOCB_FLAG_RESFD
-iocb_key = 0
sigev_notify = SIGEV_NONE, SIGEV_SIGNAL, SIGEV_THREAD, SIGEV_THREAD_ID
cap_version = 0x19980330, 0x20071026, 0x20080522
prctl_code_void = PR_GET_DUMPABLE, PR_GET_KEEPCAPS, PR_GET_NO_NEW_PRIVS, PR_GET_SECCOMP, PR_GET_SECUREBITS, PR_GET_TIMERSLACK, PR_GET_TIMING, PR_TASK_PERF_EVENTS_DISABLE, PR_TASK_PERF_EVENTS_ENABLE, PR_MCE_KILL_GET
diff --git a/sys/linux/sys_386.const b/sys/linux/sys_386.const
index ecf205bea..5213c10bd 100644
--- a/sys/linux/sys_386.const
+++ b/sys/linux/sys_386.const
@@ -180,14 +180,6 @@ IN_NONBLOCK = 2048
IN_ONESHOT = 2147483648
IN_ONLYDIR = 16777216
IN_OPEN = 32
-IOCB_CMD_FDSYNC = 3
-IOCB_CMD_FSYNC = 2
-IOCB_CMD_NOOP = 6
-IOCB_CMD_PREAD = 0
-IOCB_CMD_PREADV = 7
-IOCB_CMD_PWRITE = 1
-IOCB_CMD_PWRITEV = 8
-IOCB_FLAG_RESFD = 1
IOPRIO_WHO_PGRP = 2
IOPRIO_WHO_PROCESS = 1
IOPRIO_WHO_USER = 3
@@ -666,11 +658,6 @@ __NR_inotify_add_watch = 292
__NR_inotify_init = 291
__NR_inotify_init1 = 332
__NR_inotify_rm_watch = 293
-__NR_io_cancel = 249
-__NR_io_destroy = 246
-__NR_io_getevents = 247
-__NR_io_setup = 245
-__NR_io_submit = 248
__NR_ioctl = 54
__NR_ioperm = 101
__NR_iopl = 110
diff --git a/sys/linux/sys_amd64.const b/sys/linux/sys_amd64.const
index 3967c5a30..25a051880 100644
--- a/sys/linux/sys_amd64.const
+++ b/sys/linux/sys_amd64.const
@@ -180,14 +180,6 @@ IN_NONBLOCK = 2048
IN_ONESHOT = 2147483648
IN_ONLYDIR = 16777216
IN_OPEN = 32
-IOCB_CMD_FDSYNC = 3
-IOCB_CMD_FSYNC = 2
-IOCB_CMD_NOOP = 6
-IOCB_CMD_PREAD = 0
-IOCB_CMD_PREADV = 7
-IOCB_CMD_PWRITE = 1
-IOCB_CMD_PWRITEV = 8
-IOCB_FLAG_RESFD = 1
IOPRIO_WHO_PGRP = 2
IOPRIO_WHO_PROCESS = 1
IOPRIO_WHO_USER = 3
@@ -666,11 +658,6 @@ __NR_inotify_add_watch = 254
__NR_inotify_init = 253
__NR_inotify_init1 = 294
__NR_inotify_rm_watch = 255
-__NR_io_cancel = 210
-__NR_io_destroy = 207
-__NR_io_getevents = 208
-__NR_io_setup = 206
-__NR_io_submit = 209
__NR_ioctl = 16
__NR_ioperm = 173
__NR_iopl = 172
diff --git a/sys/linux/sys_arm.const b/sys/linux/sys_arm.const
index 1d3ebfb89..71fe23ceb 100644
--- a/sys/linux/sys_arm.const
+++ b/sys/linux/sys_arm.const
@@ -180,14 +180,6 @@ IN_NONBLOCK = 2048
IN_ONESHOT = 2147483648
IN_ONLYDIR = 16777216
IN_OPEN = 32
-IOCB_CMD_FDSYNC = 3
-IOCB_CMD_FSYNC = 2
-IOCB_CMD_NOOP = 6
-IOCB_CMD_PREAD = 0
-IOCB_CMD_PREADV = 7
-IOCB_CMD_PWRITE = 1
-IOCB_CMD_PWRITEV = 8
-IOCB_FLAG_RESFD = 1
IOPRIO_WHO_PGRP = 2
IOPRIO_WHO_PROCESS = 1
IOPRIO_WHO_USER = 3
@@ -666,11 +658,6 @@ __NR_inotify_add_watch = 317
__NR_inotify_init = 316
__NR_inotify_init1 = 360
__NR_inotify_rm_watch = 318
-__NR_io_cancel = 247
-__NR_io_destroy = 244
-__NR_io_getevents = 245
-__NR_io_setup = 243
-__NR_io_submit = 246
__NR_ioctl = 54
# __NR_ioperm is not set
# __NR_iopl is not set
diff --git a/sys/linux/sys_arm64.const b/sys/linux/sys_arm64.const
index e896f474b..b8ec7bbb7 100644
--- a/sys/linux/sys_arm64.const
+++ b/sys/linux/sys_arm64.const
@@ -180,14 +180,6 @@ IN_NONBLOCK = 2048
IN_ONESHOT = 2147483648
IN_ONLYDIR = 16777216
IN_OPEN = 32
-IOCB_CMD_FDSYNC = 3
-IOCB_CMD_FSYNC = 2
-IOCB_CMD_NOOP = 6
-IOCB_CMD_PREAD = 0
-IOCB_CMD_PREADV = 7
-IOCB_CMD_PWRITE = 1
-IOCB_CMD_PWRITEV = 8
-IOCB_FLAG_RESFD = 1
IOPRIO_WHO_PGRP = 2
IOPRIO_WHO_PROCESS = 1
IOPRIO_WHO_USER = 3
@@ -666,11 +658,6 @@ __NR_inotify_add_watch = 27
# __NR_inotify_init is not set
__NR_inotify_init1 = 26
__NR_inotify_rm_watch = 28
-__NR_io_cancel = 3
-__NR_io_destroy = 1
-__NR_io_getevents = 4
-__NR_io_setup = 0
-__NR_io_submit = 2
__NR_ioctl = 29
# __NR_ioperm is not set
# __NR_iopl is not set
diff --git a/sys/linux/sys_ppc64le.const b/sys/linux/sys_ppc64le.const
index c3f1bbd2c..f7433742b 100644
--- a/sys/linux/sys_ppc64le.const
+++ b/sys/linux/sys_ppc64le.const
@@ -180,14 +180,6 @@ IN_NONBLOCK = 2048
IN_ONESHOT = 2147483648
IN_ONLYDIR = 16777216
IN_OPEN = 32
-IOCB_CMD_FDSYNC = 3
-IOCB_CMD_FSYNC = 2
-IOCB_CMD_NOOP = 6
-IOCB_CMD_PREAD = 0
-IOCB_CMD_PREADV = 7
-IOCB_CMD_PWRITE = 1
-IOCB_CMD_PWRITEV = 8
-IOCB_FLAG_RESFD = 1
IOPRIO_WHO_PGRP = 2
IOPRIO_WHO_PROCESS = 1
IOPRIO_WHO_USER = 3
@@ -666,11 +658,6 @@ __NR_inotify_add_watch = 276
__NR_inotify_init = 275
__NR_inotify_init1 = 318
__NR_inotify_rm_watch = 277
-__NR_io_cancel = 231
-__NR_io_destroy = 228
-__NR_io_getevents = 229
-__NR_io_setup = 227
-__NR_io_submit = 230
__NR_ioctl = 54
__NR_ioperm = 101
__NR_iopl = 110