Re: [PATCH] x86/uaccess: Zero the 8-byte get_range case on failure

From: Linus Torvalds
Date: Wed Jul 31 2024 - 12:24:57 EST


On Wed, 31 Jul 2024 at 00:31, David Gow <davidgow@xxxxxxxxxx> wrote:
>
> Fixes: 8a2462df1547 ("x86/uaccess: Improve the 8-byte getuser() case")
> Signed-off-by: David Gow <davidgow@xxxxxxxxxx>

Ack.

I'd have liked to minimize the #ifdef's in code, but yeah, this fix is
obviously needed.

My bad. My mental model these days is the 64-bit case, where the whole
'check_range' thing is about address masking tricks, not the actual
conditional. So I didn't think of the "access_ok fails" case at all.

Linus