Re: [PATCH 2/2] uaccess: minimize INLINE_COPY_USER-related ifdefery

From: Alice Ryhl

Date: Thu Mar 26 2026 - 04:04:03 EST


On Wed, Mar 25, 2026 at 12:33:12PM -0400, Yury Norov wrote:
> Now that we've got the same knob selecting inline vs outline copy_to_user()
> and copy_from_user(), we can simplify the corresponding logic in the
> uaccess.h.
>
> Signed-off-by: Yury Norov <ynorov@xxxxxxxxxx>

Both patches are:
Tested-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>

But I can't help but think if it wouldn't be slightly better to split up
the first patch in a targeted Fixes: path that just fixes the FROM/TO
mixup, and a follow-up non-fix that actually deduplicates the two
ifdefs.

> @@ -217,11 +219,8 @@ copy_from_user(void *to, const void __user *from, unsigned long n)
> {
> if (!check_copy_size(to, n, false))
> return n;
> -#ifdef INLINE_COPY_USER
> - return _inline_copy_from_user(to, from, n);
> -#else
> +
> return _copy_from_user(to, from, n);
> -#endif

Spurious extra empty line here?

Alice