linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] jump_label: get rid of NOP patching where possible
@ 2022-06-08 10:45 Ard Biesheuvel
  2022-06-08 10:45 ` [PATCH 1/3] jump_label: s390: avoid pointless initial NOP patching Ard Biesheuvel
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Ard Biesheuvel @ 2022-06-08 10:45 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ard Biesheuvel, Peter Zijlstra, Thomas Bogendoerfer,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, linux-mips, linux-s390

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.

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: linux-mips@vger.kernel.org
Cc: linux-s390@vger.kernel.org

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         | 17 ++++++++
 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, 34 insertions(+), 147 deletions(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-06-15 10:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-08 10:45 [PATCH 0/3] jump_label: get rid of NOP patching where possible Ard Biesheuvel
2022-06-08 10:45 ` [PATCH 1/3] jump_label: s390: avoid pointless initial NOP patching Ard Biesheuvel
2022-06-08 10:45 ` [PATCH 2/3] jump_label: mips: move module NOP patching into arch code Ard Biesheuvel
2022-06-08 10:45 ` [PATCH 3/3] jump_label: make initial NOP patching the special case Ard Biesheuvel
2022-06-15  9:52   ` Mark Rutland
2022-06-15  9:58     ` Ard Biesheuvel
2022-06-15 10:06     ` Peter Zijlstra
2022-06-15 10:20       ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).