[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aWyplq9VTFHsyYsE@google.com>
Date: Sun, 18 Jan 2026 09:36:22 +0000
From: Alice Ryhl <aliceryhl@...gle.com>
To: jkhall81 <jason.kei.hall@...il.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Arve Hjønnevåg" <arve@...roid.com>, Todd Kjos <tkjos@...roid.com>,
Carlos Llamas <cmllamas@...gle.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH rust-next] rust: binder: refactor context management to
use KVVec
On Sat, Jan 17, 2026 at 09:22:42AM -0700, jkhall81 wrote:
> Replace the intrusive linked list management in context.rs with KVVec.
> This modernization simplifies the ownership model by using standard
> Arc-based tracking and moves away from manual unsafe list removals.
>
> The refactor improves memory safety by leveraging Rust's contiguous
> collection types while maintaining proper error propagation for
> allocation failures during process registration.
>
> Suggested-by: Alice Ryhl <aliceryhl@...gle.com>
> Link: https://github.com/rust-for-linux/linux/issues/1215
> Signed-off-by: jkhall81 <jason.kei.hall@...il.com>
The subject says [PATCH rust-next], but this would land through
char-misc, not rust-next, as that's where Binder belongs.
You can leave out the branch name and just say [PATCH].
Also, I usually use 'rust_binder:' instead of 'rust: binder:' for the
commit message.
> pub(crate) fn get_all_contexts() -> Result<KVec<Arc<Context>>> {
> pub(crate) fn get_all_procs(&self) -> Result<KVec<Arc<Process>>> {
These two methods need to use KVVec instead of KVec.
Also, I think some of these loops could be replaced with simply
Vec::clone().
Alice
Powered by blists - more mailing lists