From: Yu-Ting Tseng <yutingtseng@google.com>
To: cmllamas@google.com, tkjos@google.com, gregkh@linuxfoundation.org
Cc: arve@android.com, maco@android.com, joel@joelfernandes.org,
brauner@kernel.org, surenb@google.com, aliceryhl@google.com,
kernel-team@android.com, linux-kernel@vger.kernel.org,
Yu-Ting Tseng <yutingtseng@google.com>
Subject: [PATCH v6 2/2] binder: frozen notification binder_features flag
Date: Wed, 3 Jul 2024 10:58:46 -0700 [thread overview]
Message-ID: <20240703175843.3639568-6-yutingtseng@google.com> (raw)
In-Reply-To: <CAN5Drs06fbditeSaVLc6i6wEY+A47HHzQmhCS1rzJgacNs1Tjw@mail.gmail.com>
Add a flag to binder_features to indicate that the freeze notification
feature is available.
Signed-off-by: Yu-Ting Tseng <yutingtseng@google.com>
Acked-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 3001d754ac36..ad1fa7abc323 100644
--- a/drivers/android/binderfs.c
+++ b/drivers/android/binderfs.c
@@ -58,6 +58,7 @@ enum binderfs_stats_mode {
struct binder_features {
bool oneway_spam_detection;
bool extended_error;
+ bool freeze_notification;
};
static const struct constant_table binderfs_param_stats[] = {
@@ -74,6 +75,7 @@ static const struct fs_parameter_spec binderfs_fs_parameters[] = {
static struct binder_features binder_features = {
.oneway_spam_detection = true,
.extended_error = true,
+ .freeze_notification = true,
};
static inline struct binderfs_info *BINDERFS_SB(const struct super_block *sb)
@@ -608,6 +610,12 @@ static int init_binder_features(struct super_block *sb)
if (IS_ERR(dentry))
return PTR_ERR(dentry);
+ dentry = binderfs_create_file(dir, "freeze_notification",
+ &binder_features_fops,
+ &binder_features.freeze_notification);
+ 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 5f362c0fd890..319567f0fae1 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)
static const char * const binder_features[] = {
"oneway_spam_detection",
"extended_error",
+ "freeze_notification",
};
change_mountns(_metadata);
--
2.45.2.803.g4e1b14247a-goog
next prev parent reply other threads:[~2024-07-03 17:59 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240618221347.106627-1-yutingtseng@google.com>
2024-06-22 3:16 ` [PATCH v2] binder: frozen notification Yu-Ting Tseng
2024-06-22 3:16 ` Yu-Ting Tseng
2024-06-24 14:24 ` Alice Ryhl
2024-06-24 15:50 ` Yu-Ting Tseng
2024-06-24 15:53 ` Carlos Llamas
2024-06-24 15:56 ` Yu-Ting Tseng
2024-06-24 17:20 ` [PATCH v3] " Yu-Ting Tseng
2024-06-25 3:01 ` Yu-Ting Tseng
2024-06-24 17:20 ` [PATCH v3 1/1] " Yu-Ting Tseng
2024-06-28 18:42 ` Carlos Llamas
2024-07-01 18:23 ` [PATCH v4] " Yu-Ting Tseng
2024-07-01 18:27 ` Yu-Ting Tseng
2024-07-03 4:18 ` Carlos Llamas
2024-07-03 17:08 ` [PATCH v5] " Yu-Ting Tseng
2024-07-03 17:08 ` Yu-Ting Tseng
2024-07-03 17:58 ` [PATCH v6 0/2] " Yu-Ting Tseng
2024-07-04 13:00 ` Greg KH
2024-07-03 17:58 ` [PATCH v6 1/2] " Yu-Ting Tseng
2024-07-03 17:58 ` Yu-Ting Tseng [this message]
2024-06-24 15:10 ` [PATCH v2] " 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=20240703175843.3639568-6-yutingtseng@google.com \
--to=yutingtseng@google.com \
--cc=aliceryhl@google.com \
--cc=arve@android.com \
--cc=brauner@kernel.org \
--cc=cmllamas@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=joel@joelfernandes.org \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maco@android.com \
--cc=surenb@google.com \
--cc=tkjos@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®