diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2017-04-25 13:49:39 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-04-25 13:49:39 +0200 |
| commit | 55ef0dc17c4d8ff85f4003b88058e5d3bec491dc (patch) | |
| tree | 08ed695e5dc634408dc2a2ac400c0f294580823b | |
| parent | 127bd023f92643406238b2ae94a48a6d787b9421 (diff) | |
| parent | 9f61ef2680a4bc660f4d7e22f9df000677a195b1 (diff) | |
Merge pull request #167 from billy-lau/ioctls/add-new-desc
sys: add syscall description for /dev/ion.
| -rwxr-xr-x | extract.sh | 2 | ||||
| -rw-r--r-- | sys/ion.txt | 47 | ||||
| -rw-r--r-- | sys/ion_amd64.const | 9 | ||||
| -rw-r--r-- | sys/ion_arm64.const | 9 | ||||
| -rw-r--r-- | sys/sys.txt | 1 |
5 files changed, 66 insertions, 2 deletions
diff --git a/extract.sh b/extract.sh index f8d801494..4d66a25dc 100755 --- a/extract.sh +++ b/extract.sh @@ -30,7 +30,7 @@ UPSTREAM_FILES="sys/bpf.txt sys/dri.txt sys/fuse.txt sys/input.txt sys/ipc.txt sys/socket_netrom.txt sys/socket_nfc.txt sys/socket_unix.txt sys/socket_ipx.txt sys/socket_ax25.txt" -ANDROID_FILES="sys/tlk_device.txt" +ANDROID_FILES="sys/tlk_device.txt sys/ion.txt" if [ "$BUILD_FOR_ANDROID" == "no" ]; then FILES="$UPSTREAM_FILES" diff --git a/sys/ion.txt b/sys/ion.txt new file mode 100644 index 000000000..d84adab74 --- /dev/null +++ b/sys/ion.txt @@ -0,0 +1,47 @@ +# Copyright 2016 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. +# billylau@ + +# Description of ioctl calls for /dev/ion, which is based off of 3.18 kernel. +# TODO: ION_IOC_HEAP_QUERY is detected for 4.10 upstream, but not covered in this description. + +include <asm/ioctl.h> +include <../drivers/staging/android/uapi/ion.h> + +resource fd_ion[fd] +resource fd_ion_generic[fd] + +resource ion_handle[int32] + + +openat$ion(fd const[AT_FDCWD], file ptr[in, string["/dev/ion"]], flags flags[open_flags], mode const[0]) fd_ion +ioctl$ION_IOC_ALLOC(fd fd_ion, cmd const[ION_IOC_ALLOC], arg ptr[inout, ion_allocation_data]) +ioctl$ION_IOC_FREE(fd fd_ion, cmd const[ION_IOC_FREE], arg ptr[in, ion_handle_data]) +ioctl$ION_IOC_MAP(fd fd_ion, cmd const[ION_IOC_MAP], arg ptr[inout, ion_fd_data]) +ioctl$ION_IOC_SHARE(fd fd_ion, cmd const[ION_IOC_SHARE], arg ptr[inout, ion_fd_data]) +ioctl$ION_IOC_IMPORT(fd fd_ion, cmd const[ION_IOC_IMPORT], arg ptr[inout, ion_fd_data]) +ioctl$ION_IOC_SYNC(fd fd_ion, cmd const[ION_IOC_SYNC], arg ptr[inout, ion_fd_data]) +ioctl$ION_IOC_CUSTOM(fd fd_ion, cmd const[ION_IOC_CUSTOM], arg ptr[inout, ion_custom_data]) + +ion_allocation_data { + len intptr + align intptr + heapid int32 + flags int32 + handle ion_handle +} + +ion_handle_data { + handle ion_handle +} + +ion_fd_data { + handle ion_handle + fd fd_ion_generic +} + +ion_custom_data { + cmd int32 + arg intptr +} + diff --git a/sys/ion_amd64.const b/sys/ion_amd64.const new file mode 100644 index 000000000..411b85f71 --- /dev/null +++ b/sys/ion_amd64.const @@ -0,0 +1,9 @@ +# AUTOGENERATED FILE +ION_IOC_ALLOC = 3223341312 +ION_IOC_CUSTOM = 3222292742 +ION_IOC_FREE = 3221506305 +ION_IOC_IMPORT = 3221768453 +ION_IOC_MAP = 3221768450 +ION_IOC_SHARE = 3221768452 +ION_IOC_SYNC = 3221768455 +__NR_ioctl = 16 diff --git a/sys/ion_arm64.const b/sys/ion_arm64.const new file mode 100644 index 000000000..618cc40b2 --- /dev/null +++ b/sys/ion_arm64.const @@ -0,0 +1,9 @@ +# AUTOGENERATED FILE +ION_IOC_ALLOC = 3223341312 +ION_IOC_CUSTOM = 3222292742 +ION_IOC_FREE = 3221506305 +ION_IOC_IMPORT = 3221768453 +ION_IOC_MAP = 3221768450 +ION_IOC_SHARE = 3221768452 +ION_IOC_SYNC = 3221768455 +__NR_ioctl = 29 diff --git a/sys/sys.txt b/sys/sys.txt index ca0bfef0b..876ce0a3e 100644 --- a/sys/sys.txt +++ b/sys/sys.txt @@ -491,7 +491,6 @@ openat$cuse(fd const[AT_FDCWD], file ptr[in, string["/dev/cuse"]], flags flags[o openat$capi20(fd const[AT_FDCWD], file ptr[in, string["/dev/capi20"]], flags flags[open_flags], mode const[0]) fd openat$autofs(fd const[AT_FDCWD], file ptr[in, string["/dev/autofs"]], flags flags[open_flags], mode const[0]) fd openat$binder(fd const[AT_FDCWD], file ptr[in, string["/dev/binder"]], flags flags[open_flags], mode const[0]) fd -openat$ion(fd const[AT_FDCWD], file ptr[in, string["/dev/ion"]], flags flags[open_flags], mode const[0]) fd openat$keychord(fd const[AT_FDCWD], file ptr[in, string["/dev/keychord"]], flags flags[open_flags], mode const[0]) fd openat$zygote(fd const[AT_FDCWD], file ptr[in, string["/dev/socket/zygote"]], flags flags[open_flags], mode const[0]) fd openat$sw_sync(fd const[AT_FDCWD], file ptr[in, string["/dev/sw_sync"]], flags flags[open_flags], mode const[0]) fd |
