Skip to content

jump_label: get rid of NOP patching where possible

Ard Biesheuvel linux-mips linux-s390 lkml 2 versions – Applied

Status from this message: The following commit has been merged into the locking/core branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 5 repliesApplied
  2. v13 patches 4 repliesSuperseded

Changes in v2 from the cover letter

- use a default implementation of arch_jump_label_transform_static() instead of an empty macro in patch #3
- fix MIPS with CONFIG_MODULES=n
- add acks from Mark and Peter to patch #3

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/3jump_label: s390: avoid pointless initial NOP patchingarch/s390/include/asm/jump_label.h arch/s390/kernel/jump_label.c+7 -211 reply
2/3jump_label: mips: move module NOP patching into arch codearch/mips/kernel/jump_label.c arch/mips/kernel/module.c arch/s390/kernel/module.c +4 more+24 -411 reply
3/3jump_label: make initial NOP patching the special caseDocumentation/staging/static-keys.rst arch/arc/kernel/jump_label.c arch/arm/kernel/jump_label.c +7 more+7 -833 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchMark RutlandPeter Zijlstra (Intel)Alexander Gordeev
1/3A-b
2/3A-b
3/3A-b A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/3] jump_label: get rid of NOP patching where possible

The only architecture that actually needs to convert compiler generated jump label NOP encodings into something else at runtime is MIPS, because the assembler cannot be trusted to emit a sequence that can be safely patched into a branch instruction.

All other architectures either do nothing with jump label NOPs at load time, or patch a perfectly good NOP into a different one, or into the same one - none of this seems very useful, so let's get rid of it where we can.

Changes since v1:
- use a default implementation of arch_jump_label_transform_static() instead of an empty macro in patch #3
- fix MIPS with CONFIG_MODULES=n
- add acks from Mark and Peter to patch #3

Cc Peter Zijlstra <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Thomas Bogendoerfer <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Vasily Gorbik <[email protected]>
Cc Alexander Gordeev <[email protected]>
Cc Christian Borntraeger <[email protected]>
Cc Sven Schnelle <[email protected]>

Ard Biesheuvel (3):
jump_label: s390: avoid pointless initial NOP patching
jump_label: mips: move module NOP patching into arch code
jump_label: make initial NOP patching the special case

 Documentation/staging/static-keys.rst |  3 --
 arch/arc/kernel/jump_label.c          | 13 -------
 arch/arm/kernel/jump_label.c          |  6 ---
 arch/arm64/kernel/jump_label.c        | 11 ------
 arch/mips/include/asm/jump_label.h    |  2 +
 arch/mips/kernel/jump_label.c         | 19 +++++++++
 arch/mips/kernel/module.c             |  5 ++-
 arch/parisc/kernel/jump_label.c       | 11 ------
 arch/riscv/kernel/jump_label.c        | 12 ------
 arch/s390/include/asm/jump_label.h    |  5 +--
 arch/s390/kernel/jump_label.c         | 28 +++----------
 arch/s390/kernel/module.c             |  1 -
 arch/sparc/kernel/module.c            |  3 --
 arch/x86/kernel/jump_label.c          | 13 -------
 arch/x86/kernel/module.c              |  3 --
 include/linux/jump_label.h            |  7 +---
 kernel/jump_label.c                   | 41 +++-----------------
 17 files changed, 38 insertions(+), 145 deletions(-)
Signature · 1 line
2.35.1