public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/7] riscv: Various text patching improvements
@ 2024-03-27 16:04 Samuel Holland
  2024-03-27 16:04 ` [PATCH v2 1/7] riscv: jump_label: Batch icache maintenance Samuel Holland
                   ` (8 more replies)
  0 siblings, 9 replies; 16+ messages in thread
From: Samuel Holland @ 2024-03-27 16:04 UTC (permalink / raw)
  To: Palmer Dabbelt
  Cc: Björn Töpel, linux-riscv, linux-kernel, Samuel Holland,
	Ard Biesheuvel, Daniel Borkmann, Jason Baron, Josh Poimboeuf,
	Peter Zijlstra, Steven Rostedt, bpf

Here are a few changes to minimize calls to stop_machine() and
flush_icache_*() in the various text patching functions, as well as
to simplify the code.

This series is based on "[PATCH v3 0/2] riscv: fix patching with IPI"[1].

[1]: https://lore.kernel.org/linux-riscv/20240229121056.203419-1-alexghiti@rivosinc.com/

Changes in v2:
 - Remove unnecessary line wrapping
 - Further simplify patch_insn_set()/patch_insn_write() loop conditions
 - Use min() instead of min_t() since both sides are unsigned long

Samuel Holland (7):
  riscv: jump_label: Batch icache maintenance
  riscv: jump_label: Simplify assembly syntax
  riscv: kprobes: Use patch_text_nosync() for insn slots
  riscv: Simplify text patching loops
  riscv: Pass patch_text() the length in bytes
  riscv: Use offset_in_page() in text patching functions
  riscv: Remove extra variable in patch_text_nosync()

 arch/riscv/include/asm/jump_label.h |  4 +-
 arch/riscv/include/asm/patch.h      |  2 +-
 arch/riscv/kernel/jump_label.c      | 16 +++++--
 arch/riscv/kernel/patch.c           | 69 ++++++++++++++---------------
 arch/riscv/kernel/probes/kprobes.c  | 19 ++++----
 arch/riscv/net/bpf_jit_comp64.c     |  7 +--
 6 files changed, 63 insertions(+), 54 deletions(-)

-- 
2.43.1


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

end of thread, other threads:[~2024-06-27 17:50 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-27 16:04 [PATCH v2 0/7] riscv: Various text patching improvements Samuel Holland
2024-03-27 16:04 ` [PATCH v2 1/7] riscv: jump_label: Batch icache maintenance Samuel Holland
2024-03-27 16:04 ` [PATCH v2 2/7] riscv: jump_label: Simplify assembly syntax Samuel Holland
2024-03-27 16:04 ` [PATCH v2 3/7] riscv: kprobes: Use patch_text_nosync() for insn slots Samuel Holland
2024-03-27 16:04 ` [PATCH v2 4/7] riscv: Simplify text patching loops Samuel Holland
2024-04-02 11:13   ` Björn Töpel
2024-04-24 10:44   ` Conor Dooley
2024-04-24 10:47     ` Conor Dooley
2024-03-27 16:04 ` [PATCH v2 5/7] riscv: Pass patch_text() the length in bytes Samuel Holland
2024-04-24 10:49   ` Conor Dooley
2024-03-27 16:04 ` [PATCH v2 6/7] riscv: Use offset_in_page() in text patching functions Samuel Holland
2024-04-24 10:51   ` Conor Dooley
2024-03-27 16:04 ` [PATCH v2 7/7] riscv: Remove extra variable in patch_text_nosync() Samuel Holland
2024-04-24 10:54   ` Conor Dooley
2024-05-22 16:35 ` [PATCH v2 0/7] riscv: Various text patching improvements Palmer Dabbelt
2024-06-27 17:50 ` patchwork-bot+linux-riscv

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox