Skip to content

RFC jump_label, x86: Support variable sized JMP instructions

Peter Zijlstra lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest8 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8x86/alternatives: Teach text_poke_bp() to emulate instructionsarch/x86/include/asm/text-patching.h arch/x86/kernel/alternative.c arch/x86/kernel/jump_label.c +1 more+103 -390 replies
2/8jump_label, x86: Strip ASM jump_label supportarch/x86/entry/calling.h arch/x86/include/asm/jump_label.h+5 -250 replies
3/8jump_label, x86: Factor out the __jump_table generationarch/x86/include/asm/jump_label.h+12 -120 replies
4/8jump_label, x86: Remove init NOP optimizationarch/x86/kernel/jump_label.c+4 -150 replies
5/8jump_label, x86: Improve error when we fail expected textarch/x86/kernel/jump_label.c+11 -130 replies
6/8jump_label, x86: Add variable length patching supportarch/x86/include/asm/jump_label.h arch/x86/include/asm/nops.h arch/x86/kernel/jump_label.c+53 -310 replies
7/8jump_label, x86: Introduce jump_entry_size()arch/x86/include/asm/jump_label.h arch/x86/kernel/jump_label.c include/linux/jump_label.h +1 more+20 -30 replies
8/8jump_label, x86: Enable JMP8/NOP2 supportarch/x86/include/asm/jump_label.h arch/x86/kernel/jump_label.c+35 -70 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC][PATCH 0/8] jump_label, x86: Support variable sized JMP instructions

After discussing jump_labels with Eugeny and Vineet the other day, I started playing with adding support for our 2 byte JMP/8 instruction. Much thanks to Josh for (re)discovering the .skip trick.

These patches boot an x86_64 defconfig in kvm, so it must be perfect.

Using the 2 byte jumps saves about ~6k text for an x86_64-defconfig build.