[PATCH] x86/uaccess: Avoid barrier_nospec() in copy_from_user()
Linus Torvalds
torvalds at linux-foundation.org
Thu Oct 24 07:07:59 AEDT 2024
On Wed, 23 Oct 2024 at 12:17, Linus Torvalds
<torvalds at linux-foundation.org> wrote:
>
> NOTE! This is obviously untested and I didn't check that it does the
> cmp/sbb/or the right way around.
Well, it boots. The code generation (from strncpy_from_user()) seems ok:
movabs $0x123456789abcdef,%rcx
cmp %rsi,%rcx
sbb %ecx,%ecx
or %rsi,%rcx
where obviously that constant is the bogus pre-initialized value, not
the actual runtime value.
Which is not to say that the patch might not be horribly buggy anyway.
Linus
More information about the Linuxppc-dev
mailing list