Re: [PATCH v2 1/3] rust: uaccess: use INLINE_COPY_TO_USER to guard copy_to_user()\

From: Alice Ryhl

Date: Mon Apr 27 2026 - 10:56:39 EST


On Fri, Apr 24, 2026 at 10:08:55PM -0400, Yury Norov wrote:
> The copy_to_user() rust helper is only needed when the main kernel inlines
> the function. It is controlled by INLINE_COPY_TO_USER, but the rust helper
> is protected with INLINE_COPY_FROM_USER.
>
> Fix that.
>
> Reported-by: Christophe Leroy (CS GROUP) <chleroy@xxxxxxxxxx>
> Closes: https://lore.kernel.org/all/746c9c50-20c4-4dc9-a539-bf1310ff9414@xxxxxxxxxx/
> Fixes: d99dc586ca7c7 ("uaccess: decouple INLINE_COPY_FROM_USER and CONFIG_RUST")
> Signed-off-by: Yury Norov <ynorov@xxxxxxxxxx>

Reviewed-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>