mirror of
https://github.com/torvalds/linux.git
synced 2026-12-03 20:06:35 +00:00
riscv: kprobes: Use patch_text_nosync() for insn slots
These instructions are not yet visible to the rest of the system, so there is no need to do the whole stop_machine() dance. Reviewed-by: Björn Töpel <[email protected]> Signed-off-by: Samuel Holland <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
This commit is contained in:
@@ -29,9 +29,8 @@ static void __kprobes arch_prepare_ss_slot(struct kprobe *p)
|
||||
|
||||
p->ainsn.api.restore = (unsigned long)p->addr + offset;
|
||||
|
||||
patch_text(p->ainsn.api.insn, &p->opcode, 1);
|
||||
patch_text((void *)((unsigned long)(p->ainsn.api.insn) + offset),
|
||||
&insn, 1);
|
||||
patch_text_nosync(p->ainsn.api.insn, &p->opcode, 1);
|
||||
patch_text_nosync(p->ainsn.api.insn + offset, &insn, 1);
|
||||
}
|
||||
|
||||
static void __kprobes arch_prepare_simulate(struct kprobe *p)
|
||||
|
||||
Reference in New Issue
Block a user