Re: [PATCH v2] rust: generalize userSliceReader to support any Vec

Alice Ryhl
2025-01-08T09:04:45Z

On Tue, Jan 7, 2025 at 8:25 PM Filipe Xavier <felipeaggger@gmail.com> wrote:
>
> The UserSliceReader::read_all function is currently restricted to use
> only Vec with the kmalloc allocator.
> However, there is no reason for this limitation.
> This patch generalizes the function to accept any Vec regardless of the
> allocator used.
> There's a use-case for a KVVec in Binder to avoid maximum
> sizes for a certain array.
>
> Link: https://github.com/Rust-for-Linux/linux/issues/1136
> Signed-off-by: Filipe Xavier <felipeaggger@gmail.com>

Reviewed-by: Alice Ryhl <aliceryhl@google.com>