Re: [PATCH RESEND v2 1/2] nfc: llcp: widen getsockopt value locals to u32

From: Simon Horman

Date: Fri Nov 13 2026 - 13:20:23 EST


On Mon, Nov 09, 2026 at 05:50:37AM -0800, Breno Leitao wrote:
> nfc_llcp_getsockopt() returns each option as a u32 (written through a
> (u32 __user *) cast), but the temporary variables are smaller than that,
> and they are promoted at write side, example:
>
> u8 rw;
> put_user(rw, (u32 __user *) optval)
>
> That is fine, but I want to widen the rw/miux/remote_miu locals from
> u8/u16 to u32 so the following getsockopt_iter conversion can pass their
> address to copy_to_iter(), which expects an object of the exact width.
>
> No functional change.
>
> PS: I am sending this as a separated patch to make sure this conversion
> explicitly reviewable.
>
> Signed-off-by: Breno Leitao <leitao@xxxxxxxxxx>

Reviewed-by: Simon Horman <horms@xxxxxxxxxx>