]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit26a8e24207925ac843584a366642a5728c17b69e
treea830eb7fcba98264df2b0315495eca5c88fc0a02
parented28e72390981b8e728243b186b673cef0085dd1
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