[PATCH] x86/uaccess: Avoid barrier_nospec() in copy_from_user()

Linus Torvalds torvalds at linux-foundation.org
Mon Oct 14 22:20:44 AEDT 2024


On Mon, 14 Oct 2024 at 02:59, David Laight <David.Laight at aculab.com> wrote:
>
> Isn't LAM just plain stupid unless the hardware validates the bits
> against the TLB?

What? No. You can't do that. At some point, the TLB isn't filled, and
then you have to do the access with lots of linear address bits
masked.

> Doesn't ARM64 have the same issue?

Yes. They have different bits that they'd need to test for this. They
have top-byte-ignore, so they can't use the sign bit.

On arm64, the address masking might end up looking something like this

    https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d31e86ef6377

instead.

              Linus


More information about the Linuxppc-dev mailing list