FROMGIT: 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> Bug: 372832477 (cherry picked from commit f37b55ded8ed35424ebb91a4d012527071e1f601 git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git char-misc-next) Change-Id: I0793b68e6f96283d47e3d44dcc68f248495dbcb3 Signed-off-by: Carlos Llamas <cmllamas@google.com>
This commit is contained in:
@@ -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)
|
||||
@@ -616,6 +618,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;
|
||||
}
|
||||
|
||||
|
||||
@@ -66,6 +66,7 @@ static int __do_binderfs_test(struct __test_metadata *_metadata)
|
||||
"oneway_spam_detection",
|
||||
"extended_error",
|
||||
"freeze_notification",
|
||||
"transaction_report",
|
||||
};
|
||||
|
||||
change_mountns(_metadata);
|
||||
|
||||
Reference in New Issue
Block a user