github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/linux/dev_loop.txt (about) 1 # Copyright 2017 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 <linux/loop.h> 6 7 resource fd_loop[fd_block] 8 syz_open_dev$loop(dev ptr[in, string["/dev/loop#"]], id intptr, flags flags[open_flags]) fd_loop 9 10 ioctl$LOOP_SET_FD(fd fd_loop, cmd const[LOOP_SET_FD], arg fd) 11 ioctl$LOOP_CONFIGURE(fd fd_loop, cmd const[LOOP_CONFIGURE], arg ptr[in, loop_config]) 12 ioctl$LOOP_CHANGE_FD(fd fd_loop, cmd const[LOOP_CHANGE_FD], arg fd) 13 ioctl$LOOP_CLR_FD(fd fd_loop, cmd const[LOOP_CLR_FD]) 14 ioctl$LOOP_SET_STATUS(fd fd_loop, cmd const[LOOP_SET_STATUS], arg ptr[in, loop_info]) 15 ioctl$LOOP_SET_STATUS64(fd fd_loop, cmd const[LOOP_SET_STATUS64], arg ptr[in, loop_info64]) 16 ioctl$LOOP_GET_STATUS(fd fd_loop, cmd const[LOOP_GET_STATUS], arg ptr[out, loop_info]) 17 ioctl$LOOP_GET_STATUS64(fd fd_loop, cmd const[LOOP_GET_STATUS64], arg ptr[out, loop_info64]) 18 ioctl$LOOP_SET_CAPACITY(fd fd_loop, cmd const[LOOP_SET_CAPACITY]) 19 ioctl$LOOP_SET_DIRECT_IO(fd fd_loop, cmd const[LOOP_SET_DIRECT_IO], arg intptr) 20 ioctl$LOOP_SET_BLOCK_SIZE(fd fd_loop, cmd const[LOOP_SET_BLOCK_SIZE], arg intptr) 21 22 resource fd_loop_ctrl[fd] 23 resource fd_loop_num[intptr]: 0, 1, 2, 10, 11, 12 24 openat$loop_ctrl(fd const[AT_FDCWD], file ptr[in, string["/dev/loop-control"]], flags flags[open_flags], mode const[0]) fd_loop_ctrl 25 ioctl$LOOP_CTL_GET_FREE(fd fd_loop_ctrl, cmd const[LOOP_CTL_GET_FREE]) fd_loop_num 26 ioctl$LOOP_CTL_ADD(fd fd_loop_ctrl, cmd const[LOOP_CTL_ADD], num fd_loop_num) fd_loop_num 27 ioctl$LOOP_CTL_REMOVE(fd fd_loop_ctrl, cmd const[LOOP_CTL_REMOVE], num fd_loop_num) 28 29 lo_encrypt_type = LO_CRYPT_NONE, LO_CRYPT_XOR, LO_CRYPT_DES, LO_CRYPT_FISH2, LO_CRYPT_BLOW, LO_CRYPT_CAST128, LO_CRYPT_IDEA, LO_CRYPT_DUMMY, LO_CRYPT_SKIPJACK, LO_CRYPT_CRYPTOAPI 30 lo_flags = LO_FLAGS_READ_ONLY, LO_FLAGS_AUTOCLEAR, LO_FLAGS_PARTSCAN, LO_FLAGS_DIRECT_IO 31 32 loop_config { 33 fd fd_loop 34 block_size int32 35 info loop_info64 36 reserved array[const[0, int64], 8] 37 } 38 39 loop_info { 40 lo_number const[0, int32] 41 # NEED: on amd64 lo_device/lo_rdevice (__kernel_old_dev_t) is long, on 386 it's short... 42 lo_device alignptr[const[0, int16]] 43 lo_inode const[0, intptr] 44 lo_rdevice alignptr[const[0, int16]] 45 lo_offset int32 46 lo_enc_type flags[lo_encrypt_type, int32] 47 lo_enc_key_size int32[0:LO_KEY_SIZE] 48 lo_flags flags[lo_flags, int32] 49 lo_name array[int8, LO_NAME_SIZE] 50 lo_enc_key array[int8, LO_KEY_SIZE] 51 lo_init array[intptr, 2] 52 reserved const[0, int32] 53 } 54 55 loop_info64 { 56 lo_device const[0, int64] 57 lo_inode const[0, int64] 58 lo_rdevice const[0, int64] 59 lo_offset int64 60 lo_sizelimit int64 61 lo_number const[0, int32] 62 lo_enc_type flags[lo_encrypt_type, int32] 63 lo_enc_key_size int32[0:LO_KEY_SIZE] 64 lo_flags flags[lo_flags, int32] 65 lo_file_name array[int8, LO_NAME_SIZE] 66 lo_crypt_name array[int8, LO_NAME_SIZE] 67 lo_enc_key array[int8, LO_KEY_SIZE] 68 lo_init array[int64, 2] 69 }