[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240913115228.GE19305@redhat.com>
Date: Fri, 13 Sep 2024 13:52:28 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Jiri Olsa <jolsa@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>, bpf@...r.kernel.org,
Martin KaFai Lau <kafai@...com>, Song Liu <songliubraving@...com>,
Yonghong Song <yhs@...com>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...omium.org>,
Stanislav Fomichev <sdf@...gle.com>, Hao Luo <haoluo@...gle.com>,
Steven Rostedt <rostedt@...dmis.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org
Subject: Re: [PATCHv3 1/7] uprobe: Add support for session consumer
On 09/09, Jiri Olsa wrote:
>
> @@ -37,13 +37,16 @@ struct uprobe_consumer {
> * for the current process. If filter() is omitted or returns true,
> * UPROBE_HANDLER_REMOVE is effectively ignored.
> */
> - int (*handler)(struct uprobe_consumer *self, struct pt_regs *regs);
> + int (*handler)(struct uprobe_consumer *self, struct pt_regs *regs, __u64 *data);
> int (*ret_handler)(struct uprobe_consumer *self,
> unsigned long func,
> - struct pt_regs *regs);
> + struct pt_regs *regs, __u64 *data);
And... I won't insist, but I'd suggest to do this in a separate patch
which should also update the current users in bpf_trace.c, trace_uprobe.c
and bpf_testmod.c.
Then it would be easier to review the next "functional" change. But this
is minor, feel free to ignore.
Finally, imo this documentation in handler_chain()
/*
* The handler can return following values:
* 0 - execute ret_handler (if it's defined)
* 1 - remove uprobe
* 2 - do nothing (ignore ret_handler)
*/
should be moved to uprobes.h and explain UPROBE_HANDLER_REMOVE/IGNORE there.
And note that "remove uprobe" is misleading, it should say something
like "remove the breakpoint from current->mm".
Oleg.
Powered by blists - more mailing lists