Re: [PATCH perf/core 03/22] uprobes: Move ref_ctr_offset update out of uprobe_write_opcode

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

On Mon, Apr 21, 2025 at 2:45 PM Jiri Olsa <jolsa@kernel.org> wrote:
>
> The uprobe_write_opcode function currently updates also refctr offset
> if there's one defined for uprobe.
>
> This is not handy for following changes which needs to make several
> updates (writes) to install or remove uprobe, but update refctr offset
> just once.
>
> Adding set_swbp_refctr/set_orig_refctr which makes sure refctr offset
> is updated.
>
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> ---
> include/linux/uprobes.h | 2 +-
> kernel/events/uprobes.c | 62 ++++++++++++++++++++++++-----------------
> 2 files changed, 38 insertions(+), 26 deletions(-)
>

LGTM

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