Thread (30 messages) flat view 30 messages, 5 authors, 2024-09-13

Re: [PATCHv3 1/7] uprobe: Add support for session consumer

From: Oleg Nesterov <oleg@redhat.com>
Date: 2024-09-13 11:52:54
Also in: bpf, lkml

On 09/09, Jiri Olsa wrote:
quoted hunk ↗ jump to hunk
@@ -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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help