Re: [PATCH 16/21] binder: refactor page range allocation

From: Carlos Llamas
Date: Fri Dec 01 2023 - 02:19:13 EST


On Tue, Nov 07, 2023 at 09:08:35AM +0000, Alice Ryhl wrote:
> Carlos Llamas <cmllamas@xxxxxxxxxx> writes:
> > Instead of looping through the page range twice to first determine if
> > the mmap lock is required, simply do it per-page as needed. Split out
> > all this logic into a separate binder_get_user_page_remote() function.
> >
> > Signed-off-by: Carlos Llamas <cmllamas@xxxxxxxxxx>
>
> One nit, otherwise looks okay to me.
> Reviewed-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>
>
> Carlos Llamas <cmllamas@xxxxxxxxxx> writes:
> > + unsigned long index;
> > - size_t index;
>
> You're changing the type of index to unsigned long here, but it seems to
> me that size_t is the correct type.

Perhaps size_t made sense before the addresses were also moved to
unsigned long. I think this is a better fit now.

--
Carlos Llamas