• Borislav Petkov's avatar
    x86/alternatives: Use optimized NOPs for padding · 4fd4b6e5
    Borislav Petkov authored
    Alternatives allow now for an empty old instruction. In this case we go
    and pad the space with NOPs at assembly time. However, there are the
    optimal, longer NOPs which should be used. Do that at patching time by
    adding alt_instr.padlen-sized NOPs at the old instruction address.
    
    Cc: Andy Lutomirski <luto@amacapital.net>
    Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
    4fd4b6e5
alternative.c 19.2 KB