From: Carlos Llamas <cmllamas@google.com>
To: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Arve Hjønnevåg" <arve@android.com>,
"Todd Kjos" <tkjos@android.com>,
"Martijn Coenen" <maco@android.com>,
"Christian Brauner" <brauner@kernel.org>,
"Suren Baghdasaryan" <surenb@google.com>
Cc: Joel Fernandes <joel@joelfernandes.org>,
Hridya Valsaraju <hridya@google.com>,
kernel-team@android.com, linux-kernel@vger.kernel.org,
Shuah Khan <shuah@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
Li Li <dualli@google.com>, Masahiro Yamada <masahiroy@kernel.org>,
Carlos Llamas <cmllamas@google.com>,
linux-kselftest@vger.kernel.org
Subject: [PATCH v2 3/5] binderfs: add extended_error feature entry
Date: Fri, 29 Apr 2022 23:56:42 +0000 [thread overview]
Message-ID: <20220429235644.697372-4-cmllamas@google.com> (raw)
In-Reply-To: <20220429235644.697372-1-cmllamas@google.com>
Add extended_error to the binderfs feature list, to help userspace
determine whether the BINDER_GET_EXTENDED_ERROR ioctl is supported by
the binder driver.
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 e3605cdd4335..6c5e94f6cb3a 100644
--- a/drivers/android/binderfs.c
+++ b/drivers/android/binderfs.c
@@ -60,6 +60,7 @@ enum binderfs_stats_mode {
struct binder_features {
bool oneway_spam_detection;
+ bool extended_error;
};
static const struct constant_table binderfs_param_stats[] = {
@@ -75,6 +76,7 @@ static const struct fs_parameter_spec binderfs_fs_parameters[] = {
static struct binder_features binder_features = {
.oneway_spam_detection = true,
+ .extended_error = true,
};
static inline struct binderfs_info *BINDERFS_SB(const struct super_block *sb)
@@ -615,6 +617,12 @@ static int init_binder_features(struct super_block *sb)
if (IS_ERR(dentry))
return PTR_ERR(dentry);
+ dentry = binderfs_create_file(dir, "extended_error",
+ &binder_features_fops,
+ &binder_features.extended_error);
+ 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 0315955ff0f4..9409bb136d95 100644
--- a/tools/testing/selftests/filesystems/binderfs/binderfs_test.c
+++ b/tools/testing/selftests/filesystems/binderfs/binderfs_test.c
@@ -64,6 +64,7 @@ static int __do_binderfs_test(struct __test_metadata *_metadata)
device_path[sizeof(P_tmpdir "/binderfs_XXXXXX/") + BINDERFS_MAX_NAME];
static const char * const binder_features[] = {
"oneway_spam_detection",
+ "extended_error",
};
change_mountns(_metadata);
--
2.36.0.464.gb9c8b46e94-goog
next prev parent reply other threads:[~2022-04-29 23:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-29 23:56 [PATCH v2 0/5] binder: extended error and logging enhancements Carlos Llamas
2022-04-29 23:56 ` [PATCH v2 1/5] binder: add failed transaction logging info Carlos Llamas
2022-05-02 15:25 ` Todd Kjos
2022-05-09 10:06 ` Christian Brauner
2022-04-29 23:56 ` [PATCH v2 2/5] binder: add BINDER_GET_EXTENDED_ERROR ioctl Carlos Llamas
2022-05-02 15:27 ` Todd Kjos
2022-05-09 10:13 ` Christian Brauner
2022-04-29 23:56 ` Carlos Llamas [this message]
2022-05-06 22:05 ` [PATCH v2 3/5] binderfs: add extended_error feature entry Todd Kjos
2022-05-09 10:03 ` Christian Brauner
2022-04-29 23:56 ` [PATCH v2 4/5] binder: convert logging macros into functions Carlos Llamas
2022-05-02 15:28 ` Todd Kjos
2022-05-09 10:04 ` Christian Brauner
2022-04-29 23:56 ` [PATCH v2 5/5] binder: additional transaction error logs Carlos Llamas
2022-05-02 15:29 ` Todd Kjos
2022-05-09 10:06 ` Christian Brauner
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=20220429235644.697372-4-cmllamas@google.com \
--to=cmllamas@google.com \
--cc=arnd@arndb.de \
--cc=arve@android.com \
--cc=brauner@kernel.org \
--cc=dualli@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=hridya@google.com \
--cc=joel@joelfernandes.org \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=maco@android.com \
--cc=masahiroy@kernel.org \
--cc=shuah@kernel.org \
--cc=surenb@google.com \
--cc=tkjos@android.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®