Files
ack-tegra/include/uapi/linux/android/binder_netlink.h
Li Li 2e05770b48 BACKPORT: FROMGIT: binder: introduce transaction reports via netlink
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.

Signed-off-by: Li Li <dualli@google.com>
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Link: https://lore.kernel.org/r/20250727182932.2499194-4-cmllamas@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 372832477
(cherry picked from commit 63740349eba78f242bcbf60d5244d7f2b2600853
 git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git char-misc-next)
[cmllamas: fix missing t->is_reply, fix ABI header include issue]
Change-Id: I7013f9bba450f7ab3331dd850314a7b62af58818
Signed-off-by: Carlos Llamas <cmllamas@google.com>
2025-08-27 13:00:40 -07:00

38 lines
896 B
C

/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
/* Do not edit directly, auto-generated from: */
/* Documentation/netlink/specs/binder.yaml */
/* YNL-GEN uapi header */
#ifndef _UAPI_LINUX_ANDROID_BINDER_NETLINK_H
#define _UAPI_LINUX_ANDROID_BINDER_NETLINK_H
#define BINDER_FAMILY_NAME "binder"
#define BINDER_FAMILY_VERSION 1
enum {
BINDER_A_REPORT_ERROR = 1,
BINDER_A_REPORT_CONTEXT,
BINDER_A_REPORT_FROM_PID,
BINDER_A_REPORT_FROM_TID,
BINDER_A_REPORT_TO_PID,
BINDER_A_REPORT_TO_TID,
BINDER_A_REPORT_IS_REPLY,
BINDER_A_REPORT_FLAGS,
BINDER_A_REPORT_CODE,
BINDER_A_REPORT_DATA_SIZE,
__BINDER_A_REPORT_MAX,
BINDER_A_REPORT_MAX = (__BINDER_A_REPORT_MAX - 1)
};
enum {
BINDER_CMD_REPORT = 1,
__BINDER_CMD_MAX,
BINDER_CMD_MAX = (__BINDER_CMD_MAX - 1)
};
#define BINDER_MCGRP_REPORT "report"
#endif /* _UAPI_LINUX_ANDROID_BINDER_NETLINK_H */