]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
uprobes: Add is_register argument to uprobe_write and uprobe_write_opcode
authorJiri Olsa <jolsa@kernel.org>
Sun, 20 Jul 2025 11:21:16 +0000 (13:21 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 21 Aug 2025 18:09:19 +0000 (20:09 +0200)
commitec46350fe1e2338f42ee84974c36b25afe8ba53a
tree0ed5ec7cac24be042a17707ffe91473e5c0f1d42
parentf8b7c528b4fb7018d12b6bb63bb52576cfc73697
uprobes: Add is_register argument to uprobe_write and uprobe_write_opcode

The uprobe_write has special path to restore the original page when we
write original instruction back. This happens when uprobe_write detects
that we want to write anything else but breakpoint instruction.

Moving the detection away and passing it to uprobe_write as argument,
so it's possible to write different instructions (other than just
breakpoint and rest).

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Link: https://lore.kernel.org/r/20250720112133.244369-7-jolsa@kernel.org
arch/arm/probes/uprobes/core.c
include/linux/uprobes.h
kernel/events/uprobes.c