aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux/dev_ashmem.txt
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2022-06-02 08:51:57 +0200
committerDmitry Vyukov <dvyukov@google.com>2022-06-02 11:48:31 +0200
commitff1f215e653ff17702cc30338944a018bf976486 (patch)
tree6f9e875e9fc137f4f45c2d4454ca26c62c181d5f /sys/linux/dev_ashmem.txt
parent5783034f220fa03dd9407034a4804be5890c3377 (diff)
Revert "sys/linux: remove ashmem"
This reverts commit 7d6ce61334a1437f59d058959ef93071446706f8. Ashmem is removed upstream, but it's still present in LTS 5.4/10 kernels. Add "meta noextract" to the file instead to prevent extract errors.
Diffstat (limited to 'sys/linux/dev_ashmem.txt')
-rw-r--r--sys/linux/dev_ashmem.txt30
1 files changed, 30 insertions, 0 deletions
diff --git a/sys/linux/dev_ashmem.txt b/sys/linux/dev_ashmem.txt
new file mode 100644
index 000000000..5e28b9cbb
--- /dev/null
+++ b/sys/linux/dev_ashmem.txt
@@ -0,0 +1,30 @@
+# Copyright 2017 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.
+
+# Ashmem was removed in v5.18:
+# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=721412ed3d819e767cac2b06646bf03aa158aaec
+# but still present in LTS 5.4/10 kernels which we want to support for some time.
+# Extract now fails due to missing headers.
+meta noextract
+
+include <asm/ioctl.h>
+include <uapi/linux/fcntl.h>
+include <drivers/staging/android/uapi/ashmem.h>
+
+resource fd_ashmem[fd]
+
+openat$ashmem(fd const[AT_FDCWD], file ptr[in, string["/dev/ashmem"]], flags flags[open_flags], mode const[0]) fd_ashmem
+
+ioctl$ASHMEM_SET_NAME(fd fd_ashmem, cmd const[ASHMEM_SET_NAME], arg ptr[in, string])
+ioctl$ASHMEM_GET_NAME(fd fd_ashmem, cmd const[ASHMEM_GET_NAME], arg ptr[out, array[int8]])
+ioctl$ASHMEM_SET_SIZE(fd fd_ashmem, cmd const[ASHMEM_SET_SIZE], arg intptr)
+ioctl$ASHMEM_GET_SIZE(fd fd_ashmem, cmd const[ASHMEM_GET_SIZE], arg const[0])
+ioctl$ASHMEM_SET_PROT_MASK(fd fd_ashmem, cmd const[ASHMEM_SET_PROT_MASK], arg ptr[in, ashmem_pin])
+ioctl$ASHMEM_GET_PROT_MASK(fd fd_ashmem, cmd const[ASHMEM_GET_PROT_MASK], arg ptr[out, ashmem_pin])
+ioctl$ASHMEM_GET_PIN_STATUS(fd fd_ashmem, cmd const[ASHMEM_GET_PIN_STATUS], arg const[0])
+ioctl$ASHMEM_PURGE_ALL_CACHES(fd fd_ashmem, cmd const[ASHMEM_PURGE_ALL_CACHES], arg const[0])
+
+ashmem_pin {
+ offset int32
+ len int32
+}