From: Li Li <dualli@chromium.org>
To: dualli@google.com, corbet@lwn.net, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
donald.hunter@gmail.com, gregkh@linuxfoundation.org,
arve@android.com, tkjos@android.com, maco@android.com,
joel@joelfernandes.org, brauner@kernel.org, cmllamas@google.com,
surenb@google.com, omosnace@redhat.com, shuah@kernel.org,
arnd@arndb.de, masahiroy@kernel.org, bagasdotme@gmail.com,
horms@kernel.org, tweek@google.com, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org, netdev@vger.kernel.org,
selinux@vger.kernel.org, hridya@google.com
Cc: smoreland@google.com, ynaffit@google.com, kernel-team@android.com
Subject: [PATCH v16 3/3] binder: generic netlink binder_features flag
Date: Mon, 3 Mar 2025 12:02:12 -0800 [thread overview]
Message-ID: <20250303200212.3294679-4-dualli@chromium.org> (raw)
In-Reply-To: <20250303200212.3294679-1-dualli@chromium.org>
From: Li Li <dualli@google.com>
Add a flag to binder_features to indicate that the generic netlink
feature is available.
Signed-off-by: Li Li <dualli@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 94c6446604fc..b3d21ccd81f2 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 generic_netlink;
};
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,
+ .generic_netlink = true,
};
static inline struct binderfs_info *BINDERFS_SB(const struct super_block *sb)
@@ -619,6 +621,12 @@ static int init_binder_features(struct super_block *sb)
if (IS_ERR(dentry))
return PTR_ERR(dentry);
+ dentry = binderfs_create_file(dir, "generic_netlink",
+ &binder_features_fops,
+ &binder_features.generic_netlink);
+ 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..96e64ebf910f 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",
+ "generic_netlink",
};
change_mountns(_metadata);
--
2.48.1.711.g2feabab25a-goog
next prev parent reply other threads:[~2025-03-03 20:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-03 20:02 [PATCH v16 0/3] binder: report txn errors via generic netlink Li Li
2025-03-03 20:02 ` [PATCH v16 1/3] lsm, selinux: Add setup_report permission to binder Li Li
2025-03-07 21:47 ` Paul Moore
2025-03-11 16:37 ` Li Li
2025-03-03 20:02 ` [PATCH v16 2/3] binder: report txn errors via generic netlink Li Li
2025-03-11 4:12 ` Carlos Llamas
[not found] ` <CANBPYPhR-C3VTv=ZHc1LJ0c7OG8-K2iGS62vXHmg9gcX0y89Cw@mail.gmail.com>
2025-03-12 18:49 ` Fwd: " Li Li
2025-03-12 20:14 ` Carlos Llamas
2025-03-12 20:56 ` Li Li
2025-03-03 20:02 ` Li Li [this message]
2025-03-11 3:37 ` [PATCH v16 3/3] binder: generic netlink binder_features flag 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=20250303200212.3294679-4-dualli@chromium.org \
--to=dualli@chromium.org \
--cc=arnd@arndb.de \
--cc=arve@android.com \
--cc=bagasdotme@gmail.com \
--cc=brauner@kernel.org \
--cc=cmllamas@google.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=dualli@google.com \
--cc=edumazet@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=horms@kernel.org \
--cc=hridya@google.com \
--cc=joel@joelfernandes.org \
--cc=kernel-team@android.com \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maco@android.com \
--cc=masahiroy@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=omosnace@redhat.com \
--cc=pabeni@redhat.com \
--cc=selinux@vger.kernel.org \
--cc=shuah@kernel.org \
--cc=smoreland@google.com \
--cc=surenb@google.com \
--cc=tkjos@android.com \
--cc=tweek@google.com \
--cc=ynaffit@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;
as well as URLs for NNTP newsgroup(s).