github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/linux/dev_block.txt (about) 1 # Copyright 2018 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/fs.h> 5 include <uapi/linux/blktrace_api.h> 6 include <uapi/linux/blkzoned.h> 7 include <uapi/linux/pr.h> 8 include <uapi/linux/hdreg.h> 9 include <uapi/linux/blkpg.h> 10 11 resource fd_block_trace[fd] 12 resource fd_block[fd_block_trace] 13 14 openat$nullb(fd const[AT_FDCWD], file ptr[in, string["/dev/nullb0"]], flags flags[open_flags], mode const[0]) fd_block 15 openat$md(fd const[AT_FDCWD], file ptr[in, string["/dev/md0"]], flags flags[open_flags], mode const[0]) fd_block 16 openat$pmem0(fd const[AT_FDCWD], file ptr[in, string["/dev/pmem0"]], flags flags[open_flags], mode const[0]) fd_block 17 18 ioctl$BLKTRACESETUP(fd fd_block_trace, cmd const[BLKTRACESETUP], arg ptr[in, blk_user_trace_setup]) 19 ioctl$BLKTRACESTART(fd fd_block_trace, cmd const[BLKTRACESTART], arg const[0]) 20 ioctl$BLKTRACESTOP(fd fd_block_trace, cmd const[BLKTRACESTOP], arg const[0]) 21 ioctl$BLKTRACETEARDOWN(fd fd_block_trace, cmd const[BLKTRACETEARDOWN], arg const[0]) 22 23 ioctl$BLKFLSBUF(fd fd_block, cmd const[BLKFLSBUF], arg ptr[in, intptr]) 24 ioctl$BLKROSET(fd fd_block, cmd const[BLKROSET], arg ptr[in, intptr]) 25 ioctl$BLKDISCARD(fd fd_block, cmd const[BLKDISCARD], arg ptr[in, intptr]) 26 ioctl$BLKSECDISCARD(fd fd_block, cmd const[BLKSECDISCARD], arg ptr[in, intptr]) 27 ioctl$BLKZEROOUT(fd fd_block, cmd const[BLKZEROOUT], arg ptr[in, blk_zone_range]) 28 ioctl$BLKREPORTZONE(fd fd_block, cmd const[BLKREPORTZONE], arg ptr[in, blk_zone_report]) 29 ioctl$BLKRESETZONE(fd fd_block, cmd const[BLKRESETZONE], arg ptr[in, blk_zone_range]) 30 ioctl$BLKRAGET(fd fd_block, cmd const[BLKRAGET], arg ptr[out, intptr]) 31 ioctl$BLKROGET(fd fd_block, cmd const[BLKROGET], arg ptr[out, intptr]) 32 ioctl$BLKBSZGET(fd fd_block, cmd const[BLKBSZGET], arg ptr[out, intptr]) 33 ioctl$BLKPBSZGET(fd fd_block, cmd const[BLKPBSZGET], arg ptr[out, intptr]) 34 ioctl$BLKIOMIN(fd fd_block, cmd const[BLKIOMIN], arg ptr[out, intptr]) 35 ioctl$BLKIOOPT(fd fd_block, cmd const[BLKIOOPT], arg ptr[out, intptr]) 36 ioctl$BLKALIGNOFF(fd fd_block, cmd const[BLKALIGNOFF], arg ptr[out, intptr]) 37 ioctl$BLKSECTGET(fd fd_block, cmd const[BLKSECTGET], arg ptr[out, intptr]) 38 ioctl$BLKROTATIONAL(fd fd_block, cmd const[BLKROTATIONAL], arg ptr[out, intptr]) 39 ioctl$BLKFRASET(fd fd_block, cmd const[BLKFRASET], arg ptr[in, intptr]) 40 ioctl$BLKBSZSET(fd fd_block, cmd const[BLKBSZSET], arg ptr[in, intptr]) 41 ioctl$BLKPG(fd fd_block, cmd const[BLKPG], arg ptr[in, blkpg_ioctl_arg]) 42 ioctl$BLKRRPART(fd fd_block, cmd const[BLKRRPART], arg const[0]) 43 ioctl$BLKGETSIZE(fd fd_block, cmd const[BLKGETSIZE], arg ptr[out, intptr]) 44 ioctl$BLKGETSIZE64(fd fd_block, cmd const[BLKGETSIZE64], arg ptr[out, int64]) 45 46 ioctl$HDIO_GETGEO(fd fd_block, cmd const[HDIO_GETGEO], arg ptr[out, hd_geometry]) 47 48 ioctl$IOC_PR_REGISTER(fd fd_block, cmd const[IOC_PR_REGISTER], arg ptr[in, pr_registration]) 49 ioctl$IOC_PR_RESERVE(fd fd_block, cmd const[IOC_PR_RESERVE], arg ptr[in, pr_reservation]) 50 ioctl$IOC_PR_RELEASE(fd fd_block, cmd const[IOC_PR_RELEASE], arg ptr[in, pr_reservation]) 51 ioctl$IOC_PR_PREEMPT(fd fd_block, cmd const[IOC_PR_PREEMPT], arg ptr[in, pr_preempt]) 52 ioctl$IOC_PR_PREEMPT_ABORT(fd fd_block, cmd const[IOC_PR_PREEMPT_ABORT], arg ptr[in, pr_preempt]) 53 ioctl$IOC_PR_CLEAR(fd fd_block, cmd const[IOC_PR_CLEAR], arg ptr[in, pr_clear]) 54 55 blk_zone_report { 56 sector int64 57 nr_zones len[zones, int32] 58 reserved const[0, int32] 59 zones array[blk_zone] 60 } [packed] 61 62 blk_zone { 63 start int64 64 len int64 65 wp int64 66 type int8 67 cond int8 68 non_seq int8 69 reset int8 70 resv array[const[0, int8], 4] 71 capacity int64 72 reserved array[const[0, int8], 24] 73 } 74 75 blk_zone_range { 76 sector int64 77 nr_sectors int64 78 } 79 80 hd_geometry { 81 heads int8 82 sectors int8 83 cylinders int16 84 start intptr 85 } 86 87 blkpg_ioctl_arg { 88 op flags[blkpg_ioctl_op, int32] 89 flags const[0, int32] 90 datalen bytesize[data, int32] 91 data ptr[in, blkpg_partition] 92 } 93 94 blkpg_partition { 95 start int64 96 length int64 97 pno int32[0:20] 98 devname array[const[0, int8], BLKPG_DEVNAMELTH] 99 volname array[const[0, int8], BLKPG_VOLNAMELTH] 100 } 101 102 blkpg_ioctl_op = BLKPG_ADD_PARTITION, BLKPG_DEL_PARTITION, BLKPG_RESIZE_PARTITION 103 104 blk_user_trace_setup { 105 name array[const[0, int8], BLKTRACE_BDEV_SIZE] 106 act_mask int16 107 buf_size int32 108 buf_nr int32 109 start_lba int64 110 end_lba int64 111 pid pid 112 } 113 114 pr_registration { 115 old_key int64 116 new_key int64 117 flags bool32 118 pad const[0, int32] 119 } 120 121 pr_reservation { 122 key int64 123 type int32 124 flags bool32 125 } 126 127 pr_preempt { 128 old_key int64 129 new_key int64 130 type int32 131 flags int32 132 } 133 134 pr_clear { 135 key int64 136 flags const[0, int32] 137 pad const[0, int32] 138 }