Re: [PATCH] x86/uaccess: Avoid barrier_nospec() in copy_from_user()
From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2024-10-14 11:21:14
From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2024-10-14 11:21:14
On Mon, 14 Oct 2024 at 02:59, David Laight [off-list ref] 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