From: Carlos Llamas <cmllamas@google.com>
To: "Alice Ryhl" <aliceryhl@google.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Arve Hjønnevåg" <arve@android.com>,
"Todd Kjos" <tkjos@android.com>,
"Martijn Coenen" <maco@android.com>,
"Joel Fernandes" <joelagnelf@nvidia.com>,
"Christian Brauner" <brauner@kernel.org>,
"Carlos Llamas" <cmllamas@google.com>,
"Suren Baghdasaryan" <surenb@google.com>,
"Shuah Khan" <shuah@kernel.org>,
"Yu-Ting Tseng" <yutingtseng@google.com>,
"Li Li" <dualli@google.com>,
"Ba Jing" <bajing@cmss.chinamobile.com>
Cc: "Tiffany Yang" <ynaffit@google.com>,
"John Stultz" <jstultz@google.com>,
"Shai Barack" <shayba@google.com>,
"Thiébaud Weksteen" <tweek@google.com>,
kernel-team@android.com, linux-kernel@vger.kernel.org,
"Jakub Kicinski" <kuba@kernel.org>,
"open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@vger.kernel.org>
Subject: [PATCH v19 4/5] binder: add transaction_report feature entry
Date: Fri, 25 Jul 2025 18:37:47 +0000 [thread overview]
Message-ID: <20250725183811.409580-5-cmllamas@google.com> (raw)
In-Reply-To: <20250725183811.409580-1-cmllamas@google.com>
From: Li Li <dualli@google.com>
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>
---
drivers/android/binderfs.c | 8 ++++++++
.../selftests/filesystems/binderfs/binderfs_test.c | 1 +
2 files changed, 9 insertions(+)
diff --git a/drivers/android/binderfs.c b/drivers/android/binderfs.c
index 4f827152d18e..f74a7e380261 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)
@@ -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;
}
diff --git a/tools/testing/selftests/filesystems/binderfs/binderfs_test.c b/tools/testing/selftests/filesystems/binderfs/binderfs_test.c
index 81db85a5cc16..39a68078a79b 100644
--- a/tools/testing/selftests/filesystems/binderfs/binderfs_test.c
+++ b/tools/testing/selftests/filesystems/binderfs/binderfs_test.c
@@ -65,6 +65,7 @@ static int __do_binderfs_test(struct __test_metadata *_metadata)
"oneway_spam_detection",
"extended_error",
"freeze_notification",
+ "transaction_report",
};
change_mountns(_metadata);
--
2.50.1.470.g6ba607880d-goog
next prev parent reply other threads:[~2025-07-25 18:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-25 18:37 [PATCH v19 0/5] binder: introduce transaction reports via netlink Carlos Llamas
2025-07-25 18:37 ` [PATCH v19 1/5] binder: pre-allocate binder_transaction Carlos Llamas
2025-07-25 18:37 ` [PATCH v19 2/5] binder: add t->is_async and t->is_reply Carlos Llamas
2025-07-25 18:37 ` [PATCH v19 3/5] binder: introduce transaction reports via netlink Carlos Llamas
2025-07-27 18:18 ` Carlos Llamas
2025-07-25 18:37 ` Carlos Llamas [this message]
2025-07-25 18:37 ` [PATCH v19 5/5] binder: add tracepoint for netlink reports Carlos Llamas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250725183811.409580-5-cmllamas@google.com \
--to=cmllamas@google.com \
--cc=aliceryhl@google.com \
--cc=arve@android.com \
--cc=bajing@cmss.chinamobile.com \
--cc=brauner@kernel.org \
--cc=dualli@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=joelagnelf@nvidia.com \
--cc=jstultz@google.com \
--cc=kernel-team@android.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=maco@android.com \
--cc=shayba@google.com \
--cc=shuah@kernel.org \
--cc=surenb@google.com \
--cc=tkjos@android.com \
--cc=tweek@google.com \
--cc=ynaffit@google.com \
--cc=yutingtseng@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®