diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2017-02-03 23:53:41 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2017-02-03 23:55:14 +0100 |
| commit | 37210866476496903ccfeed83cc3482eaf236ceb (patch) | |
| tree | bbb4c3c523a4f81c59e960f8aa2250a579a5cd8c /sys/loop.txt | |
| parent | e9dc5a53e9a925fc2809f8ce05db7866007a6919 (diff) | |
sys: add /dev/loop description
Diffstat (limited to 'sys/loop.txt')
| -rw-r--r-- | sys/loop.txt | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/sys/loop.txt b/sys/loop.txt new file mode 100644 index 000000000..9371a0ac0 --- /dev/null +++ b/sys/loop.txt @@ -0,0 +1,58 @@ +# Copyright 2017 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 <linux/loop.h> + +resource fd_loop[fd] +syz_open_dev$loop(dev ptr[in, string["/dev/loop#"]], id intptr, flags flags[open_flags]) fd_loop + +ioctl$LOOP_SET_FD(fd fd_loop, cmd const[LOOP_SET_FD], arg fd) +ioctl$LOOP_CHANGE_FD(fd fd_loop, cmd const[LOOP_SET_FD], arg fd) +ioctl$LOOP_CLR_FD(fd fd_loop, cmd const[LOOP_CLR_FD]) +ioctl$LOOP_SET_STATUS(fd fd_loop, cmd const[LOOP_SET_STATUS], arg ptr[in, loop_info]) +ioctl$LOOP_SET_STATUS64(fd fd_loop, cmd const[LOOP_SET_STATUS64], arg ptr[in, loop_info64]) +ioctl$LOOP_GET_STATUS(fd fd_loop, cmd const[LOOP_GET_STATUS], arg ptr[out, loop_info]) +ioctl$LOOP_GET_STATUS64(fd fd_loop, cmd const[LOOP_GET_STATUS64], arg ptr[out, loop_info64]) +ioctl$LOOP_SET_CAPACITY(fd fd_loop, cmd const[LOOP_SET_CAPACITY]) +ioctl$LOOP_SET_DIRECT_IO(fd fd_loop, cmd const[LOOP_SET_DIRECT_IO], arg intptr) + +resource fd_loop_ctrl[fd] +resource fd_loop_num[intptr]: 0, 1, 2, 10, 11, 12 +openat$loop_ctrl(fd const[AT_FDCWD], file ptr[in, string["/dev/loop-control"]], flags flags[open_flags], mode const[0]) fd_loop_ctrl +ioctl$LOOP_CTL_GET_FREE(fd fd_loop_ctrl, cmd const[LOOP_CTL_GET_FREE]) fd_loop_num +ioctl$LOOP_CTL_ADD(fd fd_loop_ctrl, cmd const[LOOP_CTL_ADD], num fd_loop_num) +ioctl$LOOP_CTL_REMOVE(fd fd_loop_ctrl, cmd const[LOOP_CTL_ADD], num fd_loop_num) + +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 +lo_flags = LO_FLAGS_READ_ONLY, LO_FLAGS_AUTOCLEAR, LO_FLAGS_PARTSCAN, LO_FLAGS_DIRECT_IO + +loop_info { + lo_number const[0, int32] + lo_device const[0, int32] + lo_inode const[0, int32] + lo_rdevice const[0, int32] + lo_offset int32 + lo_enc_type flags[lo_encrypt_type, int32] + lo_enc_key_size int32[0:LO_KEY_SIZE] + lo_flags flags[lo_flags, int32] + lo_name array[int8, LO_NAME_SIZE] + lo_enc_key array[int8, LO_KEY_SIZE] + lo_init array[intptr, 2] + reserved const[0, int32] +} + +loop_info64 { + lo_device const[0, int64] + lo_inode const[0, int64] + lo_rdevice const[0, int64] + lo_offset int64 + lo_sizelimit int64 + lo_number const[0, int32] + lo_enc_type flags[lo_encrypt_type, int32] + lo_enc_key_size int32[0:LO_KEY_SIZE] + lo_flags flags[lo_flags, int32] + lo_file_name array[int8, LO_NAME_SIZE] + lo_crypt_name array[int8, LO_NAME_SIZE] + lo_enc_key array[int8, LO_KEY_SIZE] + lo_init array[intptr, 2] +} |
