github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/linux/dev_snapshot.txt (about) 1 # Copyright 2020 syzkaller project authors. All rights reserved. 2 # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. 3 4 include <uapi/linux/suspend_ioctls.h> 5 include <linux/ioctl.h> 6 include <linux/fcntl.h> 7 8 resource fd_snapshot[fd] 9 10 openat$snapshot(fd const[AT_FDCWD], file ptr[in, string["/dev/snapshot"]], flags flags[open_flags], mode const[0]) fd_snapshot 11 write$snapshot(fd fd_snapshot, buffer ptr[in, array[int8]], len bytesize[buffer]) 12 read$snapshot(fd fd_snapshot, buffer ptr[out, array[int8]], len bytesize[buffer]) 13 14 # These are disabled because they can easily kill the machine. 15 ioctl$SNAPSHOT_FREEZE(fd fd_snapshot, cmd const[SNAPSHOT_FREEZE]) (disabled) 16 ioctl$SNAPSHOT_POWER_OFF(fd fd_snapshot, cmd const[SNAPSHOT_POWER_OFF]) (disabled) 17 18 ioctl$SNAPSHOT_UNFREEZE(fd fd_snapshot, cmd const[SNAPSHOT_UNFREEZE]) 19 ioctl$SNAPSHOT_CREATE_IMAGE(fd fd_snapshot, cmd const[SNAPSHOT_CREATE_IMAGE], arg ptr[out, int32]) 20 ioctl$SNAPSHOT_ATOMIC_RESTORE(fd fd_snapshot, cmd const[SNAPSHOT_ATOMIC_RESTORE]) 21 ioctl$SNAPSHOT_FREE(fd fd_snapshot, cmd const[SNAPSHOT_FREE]) 22 ioctl$SNAPSHOT_PREF_IMAGE_SIZE(fd fd_snapshot, cmd const[SNAPSHOT_PREF_IMAGE_SIZE], arg intptr) 23 ioctl$SNAPSHOT_GET_IMAGE_SIZE(fd fd_snapshot, cmd const[SNAPSHOT_GET_IMAGE_SIZE], arg ptr[out, int64]) 24 ioctl$SNAPSHOT_AVAIL_SWAP_SIZE(fd fd_snapshot, cmd const[SNAPSHOT_AVAIL_SWAP_SIZE], arg ptr[out, int64]) 25 ioctl$SNAPSHOT_ALLOC_SWAP_PAGE(fd fd_snapshot, cmd const[SNAPSHOT_ALLOC_SWAP_PAGE], arg ptr[out, int64]) 26 ioctl$SNAPSHOT_FREE_SWAP_PAGES(fd fd_snapshot, cmd const[SNAPSHOT_FREE_SWAP_PAGES]) 27 ioctl$SNAPSHOT_S2RAM(fd fd_snapshot, cmd const[SNAPSHOT_S2RAM]) 28 ioctl$SNAPSHOT_PLATFORM_SUPPORT(fd fd_snapshot, cmd const[SNAPSHOT_PLATFORM_SUPPORT], arg intptr) 29 ioctl$SNAPSHOT_SET_SWAP_AREA(fd fd_snapshot, cmd const[SNAPSHOT_SET_SWAP_AREA], arg ptr[in, resume_swap_area]) 30 31 resume_swap_area { 32 offset int64 33 dev int32 34 } [packed]