Introduce a generic netlink multicast event to report binder transaction failures to userspace. This allows subscribers to monitor these events and take appropriate actions, such as stopping a misbehaving application that is spamming a service with huge amount of transactions. The multicast event contains full details of the failed transactions, including the sender/target PIDs, payload size and specific error code. This interface is defined using a YAML spec, from which the UAPI and kernel headers and source are auto-generated.
Showing the changes to include/uapi/linux/android (1 of 8 files). Show all
Unified · Split
| @@ -0,0 +1,37 @@ | |||
| 1 | /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ | ||
| 2 | /* Do not edit directly, auto-generated from: */ | ||
| 3 | /* Documentation/netlink/specs/binder.yaml */ | ||
| 4 | /* YNL-GEN uapi header */ | ||
| 5 | |||
| 6 | #ifndef _UAPI_LINUX_ANDROID_BINDER_NETLINK_H | ||
| 7 | #define _UAPI_LINUX_ANDROID_BINDER_NETLINK_H | ||
| 8 | |||
| 9 | #define BINDER_FAMILY_NAME "binder" | ||
| 10 | #define BINDER_FAMILY_VERSION 1 | ||
| 11 | |||
| 12 | enum { | ||
| 13 | BINDER_A_REPORT_ERROR = 1, | ||
| 14 | BINDER_A_REPORT_CONTEXT, | ||
| 15 | BINDER_A_REPORT_FROM_PID, | ||
| 16 | BINDER_A_REPORT_FROM_TID, | ||
| 17 | BINDER_A_REPORT_TO_PID, | ||
| 18 | BINDER_A_REPORT_TO_TID, | ||
| 19 | BINDER_A_REPORT_IS_REPLY, | ||
| 20 | BINDER_A_REPORT_FLAGS, | ||
| 21 | BINDER_A_REPORT_CODE, | ||
| 22 | BINDER_A_REPORT_DATA_SIZE, | ||
| 23 | |||
| 24 | __BINDER_A_REPORT_MAX, | ||
| 25 | BINDER_A_REPORT_MAX = (__BINDER_A_REPORT_MAX - 1) | ||
| 26 | }; | ||
| 27 | |||
| 28 | enum { | ||
| 29 | BINDER_CMD_REPORT = 1, | ||
| 30 | |||
| 31 | __BINDER_CMD_MAX, | ||
| 32 | BINDER_CMD_MAX = (__BINDER_CMD_MAX - 1) | ||
| 33 | }; | ||
| 34 | |||
| 35 | #define BINDER_MCGRP_REPORT "report" | ||
| 36 | |||
| 37 | #endif /* _UAPI_LINUX_ANDROID_BINDER_NETLINK_H */ | ||