From 551fb3f0cdc7f2b2baa1221b06c2c21f6dd95797 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 21 Oct 2021 10:30:21 +0200 Subject: sys/linux: add new binder ioctl's Add descriptions of the new BINDER_FREEZE, BINDER_GET_FROZEN_INFO and BINDER_ENABLE_ONEWAY_SPAM_DETECTION. See: https://elixir.bootlin.com/linux/v5.15-rc6/source/include/uapi/linux/android/binder.h#L249 --- sys/linux/dev_binder.txt | 17 ++++++++++++++++- sys/linux/dev_binder.txt.const | 4 ++++ 2 files changed, 20 insertions(+), 1 deletion(-) (limited to 'sys/linux') diff --git a/sys/linux/dev_binder.txt b/sys/linux/dev_binder.txt index afd595fcf..b7b50f655 100644 --- a/sys/linux/dev_binder.txt +++ b/sys/linux/dev_binder.txt @@ -33,6 +33,9 @@ ioctl$BINDER_THREAD_EXIT(fd fd_binder, cmd const[BINDER_THREAD_EXIT], arg const[ ioctl$BINDER_GET_NODE_DEBUG_INFO(fd fd_binder, cmd const[BINDER_GET_NODE_DEBUG_INFO], arg ptr[inout, binder_node_debug_info]) ioctl$BINDER_WRITE_READ(fd fd_binder, cmd const[BINDER_WRITE_READ], arg ptr[in, binder_write_read]) ioctl$BINDER_GET_NODE_INFO_FOR_REF(fd fd_binder, cmd const[BINDER_GET_NODE_INFO_FOR_REF], arg ptr[in, binder_node_info_for_ref]) +ioctl$BINDER_FREEZE(fd fd_binder, cmd const[BINDER_FREEZE], arg ptr[in, binder_freeze_info]) +ioctl$BINDER_GET_FROZEN_INFO(fd fd_binder, cmd const[BINDER_GET_FROZEN_INFO], arg ptr[in, binder_frozen_status_info]) +ioctl$BINDER_ENABLE_ONEWAY_SPAM_DETECTION(fd fd_binder, cmd const[BINDER_ENABLE_ONEWAY_SPAM_DETECTION], arg ptr[in, bool32]) openat$binder_debug(fd const[AT_FDCWD], file ptr[in, string[binder_debug_file]], flags const[O_RDONLY], mode const[0]) fd @@ -41,6 +44,18 @@ binder_debug_file = "/sys/kernel/debug/binder/failed_transaction_log", "/sys/ker binder_open_flags = O_RDWR, O_NONBLOCK _ = __NR_mmap2 +binder_freeze_info { + pid pid + enable bool32 + timeout_ms int32 +} + +binder_frozen_status_info { + pid pid + sync_recv int32 (out) + async_recv int32 (out) +} + binder_node_debug_info { ptr binder_node cookie const[0, int64] @@ -138,7 +153,7 @@ binder_offsets { off2 offsetof[binder_transaction_data:buffer:obj2, int64] } -binder_transaction_flags = TF_ONE_WAY, TF_ACCEPT_FDS +binder_transaction_flags = TF_ONE_WAY, TF_ACCEPT_FDS, TF_CLEAR_BUF binder_object [ flat flat_binder_object diff --git a/sys/linux/dev_binder.txt.const b/sys/linux/dev_binder.txt.const index 9fa6730b0..1f3e9198a 100644 --- a/sys/linux/dev_binder.txt.const +++ b/sys/linux/dev_binder.txt.const @@ -18,6 +18,9 @@ BC_REPLY_SG = 1078485778, mips64le:ppc64le:2152227602 BC_REQUEST_DEATH_NOTIFICATION = 1074553614, mips64le:ppc64le:2148295438 BC_TRANSACTION = 1077961472, mips64le:ppc64le:2151703296 BC_TRANSACTION_SG = 1078485777, mips64le:ppc64le:2152227601 +BINDER_ENABLE_ONEWAY_SPAM_DETECTION = 1074029072, mips64le:ppc64le:2147770896 +BINDER_FREEZE = 1074553358, mips64le:ppc64le:2148295182 +BINDER_GET_FROZEN_INFO = 3222037007 BINDER_GET_NODE_DEBUG_INFO = 3222823435 BINDER_GET_NODE_INFO_FOR_REF = 3222823436 BINDER_SET_CONTEXT_MGR = 1074029063, mips64le:ppc64le:2147770887 @@ -40,6 +43,7 @@ O_RDONLY = 0 O_RDWR = 2 PROT_READ = ??? TF_ACCEPT_FDS = 16 +TF_CLEAR_BUF = 32 TF_ONE_WAY = 1 __NR_ioctl = 54, amd64:16, arm64:riscv64:29, mips64le:5015 __NR_mmap = 90, 386:arm:192, amd64:9, arm64:riscv64:222, mips64le:5009 -- cgit mrf-deployment