Re: [PATCH v5 6/6] rust_binder: use bitmap for allocation of handles

From: Alice Ryhl

Date: Thu Nov 13 2025 - 04:14:20 EST


On Thu, Nov 13, 2025 at 09:32:10AM +0100, Miguel Ojeda wrote:
> On Thu, Nov 13, 2025 at 12:35 AM Alice Ryhl <aliceryhl@xxxxxxxxxx> wrote:
> >
> > Although we should never hit this codepath in real code, I don't think
> > we need to kill the kernel. We can treat the r/b tree as source of truth
> > and adjust the bitmap when mismathces are detected.
> >
> > I could add a kernel warning, though. That shouldn't kill an Android
> > device.
>
> I guess you mean warning in the sense of `pr_warn!` instead of
> `warn_on!`, right?

I was thinking of warn_on!. There is already a pr_err call.

> If so, could you please add as well a `debug_assert!(false)` on that path?
>
> Thanks!
>
> I will create a first issue for the combination, since I hope we can
> use it more and more.
>
> Cheers,
> Miguel