aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux
diff options
context:
space:
mode:
authorHrutvik Kanabar <hrutvik@google.com>2022-08-25 09:38:34 +0000
committerAleksandr Nogikh <wp32pw@gmail.com>2022-08-29 15:51:31 +0200
commit727ac763d13e356f3721f6d2078ef37be8954dad (patch)
tree18e7888fd90a6f04cd016fef4525ac030ff0e54e /sys/linux
parent363c3551126ea6554d0020736dbf0d407843d22f (diff)
sys/linux: add `dma-heap` syscall
Update google#533. See https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/dma-heap.h.
Diffstat (limited to 'sys/linux')
-rw-r--r--sys/linux/dev_dma_heap.txt21
-rw-r--r--sys/linux/dev_dma_heap.txt.const10
2 files changed, 31 insertions, 0 deletions
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 <asm/ioctl.h>
+include <uapi/linux/fcntl.h>
+include <uapi/linux/dma-heap.h>
+
+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