diff options
| author | handeharputlu <43519271+handeharputlu@users.noreply.github.com> | 2020-07-14 15:51:11 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-14 14:51:11 +0200 |
| commit | 609fb51750f5938bd47f9b78c3d7d8fb435d069c (patch) | |
| tree | 9967c854a78505998c8537578a71bcba7ecf37d6 /sys | |
| parent | 6f4580264a29fa73097e96b436141a8594b97610 (diff) | |
sys/linux: /dev/snapshot descriptions (#1934)
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/linux/dev_snapshot.txt | 33 | ||||
| -rw-r--r-- | sys/linux/dev_snapshot_386.const | 20 | ||||
| -rw-r--r-- | sys/linux/dev_snapshot_amd64.const | 20 | ||||
| -rw-r--r-- | sys/linux/dev_snapshot_arm.const | 20 | ||||
| -rw-r--r-- | sys/linux/dev_snapshot_arm64.const | 20 | ||||
| -rw-r--r-- | sys/linux/dev_snapshot_mips64le.const | 20 | ||||
| -rw-r--r-- | sys/linux/dev_snapshot_ppc64le.const | 20 | ||||
| -rw-r--r-- | sys/linux/dev_snapshot_riscv64.const | 20 | ||||
| -rw-r--r-- | sys/linux/dev_snapshot_s390x.const | 20 | ||||
| -rw-r--r-- | sys/linux/sys.txt | 6 | ||||
| -rw-r--r-- | sys/linux/sys_386.const | 1 | ||||
| -rw-r--r-- | sys/linux/sys_amd64.const | 1 | ||||
| -rw-r--r-- | sys/linux/sys_arm.const | 1 | ||||
| -rw-r--r-- | sys/linux/sys_arm64.const | 1 | ||||
| -rw-r--r-- | sys/linux/sys_mips64le.const | 1 | ||||
| -rw-r--r-- | sys/linux/sys_ppc64le.const | 1 | ||||
| -rw-r--r-- | sys/linux/sys_riscv64.const | 1 | ||||
| -rw-r--r-- | sys/linux/sys_s390x.const | 1 |
18 files changed, 193 insertions, 14 deletions
diff --git a/sys/linux/dev_snapshot.txt b/sys/linux/dev_snapshot.txt new file mode 100644 index 000000000..62af2803e --- /dev/null +++ b/sys/linux/dev_snapshot.txt @@ -0,0 +1,33 @@ +# Copyright 2020 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/suspend_ioctls.h> +include <linux/ioctl.h> +include <linux/fcntl.h> + +resource fd_snapshot[fd] + +openat$snapshot(fd const[AT_FDCWD], file ptr[in, string["/dev/snapshot"]], flags flags[open_flags], mode const[0]) fd_snapshot +write$snapshot(fd fd_snapshot, buffer ptr[in, array[int8]], len bytesize[buffer]) +read$snapshot(fd fd_snapshot, buffer ptr[out, array[int8]], len bytesize[buffer]) + +# SNAPSHOT_FREEZE is disabled because it can easily kill the machine. +ioctl$SNAPHOT_FREEZE(fd fd_snapshot, cmd const[SNAPSHOT_FREEZE]) (disabled) +ioctl$SNAPSHOT_UNFREEZE(fd fd_snapshot, cmd const[SNAPSHOT_UNFREEZE]) +ioctl$SNAPSHOT_CREATE_IMAGE(fd fd_snapshot, cmd const[SNAPSHOT_CREATE_IMAGE], arg ptr[out, int32]) +ioctl$SNAPSHOT_ATOMIC_RESTORE(fd fd_snapshot, cmd const[SNAPSHOT_ATOMIC_RESTORE]) +ioctl$SNAPSHOT_FREE(fd fd_snapshot, cmd const[SNAPSHOT_FREE]) +ioctl$SNAPSHOT_PREF_IMAGE_SIZE(fd fd_snapshot, cmd const[SNAPSHOT_PREF_IMAGE_SIZE], arg intptr) +ioctl$SNAPSHOT_GET_IMAGE_SIZE(fd fd_snapshot, cmd const[SNAPSHOT_GET_IMAGE_SIZE], arg ptr[out, int64]) +ioctl$SNAPSHOT_AVAIL_SWAP_SIZE(fd fd_snapshot, cmd const[SNAPSHOT_AVAIL_SWAP_SIZE], arg ptr[out, int64]) +ioctl$SNAPSHOT_ALLOC_SWAP_PAGE(fd fd_snapshot, cmd const[SNAPSHOT_ALLOC_SWAP_PAGE], arg ptr[out, int64]) +ioctl$SNAPSHOT_FREE_SWAP_PAGES(fd fd_snapshot, cmd const[SNAPSHOT_FREE_SWAP_PAGES]) +ioctl$SNAPSHOT_S2RAM(fd fd_snapshot, cmd const[SNAPSHOT_S2RAM]) +ioctl$SNAPSHOT_PLATFORM_SUPPORT(fd fd_snapshot, cmd const[SNAPSHOT_PLATFORM_SUPPORT], arg intptr) +ioctl$SNAPSHOT_POWER_OFF(fd fd_snapshot, cmd const[SNAPSHOT_POWER_OFF]) +ioctl$SNAPSHOT_SET_SWAP_AREA(fd fd_snapshot, cmd const[SNAPSHOT_SET_SWAP_AREA], arg ptr[in, resume_swap_area]) + +resume_swap_area { + offset int64 + dev int32 +} diff --git a/sys/linux/dev_snapshot_386.const b/sys/linux/dev_snapshot_386.const new file mode 100644 index 000000000..54bac5303 --- /dev/null +++ b/sys/linux/dev_snapshot_386.const @@ -0,0 +1,20 @@ +# AUTOGENERATED FILE +AT_FDCWD = 18446744073709551516 +SNAPSHOT_ALLOC_SWAP_PAGE = 2148021012 +SNAPSHOT_ATOMIC_RESTORE = 13060 +SNAPSHOT_AVAIL_SWAP_SIZE = 2148021011 +SNAPSHOT_CREATE_IMAGE = 1074017041 +SNAPSHOT_FREE = 13061 +SNAPSHOT_FREEZE = 13057 +SNAPSHOT_FREE_SWAP_PAGES = 13065 +SNAPSHOT_GET_IMAGE_SIZE = 2148021006 +SNAPSHOT_PLATFORM_SUPPORT = 13071 +SNAPSHOT_POWER_OFF = 13072 +SNAPSHOT_PREF_IMAGE_SIZE = 13074 +SNAPSHOT_S2RAM = 13067 +SNAPSHOT_SET_SWAP_AREA = 1074541325 +SNAPSHOT_UNFREEZE = 13058 +__NR_ioctl = 54 +__NR_openat = 295 +__NR_read = 3 +__NR_write = 4 diff --git a/sys/linux/dev_snapshot_amd64.const b/sys/linux/dev_snapshot_amd64.const new file mode 100644 index 000000000..bbf850a44 --- /dev/null +++ b/sys/linux/dev_snapshot_amd64.const @@ -0,0 +1,20 @@ +# AUTOGENERATED FILE +AT_FDCWD = 18446744073709551516 +SNAPSHOT_ALLOC_SWAP_PAGE = 2148021012 +SNAPSHOT_ATOMIC_RESTORE = 13060 +SNAPSHOT_AVAIL_SWAP_SIZE = 2148021011 +SNAPSHOT_CREATE_IMAGE = 1074017041 +SNAPSHOT_FREE = 13061 +SNAPSHOT_FREEZE = 13057 +SNAPSHOT_FREE_SWAP_PAGES = 13065 +SNAPSHOT_GET_IMAGE_SIZE = 2148021006 +SNAPSHOT_PLATFORM_SUPPORT = 13071 +SNAPSHOT_POWER_OFF = 13072 +SNAPSHOT_PREF_IMAGE_SIZE = 13074 +SNAPSHOT_S2RAM = 13067 +SNAPSHOT_SET_SWAP_AREA = 1074541325 +SNAPSHOT_UNFREEZE = 13058 +__NR_ioctl = 16 +__NR_openat = 257 +__NR_read = 0 +__NR_write = 1 diff --git a/sys/linux/dev_snapshot_arm.const b/sys/linux/dev_snapshot_arm.const new file mode 100644 index 000000000..4e2ea3ceb --- /dev/null +++ b/sys/linux/dev_snapshot_arm.const @@ -0,0 +1,20 @@ +# AUTOGENERATED FILE +AT_FDCWD = 18446744073709551516 +SNAPSHOT_ALLOC_SWAP_PAGE = 2148021012 +SNAPSHOT_ATOMIC_RESTORE = 13060 +SNAPSHOT_AVAIL_SWAP_SIZE = 2148021011 +SNAPSHOT_CREATE_IMAGE = 1074017041 +SNAPSHOT_FREE = 13061 +SNAPSHOT_FREEZE = 13057 +SNAPSHOT_FREE_SWAP_PAGES = 13065 +SNAPSHOT_GET_IMAGE_SIZE = 2148021006 +SNAPSHOT_PLATFORM_SUPPORT = 13071 +SNAPSHOT_POWER_OFF = 13072 +SNAPSHOT_PREF_IMAGE_SIZE = 13074 +SNAPSHOT_S2RAM = 13067 +SNAPSHOT_SET_SWAP_AREA = 1074541325 +SNAPSHOT_UNFREEZE = 13058 +__NR_ioctl = 54 +__NR_openat = 322 +__NR_read = 3 +__NR_write = 4 diff --git a/sys/linux/dev_snapshot_arm64.const b/sys/linux/dev_snapshot_arm64.const new file mode 100644 index 000000000..564213248 --- /dev/null +++ b/sys/linux/dev_snapshot_arm64.const @@ -0,0 +1,20 @@ +# AUTOGENERATED FILE +AT_FDCWD = 18446744073709551516 +SNAPSHOT_ALLOC_SWAP_PAGE = 2148021012 +SNAPSHOT_ATOMIC_RESTORE = 13060 +SNAPSHOT_AVAIL_SWAP_SIZE = 2148021011 +SNAPSHOT_CREATE_IMAGE = 1074017041 +SNAPSHOT_FREE = 13061 +SNAPSHOT_FREEZE = 13057 +SNAPSHOT_FREE_SWAP_PAGES = 13065 +SNAPSHOT_GET_IMAGE_SIZE = 2148021006 +SNAPSHOT_PLATFORM_SUPPORT = 13071 +SNAPSHOT_POWER_OFF = 13072 +SNAPSHOT_PREF_IMAGE_SIZE = 13074 +SNAPSHOT_S2RAM = 13067 +SNAPSHOT_SET_SWAP_AREA = 1074541325 +SNAPSHOT_UNFREEZE = 13058 +__NR_ioctl = 29 +__NR_openat = 56 +__NR_read = 63 +__NR_write = 64 diff --git a/sys/linux/dev_snapshot_mips64le.const b/sys/linux/dev_snapshot_mips64le.const new file mode 100644 index 000000000..dba5619e3 --- /dev/null +++ b/sys/linux/dev_snapshot_mips64le.const @@ -0,0 +1,20 @@ +# AUTOGENERATED FILE +AT_FDCWD = 18446744073709551516 +SNAPSHOT_ALLOC_SWAP_PAGE = 1074279188 +SNAPSHOT_ATOMIC_RESTORE = 536883972 +SNAPSHOT_AVAIL_SWAP_SIZE = 1074279187 +SNAPSHOT_CREATE_IMAGE = 2147758865 +SNAPSHOT_FREE = 536883973 +SNAPSHOT_FREEZE = 536883969 +SNAPSHOT_FREE_SWAP_PAGES = 536883977 +SNAPSHOT_GET_IMAGE_SIZE = 1074279182 +SNAPSHOT_PLATFORM_SUPPORT = 536883983 +SNAPSHOT_POWER_OFF = 536883984 +SNAPSHOT_PREF_IMAGE_SIZE = 536883986 +SNAPSHOT_S2RAM = 536883979 +SNAPSHOT_SET_SWAP_AREA = 2148283149 +SNAPSHOT_UNFREEZE = 536883970 +__NR_ioctl = 5015 +__NR_openat = 5247 +__NR_read = 5000 +__NR_write = 5001 diff --git a/sys/linux/dev_snapshot_ppc64le.const b/sys/linux/dev_snapshot_ppc64le.const new file mode 100644 index 000000000..39a4351e6 --- /dev/null +++ b/sys/linux/dev_snapshot_ppc64le.const @@ -0,0 +1,20 @@ +# AUTOGENERATED FILE +AT_FDCWD = 18446744073709551516 +SNAPSHOT_ALLOC_SWAP_PAGE = 1074279188 +SNAPSHOT_ATOMIC_RESTORE = 536883972 +SNAPSHOT_AVAIL_SWAP_SIZE = 1074279187 +SNAPSHOT_CREATE_IMAGE = 2147758865 +SNAPSHOT_FREE = 536883973 +SNAPSHOT_FREEZE = 536883969 +SNAPSHOT_FREE_SWAP_PAGES = 536883977 +SNAPSHOT_GET_IMAGE_SIZE = 1074279182 +SNAPSHOT_PLATFORM_SUPPORT = 536883983 +SNAPSHOT_POWER_OFF = 536883984 +SNAPSHOT_PREF_IMAGE_SIZE = 536883986 +SNAPSHOT_S2RAM = 536883979 +SNAPSHOT_SET_SWAP_AREA = 2148283149 +SNAPSHOT_UNFREEZE = 536883970 +__NR_ioctl = 54 +__NR_openat = 286 +__NR_read = 3 +__NR_write = 4 diff --git a/sys/linux/dev_snapshot_riscv64.const b/sys/linux/dev_snapshot_riscv64.const new file mode 100644 index 000000000..564213248 --- /dev/null +++ b/sys/linux/dev_snapshot_riscv64.const @@ -0,0 +1,20 @@ +# AUTOGENERATED FILE +AT_FDCWD = 18446744073709551516 +SNAPSHOT_ALLOC_SWAP_PAGE = 2148021012 +SNAPSHOT_ATOMIC_RESTORE = 13060 +SNAPSHOT_AVAIL_SWAP_SIZE = 2148021011 +SNAPSHOT_CREATE_IMAGE = 1074017041 +SNAPSHOT_FREE = 13061 +SNAPSHOT_FREEZE = 13057 +SNAPSHOT_FREE_SWAP_PAGES = 13065 +SNAPSHOT_GET_IMAGE_SIZE = 2148021006 +SNAPSHOT_PLATFORM_SUPPORT = 13071 +SNAPSHOT_POWER_OFF = 13072 +SNAPSHOT_PREF_IMAGE_SIZE = 13074 +SNAPSHOT_S2RAM = 13067 +SNAPSHOT_SET_SWAP_AREA = 1074541325 +SNAPSHOT_UNFREEZE = 13058 +__NR_ioctl = 29 +__NR_openat = 56 +__NR_read = 63 +__NR_write = 64 diff --git a/sys/linux/dev_snapshot_s390x.const b/sys/linux/dev_snapshot_s390x.const new file mode 100644 index 000000000..b80c6eff8 --- /dev/null +++ b/sys/linux/dev_snapshot_s390x.const @@ -0,0 +1,20 @@ +# AUTOGENERATED FILE +AT_FDCWD = 18446744073709551516 +SNAPSHOT_ALLOC_SWAP_PAGE = 2148021012 +SNAPSHOT_ATOMIC_RESTORE = 13060 +SNAPSHOT_AVAIL_SWAP_SIZE = 2148021011 +SNAPSHOT_CREATE_IMAGE = 1074017041 +SNAPSHOT_FREE = 13061 +SNAPSHOT_FREEZE = 13057 +SNAPSHOT_FREE_SWAP_PAGES = 13065 +SNAPSHOT_GET_IMAGE_SIZE = 2148021006 +SNAPSHOT_PLATFORM_SUPPORT = 13071 +SNAPSHOT_POWER_OFF = 13072 +SNAPSHOT_PREF_IMAGE_SIZE = 13074 +SNAPSHOT_S2RAM = 13067 +SNAPSHOT_SET_SWAP_AREA = 1074541325 +SNAPSHOT_UNFREEZE = 13058 +__NR_ioctl = 54 +__NR_openat = 288 +__NR_read = 3 +__NR_write = 4 diff --git a/sys/linux/sys.txt b/sys/linux/sys.txt index 4f1b2d5f9..0589dc232 100644 --- a/sys/linux/sys.txt +++ b/sys/linux/sys.txt @@ -50,7 +50,6 @@ include <uapi/linux/kcov.h> include <uapi/linux/membarrier.h> include <uapi/linux/capability.h> include <uapi/linux/seccomp.h> -include <uapi/linux/suspend_ioctls.h> include <kernel/sched/sched.h> include <uapi/linux/fsinfo.h> include <uapi/linux/close_range.h> @@ -576,11 +575,6 @@ openat$ocfs2_control(fd const[AT_FDCWD], file ptr[in, string["/dev/ocfs2_control openat$nvme_fabrics(fd const[AT_FDCWD], file ptr[in, string["/dev/nvme-fabrics"]], flags flags[open_flags], mode const[0]) fd openat$bsg(fd const[AT_FDCWD], file ptr[in, string["/dev/bsg"]], flags flags[open_flags], mode const[0]) fd -openat$snapshot(fd const[AT_FDCWD], file ptr[in, string["/dev/snapshot"]], flags flags[open_flags], mode const[0]) fd - -# SNAPSHOT_FREEZE is disabled because it can easily kill the machine. -ioctl$SNAPSHOT_FREEZE(fd fd, cmd const[SNAPSHOT_FREEZE]) (disabled) - pipefd { rfd fd wfd fd diff --git a/sys/linux/sys_386.const b/sys/linux/sys_386.const index d1999e9f6..d06e78113 100644 --- a/sys/linux/sys_386.const +++ b/sys/linux/sys_386.const @@ -503,7 +503,6 @@ SIGINFO_SIZE = 128 SIG_BLOCK = 0 SIG_SETMASK = 2 SIG_UNBLOCK = 1 -SNAPSHOT_FREEZE = 13057 SPLICE_F_GIFT = 8 SPLICE_F_MORE = 4 SPLICE_F_MOVE = 1 diff --git a/sys/linux/sys_amd64.const b/sys/linux/sys_amd64.const index 08eb22ff7..8dcbcb1d9 100644 --- a/sys/linux/sys_amd64.const +++ b/sys/linux/sys_amd64.const @@ -503,7 +503,6 @@ SIGINFO_SIZE = 128 SIG_BLOCK = 0 SIG_SETMASK = 2 SIG_UNBLOCK = 1 -SNAPSHOT_FREEZE = 13057 SPLICE_F_GIFT = 8 SPLICE_F_MORE = 4 SPLICE_F_MOVE = 1 diff --git a/sys/linux/sys_arm.const b/sys/linux/sys_arm.const index f84722518..255b09c6b 100644 --- a/sys/linux/sys_arm.const +++ b/sys/linux/sys_arm.const @@ -503,7 +503,6 @@ SIGINFO_SIZE = 128 SIG_BLOCK = 0 SIG_SETMASK = 2 SIG_UNBLOCK = 1 -SNAPSHOT_FREEZE = 13057 SPLICE_F_GIFT = 8 SPLICE_F_MORE = 4 SPLICE_F_MOVE = 1 diff --git a/sys/linux/sys_arm64.const b/sys/linux/sys_arm64.const index 6ad56e240..6d6ca220f 100644 --- a/sys/linux/sys_arm64.const +++ b/sys/linux/sys_arm64.const @@ -503,7 +503,6 @@ SIGINFO_SIZE = 128 SIG_BLOCK = 0 SIG_SETMASK = 2 SIG_UNBLOCK = 1 -SNAPSHOT_FREEZE = 13057 SPLICE_F_GIFT = 8 SPLICE_F_MORE = 4 SPLICE_F_MOVE = 1 diff --git a/sys/linux/sys_mips64le.const b/sys/linux/sys_mips64le.const index 2d5503b38..a9c01db82 100644 --- a/sys/linux/sys_mips64le.const +++ b/sys/linux/sys_mips64le.const @@ -503,7 +503,6 @@ SIGINFO_SIZE = 128 SIG_BLOCK = 1 SIG_SETMASK = 3 SIG_UNBLOCK = 2 -SNAPSHOT_FREEZE = 536883969 SPLICE_F_GIFT = 8 SPLICE_F_MORE = 4 SPLICE_F_MOVE = 1 diff --git a/sys/linux/sys_ppc64le.const b/sys/linux/sys_ppc64le.const index 3915e89e5..e43cfe380 100644 --- a/sys/linux/sys_ppc64le.const +++ b/sys/linux/sys_ppc64le.const @@ -503,7 +503,6 @@ SIGINFO_SIZE = 128 SIG_BLOCK = 0 SIG_SETMASK = 2 SIG_UNBLOCK = 1 -SNAPSHOT_FREEZE = 536883969 SPLICE_F_GIFT = 8 SPLICE_F_MORE = 4 SPLICE_F_MOVE = 1 diff --git a/sys/linux/sys_riscv64.const b/sys/linux/sys_riscv64.const index 55b6a2abd..0c758c9bd 100644 --- a/sys/linux/sys_riscv64.const +++ b/sys/linux/sys_riscv64.const @@ -503,7 +503,6 @@ SIGINFO_SIZE = 128 SIG_BLOCK = 0 SIG_SETMASK = 2 SIG_UNBLOCK = 1 -SNAPSHOT_FREEZE = 13057 SPLICE_F_GIFT = 8 SPLICE_F_MORE = 4 SPLICE_F_MOVE = 1 diff --git a/sys/linux/sys_s390x.const b/sys/linux/sys_s390x.const index 1227daba1..42a111169 100644 --- a/sys/linux/sys_s390x.const +++ b/sys/linux/sys_s390x.const @@ -503,7 +503,6 @@ SIGINFO_SIZE = 128 SIG_BLOCK = 0 SIG_SETMASK = 2 SIG_UNBLOCK = 1 -SNAPSHOT_FREEZE = 13057 SPLICE_F_GIFT = 8 SPLICE_F_MORE = 4 SPLICE_F_MOVE = 1 |
