syzkaller/sys/linux/dev_snapshot.txt
Andrey Konovalov a688ac1353 sys/linux: disable SNAPSHOT_POWER_OFF
It causes shutdowns.
2020-07-21 16:47:38 +02:00

35 lines
1.9 KiB
Plaintext

# 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])
# These are disabled because they can easily kill the machine.
ioctl$SNAPSHOT_FREEZE(fd fd_snapshot, cmd const[SNAPSHOT_FREEZE]) (disabled)
ioctl$SNAPSHOT_POWER_OFF(fd fd_snapshot, cmd const[SNAPSHOT_POWER_OFF]) (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_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
}