From fcff7f26afa9a6a79da34ac2bf9ed83fe90a3d00 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 5 Jan 2022 14:04:49 +0100 Subject: sys/linux: extend udmabuf descriptions The ioctls actually return the dmabuf fd that can be used in other APIs. --- sys/linux/dev_udmabuf.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'sys/linux/dev_udmabuf.txt') diff --git a/sys/linux/dev_udmabuf.txt b/sys/linux/dev_udmabuf.txt index 16c2b4366..a8d21a726 100644 --- a/sys/linux/dev_udmabuf.txt +++ b/sys/linux/dev_udmabuf.txt @@ -1,13 +1,19 @@ # Copyright 2018 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 include +include resource fd_udambuf[fd] +resource fd_dma_buf[fd] openat$udambuf(fd const[AT_FDCWD], file ptr[in, string["/dev/udmabuf"]], flags const[O_RDWR]) fd_udambuf -ioctl$UDMABUF_CREATE(fd fd_udambuf, cmd const[UDMABUF_CREATE], arg ptr[in, udmabuf_create]) -ioctl$UDMABUF_CREATE_LIST(fd fd_udambuf, cmd const[UDMABUF_CREATE_LIST], arg ptr[in, udmabuf_create_list]) +ioctl$UDMABUF_CREATE(fd fd_udambuf, cmd const[UDMABUF_CREATE], arg ptr[in, udmabuf_create]) fd_dma_buf +ioctl$UDMABUF_CREATE_LIST(fd fd_udambuf, cmd const[UDMABUF_CREATE_LIST], arg ptr[in, udmabuf_create_list]) fd_dma_buf + +ioctl$DMA_BUF_IOCTL_SYNC(fd fd_dma_buf, cmd const[DMA_BUF_IOCTL_SYNC], arg ptr[in, flags[dma_buf_sync_flags, int64]]) +ioctl$DMA_BUF_SET_NAME_A(fd fd_dma_buf, cmd const[DMA_BUF_SET_NAME_A], arg ptr[in, string]) udmabuf_create { memfd fd_memfd @@ -29,5 +35,5 @@ udmabuf_create_item { size flags[udmabuf_offset_size, int64] } -# NEED: this should be a page-aligned integer udmabuf_offset_size = 0, 0x1000, 0x2000, 0x4000, 0x8000, 0x10000, 0x1000000, 0x100000000, 0xfffff000, 0x1000000000000, 0xfffffffffffff000, 0xfffffffff0000000 +dma_buf_sync_flags = DMA_BUF_SYNC_READ, DMA_BUF_SYNC_WRITE, DMA_BUF_SYNC_START, DMA_BUF_SYNC_END -- cgit mrf-deployment