summaryrefslogtreecommitdiff
path: root/drivers/android
diff options
context:
space:
mode:
authorLi Li <dualli@google.com>2025-07-27 18:29:07 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-08-19 12:53:01 +0200
commitf37b55ded8ed35424ebb91a4d012527071e1f601 (patch)
tree3bc5046db926086f6bf97d89f2fdaddd6cda5131 /drivers/android
parent63740349eba78f242bcbf60d5244d7f2b2600853 (diff)
downloadlinux-f37b55ded8ed35424ebb91a4d012527071e1f601.tar.gz
linux-f37b55ded8ed35424ebb91a4d012527071e1f601.tar.bz2
linux-f37b55ded8ed35424ebb91a4d012527071e1f601.zip
binder: add transaction_report feature entry
Add "transaction_report" to the binderfs feature list, to help userspace determine if the "BINDER_CMD_REPORT" generic netlink api is supported by the binder driver. Signed-off-by: Li Li <dualli@google.com> Signed-off-by: Carlos Llamas <cmllamas@google.com> Link: https://lore.kernel.org/r/20250727182932.2499194-5-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/android')
-rw-r--r--drivers/android/binderfs.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/android/binderfs.c b/drivers/android/binderfs.c
index 0d9d95a7fb60..be8e64eb39ec 100644
--- a/drivers/android/binderfs.c
+++ b/drivers/android/binderfs.c
@@ -59,6 +59,7 @@ struct binder_features {
bool oneway_spam_detection;
bool extended_error;
bool freeze_notification;
+ bool transaction_report;
};
static const struct constant_table binderfs_param_stats[] = {
@@ -76,6 +77,7 @@ static struct binder_features binder_features = {
.oneway_spam_detection = true,
.extended_error = true,
.freeze_notification = true,
+ .transaction_report = true,
};
static inline struct binderfs_info *BINDERFS_SB(const struct super_block *sb)
@@ -601,6 +603,12 @@ static int init_binder_features(struct super_block *sb)
if (IS_ERR(dentry))
return PTR_ERR(dentry);
+ dentry = binderfs_create_file(dir, "transaction_report",
+ &binder_features_fops,
+ &binder_features.transaction_report);
+ if (IS_ERR(dentry))
+ return PTR_ERR(dentry);
+
return 0;
}