[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZoTSuNwhcOOeaabW@google.com>
Date: Wed, 3 Jul 2024 04:25:28 +0000
From: Carlos Llamas <cmllamas@...gle.com>
To: Yu-Ting Tseng <yutingtseng@...gle.com>
Cc: tkjos@...gle.com, gregkh@...uxfoundation.org, arve@...roid.com,
maco@...roid.com, joel@...lfernandes.org, brauner@...nel.org,
surenb@...gle.com, aliceryhl@...gle.com, kernel-team@...roid.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] binder: frozen notification binder_features flag
On Tue, Jul 02, 2024 at 04:04:54PM -0700, Yu-Ting Tseng wrote:
> Add a flag to binder_features to indicate that the freeze notification
> feature is available.
> ---
> 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
>
This looks good to me. However it should be sent along with your other
freeze notification patch (the two patches in a single patchset). Feel
free to add this for the next version:
Acked-by: Carlos Llamas <cmllamas@...gle.com>
Thanks,
Carlos Llamas
Powered by blists - more mailing lists