Re: [PATCH] x86/alternatives: Fix ALTERNATIVE_2 padding generation properly

From: Quentin Casasnovas
Date: Tue Apr 07 2015 - 05:25:35 EST

On Sat, Apr 04, 2015 at 03:34:43PM +0200, Borislav Petkov wrote:
> From: Borislav Petkov <bp@xxxxxxx>
> Quentin caught a corner case with the generation of instruction padding
> in the ALTERNATIVE_2 macro: if len(orig_insn) < len(alt1) < len(alt2),
> then not enough padding gets added and that is not good(tm) as we could
> overwrite the beginning of the next instruction.

FWIW, this patch looks good to me (I have not tested it though).


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at