[PATCH] x86/uaccess: Avoid barrier_nospec() in copy_from_user()
Linus Torvalds
torvalds at linux-foundation.org
Mon Oct 21 09:59:25 AEDT 2024
On Sun, 20 Oct 2024 at 15:44, Josh Poimboeuf <jpoimboe at kernel.org> wrote:
>
> Anyway, I'd really like to make forward progress on getting rid of the
> LFENCEs in copy_from_user() and __get_user(), so until if/when we hear
> back from both vendors, how about we avoid noncanonical exceptions
> altogether (along with the edge cases mentioned above) and do something
> like the below?
That doesn't work for LAM at _all_.
So at a minimum, you need to then say "for LAM enabled CPU's we do the
'shift sign bit' trick".
Hopefully any LAM-capable CPU doesn't have this issue?
And I still think that clac/stac has to serialize with surrounding
memory operations, making this all moot.
Linus
More information about the Linuxppc-dev
mailing list