Re: [PATCH] x86/alternatives: Fix optimize_nops() checking

From: Linus Torvalds
Date: Wed Jan 10 2018 - 16:05:15 EST


On Wed, Jan 10, 2018 at 12:55 PM, Borislav Petkov <bp@xxxxxxxxx> wrote:
>
> Ok, so the problem was: how to fixup jumps which are not the first
> instruction which is being replaced but a following one in the
> instruction bytes with which we replace.

What jumps do you have that need to be fixed up?

I really think we should avoid having things like that.

Any jumps *within* the alternatives should have been handled by the
assembler already.

And jumps between the alternatives and other places? Why do they exist?

Linus