From 609fb51750f5938bd47f9b78c3d7d8fb435d069c Mon Sep 17 00:00:00 2001 From: handeharputlu <43519271+handeharputlu@users.noreply.github.com> Date: Tue, 14 Jul 2020 15:51:11 +0300 Subject: sys/linux: /dev/snapshot descriptions (#1934) --- sys/linux/dev_snapshot.txt | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 sys/linux/dev_snapshot.txt (limited to 'sys/linux/dev_snapshot.txt') 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 +include +include + +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 +} -- cgit mrf-deployment