Re: [PATCH v2] rust: binder: Use lower bound for node debug lookup
From: Greg Kroah-Hartman
Date: Thu Oct 01 2026 - 10:08:28 EST
On Thu, Oct 01, 2026 at 03:43:25PM +0200, Alice Ryhl wrote:
> On Thu, Oct 1, 2026 at 2:38 PM Greg Kroah-Hartman
> <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> >
> > On Mon, Aug 31, 2026 at 07:49:20AM +0200, nenkov2004@xxxxxxxxx wrote:
> > > From: Hristos Nenkov <nenkov2004@xxxxxxxxx>
> > >
> > > The Binder node debug lookup currently walks the process node RBTree
> > > from the beginning until it finds the first node pointer greater than
> > > the requested pointer.
> > >
> > > Use RBTree::cursor_lower_bound() to start the lookup at the relevant
> > > tree position instead. When the lower-bound key is equal to the
> > > requested pointer, inspect the next node to preserve the existing
> > > strictly-greater-than semantics.
> > >
> > > This changes the tree lookup from a linear scan to an O(log n) search
> > > without changing the returned node semantics.
> > >
> > > Suggested-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>
> > > Link: https://github.com/Rust-for-Linux/linux/issues/1249
> > > Signed-off-by: Hristos Nenkov <nenkov2004@xxxxxxxxx>
> > > ---
> > > drivers/android/binder/process.rs | 8 ++++++--
> > > 1 file changed, 6 insertions(+), 2 deletions(-)
> >
> > This does not apply to the char-misc-testing branch :(
>
> Please check this instead:
> https://lore.kernel.org/all/20260814215145.2050599-1-rafael@xxxxxxxxxxx/
>
> This one is a duplicate, and I prefer the other one.
Ah good, I already took that one :)
thanks,
greg k-h