Re: [PATCH v2] x86/lib: Use REP MOVSB for large memcpy() on ERMS CPUs without FSRM

From: Usama Arif

Date: Wed Nov 11 2026 - 08:12:29 EST


On Tue, 10 Nov 2026 09:53:07 -0800 Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:

> On Wed, 4 Nov 2026 at 14:28, Usama Arif <usama.arif@xxxxxxxxx> wrote:
> >
> > + ALTERNATIVE __stringify(cmpq $0x20, %rcx; jb .Lhandle_tail), \
> > + __stringify(rep movsb; RET), X86_FEATURE_FSRM
>
> Let's not do that.
>
> Putting magic things like RET in alternatives is just a bad bad idea.

I will send v3 today with RET in ordinary text.

Thanks!
Usama

>
> Linus
>