Re: [PATCH v3 2/6] x86/uaccess: Avoid barrier_nospec() in 64-bit __get_user()

From: Linus Torvalds
Date: Sat Nov 16 2024 - 18:09:29 EST


On Sat, 16 Nov 2024 at 13:38, David Laight <David.Laight@xxxxxxxxxx> wrote:
>
> If __get_user() is the same as get_user() [..]

No, the problem is that it's the same from a performance angle (and
now it's actually slower), but some hacky code paths depend on
__get_user() not checking the address.

They then use that to read from either user space _or_ kernel space.

Wrong? Yes. Architecture-specific? Yes. But it sadly happens.

Linus