Re: [PATCH perf/core 06/22] uprobes: Add is_register argument to uprobe_write and uprobe_write_opcode

Andrii Nakryiko
2025-04-22T23:48:36Z

On Mon, Apr 21, 2025 at 2:45 PM Jiri Olsa <jolsa@kernel.org> wrote:
>
> 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>
> ---
> arch/arm/probes/uprobes/core.c | 2 +-
> include/linux/uprobes.h | 5 +++--
> kernel/events/uprobes.c | 22 +++++++++++-----------
> 3 files changed, 15 insertions(+), 14 deletions(-)
>

Acked-by: Andrii Nakryiko <andrii@kernel.org> …