github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/linux/dev_udmabuf.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/fcntl.h> 5 include <uapi/linux/udmabuf.h> 6 include <uapi/linux/dma-buf.h> 7 8 resource fd_udambuf[fd] 9 resource fd_dma_buf[fd] 10 11 openat$udambuf(fd const[AT_FDCWD], file ptr[in, string["/dev/udmabuf"]], flags const[O_RDWR]) fd_udambuf 12 ioctl$UDMABUF_CREATE(fd fd_udambuf, cmd const[UDMABUF_CREATE], arg ptr[in, udmabuf_create]) fd_dma_buf 13 ioctl$UDMABUF_CREATE_LIST(fd fd_udambuf, cmd const[UDMABUF_CREATE_LIST], arg ptr[in, udmabuf_create_list]) fd_dma_buf 14 15 ioctl$DMA_BUF_IOCTL_SYNC(fd fd_dma_buf, cmd const[DMA_BUF_IOCTL_SYNC], arg ptr[in, flags[dma_buf_sync_flags, int64]]) 16 ioctl$DMA_BUF_SET_NAME_A(fd fd_dma_buf, cmd const[DMA_BUF_SET_NAME_A], arg ptr[in, string]) 17 18 udmabuf_create { 19 memfd fd_memfd 20 flags bool32 21 offset flags[udmabuf_offset_size, int64] 22 size flags[udmabuf_offset_size, int64] 23 } 24 25 udmabuf_create_list { 26 flags bool32 27 count len[list, int32] 28 list array[udmabuf_create_item] 29 } 30 31 udmabuf_create_item { 32 memfd fd_memfd 33 __pad const[0, int32] 34 offset flags[udmabuf_offset_size, int64] 35 size flags[udmabuf_offset_size, int64] 36 } 37 38 udmabuf_offset_size = 0, 0x1000, 0x2000, 0x4000, 0x8000, 0x10000, 0x1000000, 0x100000000, 0xfffff000, 0x1000000000000, 0xfffffffffffff000, 0xfffffffff0000000 39 dma_buf_sync_flags = DMA_BUF_SYNC_READ, DMA_BUF_SYNC_WRITE, DMA_BUF_SYNC_START, DMA_BUF_SYNC_END