|
| 1 | +# Copyright 2024 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 <linux/fcntl.h> |
| 5 | +include <uapi/asm/ioctl.h> |
| 6 | +include <uapi/linux/dm-ioctl.h> |
| 7 | + |
| 8 | +resource fd_dm_ctl[fd] |
| 9 | +resource dm_ctl_dev[int64] |
| 10 | + |
| 11 | +openat$dm_ctl(fd const[AT_FDCWD], file ptr[in, string["/dev/mapper/control"]], flags const[O_RDWR], mode const[0]) fd_dm_ctl |
| 12 | + |
| 13 | +ioctl$DM_VERSION(fd fd_dm_ctl, cmd const[DM_VERSION], arg ptr[inout, dm_ioctl]) |
| 14 | +ioctl$DM_DEV_CREATE(fd fd_dm_ctl, cmd const[DM_DEV_CREATE], arg ptr[inout, dm_ioctl]) |
| 15 | +ioctl$DM_DEV_REMOVE(fd fd_dm_ctl, cmd const[DM_DEV_REMOVE], arg ptr[inout, dm_ioctl]) |
| 16 | +ioctl$DM_DEV_SUSPEND(fd fd_dm_ctl, cmd const[DM_DEV_SUSPEND], arg ptr[inout, dm_ioctl]) |
| 17 | +ioctl$DM_DEV_STATUS(fd fd_dm_ctl, cmd const[DM_DEV_STATUS], arg ptr[inout, dm_ioctl]) |
| 18 | +ioctl$DM_TABLE_CLEAR(fd fd_dm_ctl, cmd const[DM_TABLE_CLEAR], arg ptr[inout, dm_ioctl]) |
| 19 | +ioctl$DM_DEV_ARM_POLL(fd fd_dm_ctl, cmd const[DM_DEV_ARM_POLL], arg ptr[inout, dm_ioctl]) |
| 20 | +ioctl$DM_DEV_RENAME(fd fd_dm_ctl, cmd const[DM_DEV_RENAME], arg ptr[inout, dm_ioctl]) |
| 21 | +ioctl$DM_DEV_WAIT(fd fd_dm_ctl, cmd const[DM_DEV_WAIT], arg ptr[inout, dm_ioctl]) |
| 22 | +ioctl$DM_TABLE_LOAD(fd fd_dm_ctl, cmd const[DM_TABLE_LOAD], arg ptr[inout, dm_ioctl]) |
| 23 | +ioctl$DM_TABLE_DEPS(fd fd_dm_ctl, cmd const[DM_TABLE_DEPS], arg ptr[inout, dm_ioctl]) |
| 24 | +ioctl$DM_TABLE_STATUS(fd fd_dm_ctl, cmd const[DM_TABLE_STATUS], arg ptr[inout, dm_ioctl]) |
| 25 | +ioctl$DM_LIST_VERSIONS(fd fd_dm_ctl, cmd const[DM_LIST_VERSIONS], arg ptr[inout, dm_ioctl]) |
| 26 | +ioctl$DM_TARGET_MSG(fd fd_dm_ctl, cmd const[DM_TARGET_MSG], arg ptr[inout, dm_ioctl]) |
| 27 | +ioctl$DM_DEV_SET_GEOMETRY(fd fd_dm_ctl, cmd const[DM_DEV_SET_GEOMETRY], arg ptr[inout, dm_ioctl]) |
| 28 | +ioctl$DM_GET_TARGET_VERSION(fd fd_dm_ctl, cmd const[DM_GET_TARGET_VERSION], arg ptr[inout, dm_ioctl]) |
| 29 | + |
| 30 | +dm_ioctl { |
| 31 | + version array[int32, 3] |
| 32 | + data_size bytesize[dm_ioctl, int32] |
| 33 | + data_start offsetof[data, int32] |
| 34 | + target_count int32 |
| 35 | + open_count int32 |
| 36 | + flags int32 |
| 37 | + event_nr int32 |
| 38 | + padding int32 |
| 39 | + dev dm_ctl_dev |
| 40 | + name array[int8, DM_NAME_LEN] |
| 41 | + uuid array[int8, DM_UUID_LEN] |
| 42 | + data array[int8, 7] |
| 43 | + data1 array[int8] |
| 44 | +} |
0 commit comments