* [PATCH] binder: synchronize Rust Binder stats with freeze commands
@ 2026-06-15 17:48 syncrain
2026-06-15 20:05 ` Greg KH
0 siblings, 1 reply; 6+ messages in thread
From: syncrain @ 2026-06-15 17:48 UTC (permalink / raw)
To: gregkh, arve, tkjos, brauner, cmllamas, aliceryhl
Cc: ojeda, rust-for-linux, linux-kernel, syncrain
Rust Binder stats use BC_COUNT and BR_COUNT to size the command and
return counters, and use event string tables when printing debug
statistics.
The Binder protocol includes freeze-related commands and return codes,
but the Rust Binder statistics code was not updated to cover them. As a
result, those commands and return codes are not accounted for or printed
by the stats debug output.
Update the counts and event string tables so these commands and return
codes are included in the debug statistics output.
Signed-off-by: syncrain <iganschel@gmail.com>
---
drivers/android/binder/rust_binder_events.c | 7 ++++++-
drivers/android/binder/stats.rs | 4 ++--
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/android/binder/rust_binder_events.c b/drivers/android/binder/rust_binder_events.c
index 488b1470060c..5792aa59cc82 100644
--- a/drivers/android/binder/rust_binder_events.c
+++ b/drivers/android/binder/rust_binder_events.c
@@ -28,6 +28,9 @@ const char * const binder_command_strings[] = {
"BC_DEAD_BINDER_DONE",
"BC_TRANSACTION_SG",
"BC_REPLY_SG",
+ "BC_REQUEST_FREEZE_NOTIFICATION",
+ "BC_CLEAR_FREEZE_NOTIFICATION",
+ "BC_FREEZE_NOTIFICATION_DONE",
};
const char * const binder_return_strings[] = {
@@ -51,7 +54,9 @@ const char * const binder_return_strings[] = {
"BR_FAILED_REPLY",
"BR_FROZEN_REPLY",
"BR_ONEWAY_SPAM_SUSPECT",
- "BR_TRANSACTION_PENDING_FROZEN"
+ "BR_TRANSACTION_PENDING_FROZEN",
+ "BR_FROZEN_BINDER",
+ "BR_CLEAR_FREEZE_NOTIFICATION_DONE",
};
#define CREATE_TRACE_POINTS
diff --git a/drivers/android/binder/stats.rs b/drivers/android/binder/stats.rs
index ab75e9561cbf..ec81dc7747db 100644
--- a/drivers/android/binder/stats.rs
+++ b/drivers/android/binder/stats.rs
@@ -8,8 +8,8 @@
use kernel::sync::atomic::{ordering::Relaxed, Atomic};
use kernel::{ioctl::_IOC_NR, seq_file::SeqFile, seq_print};
-const BC_COUNT: usize = _IOC_NR(BC_REPLY_SG) as usize + 1;
-const BR_COUNT: usize = _IOC_NR(BR_TRANSACTION_PENDING_FROZEN) as usize + 1;
+const BC_COUNT: usize = _IOC_NR(BC_FREEZE_NOTIFICATION_DONE) as usize + 1;
+const BR_COUNT: usize = _IOC_NR(BR_CLEAR_FREEZE_NOTIFICATION_DONE) as usize + 1;
pub(crate) static GLOBAL_STATS: BinderStats = BinderStats::new();
--
2.39.5
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] binder: synchronize Rust Binder stats with freeze commands
2026-06-15 17:48 [PATCH] binder: synchronize Rust Binder stats with freeze commands syncrain
@ 2026-06-15 20:05 ` Greg KH
0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2026-06-15 20:05 UTC (permalink / raw)
To: syncrain
Cc: arve, tkjos, brauner, cmllamas, aliceryhl, ojeda, rust-for-linux,
linux-kernel
On Mon, Jun 15, 2026 at 11:18:34PM +0530, syncrain wrote:
> Rust Binder stats use BC_COUNT and BR_COUNT to size the command and
> return counters, and use event string tables when printing debug
> statistics.
>
> The Binder protocol includes freeze-related commands and return codes,
> but the Rust Binder statistics code was not updated to cover them. As a
> result, those commands and return codes are not accounted for or printed
> by the stats debug output.
>
> Update the counts and event string tables so these commands and return
> codes are included in the debug statistics output.
>
> Signed-off-by: syncrain <iganschel@gmail.com>
> ---
> drivers/android/binder/rust_binder_events.c | 7 ++++++-
> drivers/android/binder/stats.rs | 4 ++--
> 2 files changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/android/binder/rust_binder_events.c b/drivers/android/binder/rust_binder_events.c
> index 488b1470060c..5792aa59cc82 100644
> --- a/drivers/android/binder/rust_binder_events.c
> +++ b/drivers/android/binder/rust_binder_events.c
> @@ -28,6 +28,9 @@ const char * const binder_command_strings[] = {
> "BC_DEAD_BINDER_DONE",
> "BC_TRANSACTION_SG",
> "BC_REPLY_SG",
> + "BC_REQUEST_FREEZE_NOTIFICATION",
> + "BC_CLEAR_FREEZE_NOTIFICATION",
> + "BC_FREEZE_NOTIFICATION_DONE",
> };
>
> const char * const binder_return_strings[] = {
> @@ -51,7 +54,9 @@ const char * const binder_return_strings[] = {
> "BR_FAILED_REPLY",
> "BR_FROZEN_REPLY",
> "BR_ONEWAY_SPAM_SUSPECT",
> - "BR_TRANSACTION_PENDING_FROZEN"
> + "BR_TRANSACTION_PENDING_FROZEN",
> + "BR_FROZEN_BINDER",
> + "BR_CLEAR_FREEZE_NOTIFICATION_DONE",
> };
>
> #define CREATE_TRACE_POINTS
> diff --git a/drivers/android/binder/stats.rs b/drivers/android/binder/stats.rs
> index ab75e9561cbf..ec81dc7747db 100644
> --- a/drivers/android/binder/stats.rs
> +++ b/drivers/android/binder/stats.rs
> @@ -8,8 +8,8 @@
> use kernel::sync::atomic::{ordering::Relaxed, Atomic};
> use kernel::{ioctl::_IOC_NR, seq_file::SeqFile, seq_print};
>
> -const BC_COUNT: usize = _IOC_NR(BC_REPLY_SG) as usize + 1;
> -const BR_COUNT: usize = _IOC_NR(BR_TRANSACTION_PENDING_FROZEN) as usize + 1;
> +const BC_COUNT: usize = _IOC_NR(BC_FREEZE_NOTIFICATION_DONE) as usize + 1;
> +const BR_COUNT: usize = _IOC_NR(BR_CLEAR_FREEZE_NOTIFICATION_DONE) as usize + 1;
>
> pub(crate) static GLOBAL_STATS: BinderStats = BinderStats::new();
>
> --
> 2.39.5
>
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him
a patch that has triggered this response. He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created. Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.
You are receiving this message because of the following common error(s)
as indicated below:
- It looks like you did not use your "real" name for the patch on either
the Signed-off-by: line, or the From: line (both of which have to
match). Please read the kernel file,
Documentation/process/submitting-patches.rst for how to do this
correctly.
If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.
thanks,
greg k-h's patch email bot
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] binder: synchronize Rust Binder stats with freeze commands
@ 2026-06-15 20:17 syncrain
2026-06-15 20:36 ` Carlos Llamas
2026-06-15 20:50 ` Greg KH
0 siblings, 2 replies; 6+ messages in thread
From: syncrain @ 2026-06-15 20:17 UTC (permalink / raw)
To: gregkh, arve, tkjos, brauner, cmllamas, aliceryhl
Cc: ojeda, rust-for-linux, linux-kernel, Keshav Verma
From: Keshav Verma <iganschel@gmail.com>
Rust Binder stats use BC_COUNT and BR_COUNT to size the command and
return counters, and use event string tables when printing debug
statistics.
The Binder protocol includes freeze-related commands and return codes,
but the Rust Binder statistics code was not updated to cover them. As a
result, those commands and return codes are not accounted for or printed
by the stats debug output.
Update the counts and event string tables so these commands and return
codes are included in the debug statistics output.
Signed-off-by: Keshav Verma <iganschel@gmail.com>
---
drivers/android/binder/rust_binder_events.c | 7 ++++++-
drivers/android/binder/stats.rs | 4 ++--
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/android/binder/rust_binder_events.c b/drivers/android/binder/rust_binder_events.c
index 488b1470060c..5792aa59cc82 100644
--- a/drivers/android/binder/rust_binder_events.c
+++ b/drivers/android/binder/rust_binder_events.c
@@ -28,6 +28,9 @@ const char * const binder_command_strings[] = {
"BC_DEAD_BINDER_DONE",
"BC_TRANSACTION_SG",
"BC_REPLY_SG",
+ "BC_REQUEST_FREEZE_NOTIFICATION",
+ "BC_CLEAR_FREEZE_NOTIFICATION",
+ "BC_FREEZE_NOTIFICATION_DONE",
};
const char * const binder_return_strings[] = {
@@ -51,7 +54,9 @@ const char * const binder_return_strings[] = {
"BR_FAILED_REPLY",
"BR_FROZEN_REPLY",
"BR_ONEWAY_SPAM_SUSPECT",
- "BR_TRANSACTION_PENDING_FROZEN"
+ "BR_TRANSACTION_PENDING_FROZEN",
+ "BR_FROZEN_BINDER",
+ "BR_CLEAR_FREEZE_NOTIFICATION_DONE",
};
#define CREATE_TRACE_POINTS
diff --git a/drivers/android/binder/stats.rs b/drivers/android/binder/stats.rs
index ab75e9561cbf..ec81dc7747db 100644
--- a/drivers/android/binder/stats.rs
+++ b/drivers/android/binder/stats.rs
@@ -8,8 +8,8 @@
use kernel::sync::atomic::{ordering::Relaxed, Atomic};
use kernel::{ioctl::_IOC_NR, seq_file::SeqFile, seq_print};
-const BC_COUNT: usize = _IOC_NR(BC_REPLY_SG) as usize + 1;
-const BR_COUNT: usize = _IOC_NR(BR_TRANSACTION_PENDING_FROZEN) as usize + 1;
+const BC_COUNT: usize = _IOC_NR(BC_FREEZE_NOTIFICATION_DONE) as usize + 1;
+const BR_COUNT: usize = _IOC_NR(BR_CLEAR_FREEZE_NOTIFICATION_DONE) as usize + 1;
pub(crate) static GLOBAL_STATS: BinderStats = BinderStats::new();
--
2.39.5
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] binder: synchronize Rust Binder stats with freeze commands
2026-06-15 20:17 syncrain
@ 2026-06-15 20:36 ` Carlos Llamas
2026-06-15 21:09 ` Alice Ryhl
2026-06-15 20:50 ` Greg KH
1 sibling, 1 reply; 6+ messages in thread
From: Carlos Llamas @ 2026-06-15 20:36 UTC (permalink / raw)
To: syncrain
Cc: gregkh, arve, tkjos, brauner, aliceryhl, ojeda, rust-for-linux,
linux-kernel
On Tue, Jun 16, 2026 at 01:47:37AM +0530, syncrain wrote:
> From: Keshav Verma <iganschel@gmail.com>
>
> Rust Binder stats use BC_COUNT and BR_COUNT to size the command and
> return counters, and use event string tables when printing debug
> statistics.
>
> The Binder protocol includes freeze-related commands and return codes,
> but the Rust Binder statistics code was not updated to cover them. As a
> result, those commands and return codes are not accounted for or printed
> by the stats debug output.
>
> Update the counts and event string tables so these commands and return
> codes are included in the debug statistics output.
>
> Signed-off-by: Keshav Verma <iganschel@gmail.com>
> ---
IIUC, this should have tags:
Cc: stable <stable@kernel.org>
Fixes: eafedbc7c050 ("rust_binder: add Rust Binder driver")
But other than that, it LGTM so:
Acked-by: Carlos Llamas <cmllamas@google.com>
Thanks
--
Carlos Llamas
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] binder: synchronize Rust Binder stats with freeze commands
2026-06-15 20:36 ` Carlos Llamas
@ 2026-06-15 21:09 ` Alice Ryhl
0 siblings, 0 replies; 6+ messages in thread
From: Alice Ryhl @ 2026-06-15 21:09 UTC (permalink / raw)
To: Carlos Llamas
Cc: syncrain, gregkh, arve, tkjos, brauner, ojeda, rust-for-linux,
linux-kernel
On Mon, Jun 15, 2026 at 10:36 PM Carlos Llamas <cmllamas@google.com> wrote:
>
> On Tue, Jun 16, 2026 at 01:47:37AM +0530, syncrain wrote:
> > From: Keshav Verma <iganschel@gmail.com>
> >
> > Rust Binder stats use BC_COUNT and BR_COUNT to size the command and
> > return counters, and use event string tables when printing debug
> > statistics.
> >
> > The Binder protocol includes freeze-related commands and return codes,
> > but the Rust Binder statistics code was not updated to cover them. As a
> > result, those commands and return codes are not accounted for or printed
> > by the stats debug output.
> >
> > Update the counts and event string tables so these commands and return
> > codes are included in the debug statistics output.
> >
> > Signed-off-by: Keshav Verma <iganschel@gmail.com>
> > ---
>
> IIUC, this should have tags:
> Cc: stable <stable@kernel.org>
> Fixes: eafedbc7c050 ("rust_binder: add Rust Binder driver")
>
>
> But other than that, it LGTM so:
> Acked-by: Carlos Llamas <cmllamas@google.com>
Patch itself LGTM, so:
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Thanks!
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] binder: synchronize Rust Binder stats with freeze commands
2026-06-15 20:17 syncrain
2026-06-15 20:36 ` Carlos Llamas
@ 2026-06-15 20:50 ` Greg KH
1 sibling, 0 replies; 6+ messages in thread
From: Greg KH @ 2026-06-15 20:50 UTC (permalink / raw)
To: syncrain
Cc: arve, tkjos, brauner, cmllamas, aliceryhl, ojeda, rust-for-linux,
linux-kernel
On Tue, Jun 16, 2026 at 01:47:37AM +0530, syncrain wrote:
> From: Keshav Verma <iganschel@gmail.com>
>
> Rust Binder stats use BC_COUNT and BR_COUNT to size the command and
> return counters, and use event string tables when printing debug
> statistics.
>
> The Binder protocol includes freeze-related commands and return codes,
> but the Rust Binder statistics code was not updated to cover them. As a
> result, those commands and return codes are not accounted for or printed
> by the stats debug output.
>
> Update the counts and event string tables so these commands and return
> codes are included in the debug statistics output.
>
> Signed-off-by: Keshav Verma <iganschel@gmail.com>
> ---
> drivers/android/binder/rust_binder_events.c | 7 ++++++-
> drivers/android/binder/stats.rs | 4 ++--
> 2 files changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/android/binder/rust_binder_events.c b/drivers/android/binder/rust_binder_events.c
> index 488b1470060c..5792aa59cc82 100644
> --- a/drivers/android/binder/rust_binder_events.c
> +++ b/drivers/android/binder/rust_binder_events.c
> @@ -28,6 +28,9 @@ const char * const binder_command_strings[] = {
> "BC_DEAD_BINDER_DONE",
> "BC_TRANSACTION_SG",
> "BC_REPLY_SG",
> + "BC_REQUEST_FREEZE_NOTIFICATION",
> + "BC_CLEAR_FREEZE_NOTIFICATION",
> + "BC_FREEZE_NOTIFICATION_DONE",
> };
>
> const char * const binder_return_strings[] = {
> @@ -51,7 +54,9 @@ const char * const binder_return_strings[] = {
> "BR_FAILED_REPLY",
> "BR_FROZEN_REPLY",
> "BR_ONEWAY_SPAM_SUSPECT",
> - "BR_TRANSACTION_PENDING_FROZEN"
> + "BR_TRANSACTION_PENDING_FROZEN",
> + "BR_FROZEN_BINDER",
> + "BR_CLEAR_FREEZE_NOTIFICATION_DONE",
> };
>
> #define CREATE_TRACE_POINTS
> diff --git a/drivers/android/binder/stats.rs b/drivers/android/binder/stats.rs
> index ab75e9561cbf..ec81dc7747db 100644
> --- a/drivers/android/binder/stats.rs
> +++ b/drivers/android/binder/stats.rs
> @@ -8,8 +8,8 @@
> use kernel::sync::atomic::{ordering::Relaxed, Atomic};
> use kernel::{ioctl::_IOC_NR, seq_file::SeqFile, seq_print};
>
> -const BC_COUNT: usize = _IOC_NR(BC_REPLY_SG) as usize + 1;
> -const BR_COUNT: usize = _IOC_NR(BR_TRANSACTION_PENDING_FROZEN) as usize + 1;
> +const BC_COUNT: usize = _IOC_NR(BC_FREEZE_NOTIFICATION_DONE) as usize + 1;
> +const BR_COUNT: usize = _IOC_NR(BR_CLEAR_FREEZE_NOTIFICATION_DONE) as usize + 1;
>
> pub(crate) static GLOBAL_STATS: BinderStats = BinderStats::new();
>
> --
> 2.39.5
>
>
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him
a patch that has triggered this response. He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created. Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.
You are receiving this message because of the following common error(s)
as indicated below:
- This looks like a new version of a previously submitted patch, but you
did not list below the --- line any changes from the previous version.
Please read the section entitled "The canonical patch format" in the
kernel file, Documentation/process/submitting-patches.rst for what
needs to be done here to properly describe this.
If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.
thanks,
greg k-h's patch email bot
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-06-15 21:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-15 17:48 [PATCH] binder: synchronize Rust Binder stats with freeze commands syncrain
2026-06-15 20:05 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2026-06-15 20:17 syncrain
2026-06-15 20:36 ` Carlos Llamas
2026-06-15 21:09 ` Alice Ryhl
2026-06-15 20:50 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox