On Wed, 23 Oct 2024 at 12:17, Linus Torvalds
<torva...@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