github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/linux/dev_sw_sync.txt (about) 1 # Copyright 2022 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/sync_file.h> 5 include <uapi/asm/ioctl.h> 6 include <uapi/linux/fcntl.h> 7 8 resource fd_sync_file[fd] 9 resource fd_sw_sync[fd] 10 11 openat$sw_sync_info(fd const[AT_FDCWD], file ptr[in, string["/sys/kernel/debug/sync/info"]], flags flags[open_flags], mode const[0]) fd 12 openat$sw_sync(fd const[AT_FDCWD], file ptr[in, string["/sys/kernel/debug/sync/sw_sync"]], flags flags[open_flags], mode const[0]) fd_sw_sync 13 14 ioctl$SW_SYNC_IOC_CREATE_FENCE(fd fd_sw_sync, cmd const[SW_SYNC_IOC_CREATE_FENCE], arg ptr[inout, sw_sync_create_fence_data]) 15 ioctl$SW_SYNC_IOC_INC(fd fd_sw_sync, cmd const[SW_SYNC_IOC_INC], arg ptr[in, int32]) 16 17 ioctl$SYNC_IOC_MERGE(fd fd_sync_file, cmd const[SYNC_IOC_MERGE], arg ptr[inout, sync_merge_data]) 18 ioctl$SYNC_IOC_FILE_INFO(fd fd_sync_file, cmd const[SYNC_IOC_FILE_INFO], arg ptr[inout, sync_file_info]) 19 20 define SW_SYNC_IOC_CREATE_FENCE _IOWR('W', 0, struct{__u32 value; char name[32]; __s32 fence;}) 21 define SW_SYNC_IOC_INC _IOW('W', 1, __u32) 22 23 sw_sync_create_fence_data { 24 value int32 (in) 25 name array[int8, 32] (in) 26 fence fd_sync_file (out) 27 } 28 29 sync_merge_data { 30 name array[int8, 32] (in) 31 fd2 fd_sync_file (in) 32 fence fd_sync_file (out) 33 flags const[0, int32] 34 pad const[0, int32] 35 } 36 37 sync_file_info { 38 name array[int8, 32] (out) 39 status int32 (out) 40 flags int32 (out) 41 num_fences len[sync_fence_info, int32] (in) 42 pad const[0, int32] 43 sync_fence_info ptr64[out, array[sync_fence_info]] 44 } 45 46 sync_fence_info { 47 name array[int8, 32] 48 driver_name array[int8, 32] 49 status int32 50 flags int32 51 timestamp_ns int64 52 }