arm64/kprobe: Optimize the performance of patching single-step slot
authorLiao Chang <liaochang1@huawei.com>
Tue, 27 Sep 2022 02:24:35 +0000 (10:24 +0800)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 30 Sep 2022 08:17:15 +0000 (09:17 +0100)
commita0caebbd04602cb7d28f6f316213a915ffab92a2
treea830eb7fcba98264df2b0315495eca5c88fc0a02
parent8c6e3657be6b39cd5943041d0a4ab6bd5d0c2258
arm64/kprobe: Optimize the performance of patching single-step slot

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.

Since I and D caches are coherent within single-step slot from
aarch64_insn_patch_text_nosync(), hence no need to do it again via
flush_icache_range().

Acked-by: Will Deacon <will@kernel.org>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Liao Chang <liaochang1@huawei.com>
Link: https://lore.kernel.org/r/20220927022435.129965-4-liaochang1@huawei.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/probes/kprobes.c