From 727ac763d13e356f3721f6d2078ef37be8954dad Mon Sep 17 00:00:00 2001 From: Hrutvik Kanabar Date: Thu, 25 Aug 2022 09:38:34 +0000 Subject: sys/linux: add `dma-heap` syscall Update google#533. See https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/dma-heap.h. --- sys/linux/dev_dma_heap.txt | 21 +++++++++++++++++++++ sys/linux/dev_dma_heap.txt.const | 10 ++++++++++ 2 files changed, 31 insertions(+) create mode 100644 sys/linux/dev_dma_heap.txt create mode 100644 sys/linux/dev_dma_heap.txt.const (limited to 'sys/linux') diff --git a/sys/linux/dev_dma_heap.txt b/sys/linux/dev_dma_heap.txt new file mode 100644 index 000000000..96e2a47be --- /dev/null +++ b/sys/linux/dev_dma_heap.txt @@ -0,0 +1,21 @@ +# Copyright 2022 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_dma_heap[fd] + +openat$dma_heap(fd const[AT_FDCWD], file ptr[in, string["/dev/dma_heap/system"]], flags flags[open_flags], mode const[0]) fd_dma_heap + +ioctl$DMA_HEAP_IOCTL_ALLOC(fd fd_dma_heap, cmd const[DMA_HEAP_IOCTL_ALLOC], arg ptr[inout, dma_heap_allocation_data]) + +dma_open_flags = O_CLOEXEC, O_RDONLY, O_WRONLY, O_RDWR + +dma_heap_allocation_data { + len int64 (in) + fd fd (inout) + fd_flags flags[dma_open_flags, int32] (in) + heap_flags const[0, int64] (in) +} diff --git a/sys/linux/dev_dma_heap.txt.const b/sys/linux/dev_dma_heap.txt.const new file mode 100644 index 000000000..cc37b9e5b --- /dev/null +++ b/sys/linux/dev_dma_heap.txt.const @@ -0,0 +1,10 @@ +# Code generated by syz-sysgen. DO NOT EDIT. +arches = 386, amd64, arm, arm64, mips64le, ppc64le, riscv64, s390x +AT_FDCWD = 18446744073709551516 +DMA_HEAP_IOCTL_ALLOC = 3222816768 +O_CLOEXEC = 524288 +O_RDONLY = 0 +O_RDWR = 2 +O_WRONLY = 1 +__NR_ioctl = 54, amd64:16, arm64:riscv64:29, mips64le:5015 +__NR_openat = 56, 386:295, amd64:257, arm:322, mips64le:5247, ppc64le:286, s390x:288 -- cgit mrf-deployment