From: Alice Ryhl <aliceryhl@google.com>
To: Carlos Llamas <cmllamas@google.com>
Cc: "Alice Ryhl" <aliceryhl@google.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Boqun Feng" <boqun@kernel.org>, "Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
"Tamir Duberstein" <tamird@kernel.org>,
"Alexandre Courbot" <acourbot@nvidia.com>,
"Onur Özkan" <work@onurozkan.dev>,
kernel-team@android.com, linux-kernel@vger.kernel.org,
rust-for-linux@vger.kernel.org,
"Arve Hjønnevåg" <arve@android.com>,
"Todd Kjos" <tkjos@android.com>,
"Christian Brauner" <brauner@kernel.org>
Subject: Re: [PATCH v2] rust_binder: add state_hashed and transactions_hashed files
Date: Wed, 21 Oct 2026 08:52:58 +0000 [thread overview]
Message-ID: <20261021085258.427331-1-aliceryhl@google.com> (raw)
In-Reply-To: <20261021033257.1359428-1-cmllamas@google.com>
On Wed, Oct 21, 2026 at 03:32:57AM +0000, Carlos Llamas wrote:
> The 'state' and 'transactions' binderfs files print the userspace ptr
> and cookie of each node as raw values, which leaks the userspace memory
> layout and forces access to these files to be heavily restricted. Add
> hashed versions of these files, as done for the C driver in commit
> 57483a362741 ("binder: Create safe versions of binder log files"), so
> that access to them can be granted more broadly.
>
> Pass a 'hashed' flag down the debug_print() chain and print the ptr and
> cookie through a new MaybeHashed helper, which either prints the raw
> value or hashes it like %p does. Everything else in the files remains
> unchanged:
>
> $ grep "node 2:" /dev/binderfs/binder_logs/state*
> state: node 2: u000000003cf2c740 c0000000000000000 hs true ...
> state_hashed: node 2: u00000000abab9b6d c0000000000000000 hs true ...
>
> Assisted-by: LLM
> Signed-off-by: Carlos Llamas <cmllamas@google.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
next prev parent reply other threads:[~2026-10-21 8:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-09 17:06 [PATCH] " Carlos Llamas
2026-10-13 13:59 ` Greg Kroah-Hartman
2026-10-21 3:32 ` [PATCH v2] " Carlos Llamas
2026-10-21 8:52 ` Alice Ryhl [this message]
2026-10-21 9:37 ` Miguel Ojeda
2026-10-21 9:46 ` Alice Ryhl
2026-10-21 9:49 ` Miguel Ojeda
2026-10-21 9:58 ` Alice Ryhl
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=20261021085258.427331-1-aliceryhl@google.com \
--to=aliceryhl@google.com \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=arve@android.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=brauner@kernel.org \
--cc=cmllamas@google.com \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=gary@garyguo.net \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tamird@kernel.org \
--cc=tkjos@android.com \
--cc=tmgross@umich.edu \
--cc=work@onurozkan.dev \
/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®