mbox series

[V4,0/3] kprobe: Optimize the performance of patching ss

Message ID 20220927022435.129965-1-liaochang1@huawei.com (mailing list archive)
Headers show
Series kprobe: Optimize the performance of patching ss | expand

Message

Liao, Chang Sept. 27, 2022, 2:24 a.m. UTC
Single-step slot would not be used until kprobe is enabled, that means
no race condition occurs on it under SMP, hence it is safe to pacth ss
slot without stopping machine.

v4:
1. Add Acked-by from Will Deacon
2. Mark Rutland provides some subtleties on arm64 micro-architecture
   that needs to follow.

v3:
1. Drop duplicated I-Cache maintenance for arm64.
2. Add Acked-by from Masami Hiramatsu.

v2:
Backport riscv patch to cksy and arm64.


Liao Chang (3):
  riscv/kprobe: Optimize the performance of patching single-step slot
  csky/kprobe: Optimize the performance of patching single-step slot
  arm64/kprobe: Optimize the performance of patching single-step slot

 arch/arm64/kernel/probes/kprobes.c | 27 +++++++++++++++++++++------
 arch/csky/kernel/probes/kprobes.c  |  6 +++++-
 arch/riscv/kernel/probes/kprobes.c |  8 +++++---
 3 files changed, 31 insertions(+), 10 deletions(-)

Comments

Catalin Marinas Sept. 30, 2022, 4:25 p.m. UTC | #1
On Tue, 27 Sep 2022 10:24:32 +0800, Liao Chang wrote:
> Single-step slot would not be used until kprobe is enabled, that means
> no race condition occurs on it under SMP, hence it is safe to pacth ss
> slot without stopping machine.
> 
> v4:
> 1. Add Acked-by from Will Deacon
> 2. Mark Rutland provides some subtleties on arm64 micro-architecture
>    that needs to follow.
> 
> [...]

Applied to arm64 (for-next/misc), thanks!

[3/3] arm64/kprobe: Optimize the performance of patching single-step slot
      https://git.kernel.org/arm64/c/a0caebbd0460