From c5ca9ff98c37eaae6ef891e675c02514513684f4 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 8 Jun 2018 18:55:53 +0200 Subject: sys/linux: move aio descriptions into separate file --- sys/linux/aio.txt | 40 ++++++++++++++++++++++++++++++++++++++++ sys/linux/aio_386.const | 14 ++++++++++++++ sys/linux/aio_amd64.const | 14 ++++++++++++++ sys/linux/aio_arm.const | 14 ++++++++++++++ sys/linux/aio_arm64.const | 14 ++++++++++++++ sys/linux/aio_ppc64le.const | 14 ++++++++++++++ sys/linux/sys.txt | 37 +------------------------------------ sys/linux/sys_386.const | 13 ------------- sys/linux/sys_amd64.const | 13 ------------- sys/linux/sys_arm.const | 13 ------------- sys/linux/sys_arm64.const | 13 ------------- sys/linux/sys_ppc64le.const | 13 ------------- 12 files changed, 111 insertions(+), 101 deletions(-) create mode 100644 sys/linux/aio.txt create mode 100644 sys/linux/aio_386.const create mode 100644 sys/linux/aio_amd64.const create mode 100644 sys/linux/aio_arm.const create mode 100644 sys/linux/aio_arm64.const create mode 100644 sys/linux/aio_ppc64le.const (limited to 'sys/linux') 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 + +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 include include include -include include include include @@ -48,7 +47,7 @@ include include include include -include +include include include include @@ -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 -- cgit mrf-deployment