PRE_MEM_WRITE( "ioctl(RTC_IRQP_READ)", ARG3, sizeof(unsigned long));
break;
+ /* Loopback control */
+ case VKI_LOOP_CTL_ADD:
+ case VKI_LOOP_CTL_REMOVE:
+ case VKI_LOOP_CTL_GET_FREE:
+ break;
+ /* Loopback device */
+ case VKI_LOOP_SET_FD:
+ case VKI_LOOP_CLR_FD:
+ case VKI_LOOP_CHANGE_FD:
+ case VKI_LOOP_SET_CAPACITY:
+ case VKI_LOOP_SET_DIRECT_IO:
+ case VKI_LOOP_SET_BLOCK_SIZE:
+ break;
+ case VKI_LOOP_SET_STATUS:
+ PRE_MEM_READ("ioctl(LOOP_SET_STATUS)", ARG3, sizeof(struct vki_loop_info));
+ break;
+ case VKI_LOOP_GET_STATUS:
+ PRE_MEM_WRITE("ioctl(LOOP_GET_STATUS)", ARG3, sizeof(struct vki_loop_info));
+ break;
+ case VKI_LOOP_SET_STATUS64:
+ PRE_MEM_READ("ioctl(LOOP_SET_STATUS64)", ARG3, sizeof(struct vki_loop_info64));
+ break;
+ case VKI_LOOP_GET_STATUS64:
+ PRE_MEM_WRITE("ioctl(LOOP_GET_STATUS64)", ARG3, sizeof(struct vki_loop_info64));
+ break;
+
/* Block devices */
case VKI_BLKROSET:
PRE_MEM_READ( "ioctl(BLKROSET)", ARG3, sizeof(int));
POST_MEM_WRITE(ARG3, sizeof(unsigned long));
break;
+ /* Loopback devices */
+ case VKI_LOOP_CTL_ADD:
+ case VKI_LOOP_CTL_REMOVE:
+ case VKI_LOOP_CTL_GET_FREE:
+ break;
+ /* Loopback device */
+ case VKI_LOOP_SET_FD:
+ case VKI_LOOP_CLR_FD:
+ case VKI_LOOP_CHANGE_FD:
+ case VKI_LOOP_SET_CAPACITY:
+ case VKI_LOOP_SET_DIRECT_IO:
+ case VKI_LOOP_SET_BLOCK_SIZE:
+ break;
+ case VKI_LOOP_SET_STATUS:
+ POST_MEM_WRITE(ARG3, sizeof(struct vki_loop_info));
+ break;
+ case VKI_LOOP_GET_STATUS:
+ POST_MEM_WRITE(ARG3, sizeof(struct vki_loop_info));
+ break;
+ case VKI_LOOP_SET_STATUS64:
+ POST_MEM_WRITE(ARG3, sizeof(struct vki_loop_info64));
+ break;
+ case VKI_LOOP_GET_STATUS64:
+ POST_MEM_WRITE(ARG3, sizeof(struct vki_loop_info64));
+ break;
+
+
/* Block devices */
case VKI_BLKROSET:
break;
#define VKI_PPGETFLAGS _VKI_IOR(VKI_PP_IOCTL, 0x9a, int)
#define VKI_PPSETFLAGS _VKI_IOW(VKI_PP_IOCTL, 0x9b, int)
+//----------------------------------------------------------------------
+// From linux-5.2.5/include/uapi/linux/loop.h
+//----------------------------------------------------------------------
+
+#define VKI_LO_NAME_SIZE 64
+#define VKI_LO_KEY_SIZE 32
+
+struct vki_loop_info {
+
+ int lo_number; /* ioctl r/o */
+ unsigned short lo_device; /* ioctl r/o */
+ unsigned long lo_inode; /* ioctl r/o */
+ unsigned short lo_rdevice; /* ioctl r/o */
+ int lo_offset;
+ int lo_encrypt_type;
+ int lo_encrypt_key_size; /* ioctl w/o */
+ int lo_flags; /* ioctl r/o */
+ char lo_name[VKI_LO_NAME_SIZE];
+ unsigned char lo_encrypt_key[VKI_LO_KEY_SIZE];/* ioctl w/o */
+ unsigned long lo_init[2];
+ char reserved[4];
+};
+
+struct vki_loop_info64 {
+ __vki_u64 lo_device; /* ioctl r/o */
+ __vki_u64 lo_inode; /* ioctl r/o */
+ __vki_u64 lo_rdevice; /* ioctl r/o */
+ __vki_u64 lo_offset;
+ __vki_u64 lo_sizelimit;/* bytes, 0 == max available */
+ __vki_u32 lo_number; /* ioctl r/o */
+ __vki_u32 lo_encrypt_type;
+ __vki_u32 lo_encrypt_key_size; /* ioctl w/o */
+ __vki_u32 lo_flags; /* ioctl r/o */
+ __vki_u8 lo_file_name[VKI_LO_NAME_SIZE];
+ __vki_u8 lo_crypt_name[VKI_LO_NAME_SIZE];
+ __vki_u8 lo_encrypt_key[VKI_LO_KEY_SIZE]; /* ioctl w/o */
+ __vki_u64 lo_init[2];
+};
+
+/* loopback device related, e.g. see losetup program options */
+#define VKI_LOOP_SET_FD 0x4C00
+#define VKI_LOOP_CLR_FD 0x4C01
+#define VKI_LOOP_SET_STATUS 0x4C02
+#define VKI_LOOP_GET_STATUS 0x4C03
+#define VKI_LOOP_SET_STATUS64 0x4C04
+#define VKI_LOOP_GET_STATUS64 0x4C05
+#define VKI_LOOP_CHANGE_FD 0x4C06
+#define VKI_LOOP_SET_CAPACITY 0x4C07
+#define VKI_LOOP_SET_DIRECT_IO 0x4C08
+#define VKI_LOOP_SET_BLOCK_SIZE 0x4C09
+
+/* ioctls for loop-control device interface */
+#define VKI_LOOP_CTL_ADD 0x4C80 // adds a new loopback device
+#define VKI_LOOP_CTL_REMOVE 0x4C81 // deletes an existing loopback device
+#define VKI_LOOP_CTL_GET_FREE 0x4C82 // finds a free/available loopback device
+
//----------------------------------------------------------------------
// From linux-5.2.5/include/uapi/linux/fs.h
//----------------------------------------------------------------------