From: Kienan Stewart Date: Mon, 2 Dec 2024 18:33:23 +0000 (+0000) Subject: Fix: uprobe consumer handler signature changed in Linux 6.13.0-rc1 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=1c4770459574d89c19fc647a9528d362d40eec67;p=lttng-modules.git Fix: uprobe consumer handler signature changed in Linux 6.13.0-rc1 See upstream commit: da09a9e0c3eab164af950be44ee6bdea8527c3e5 commit da09a9e0c3eab164af950be44ee6bdea8527c3e5 Author: Jiri Olsa Date: Fri Oct 18 22:22:51 2024 +0200 uprobe: Add data pointer to consumer handlers Adding data pointer to both entry and exit consumer handlers and all its users. The functionality itself is coming in following change. Signed-off-by: Jiri Olsa Signed-off-by: Peter Zijlstra (Intel) Acked-by: Oleg Nesterov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20241018202252.693462-2-jolsa@kernel.org Change-Id: I41e1a11a71c1c8a9bda461d96e5d1f9cc20e4df8 Signed-off-by: Kienan Stewart Signed-off-by: Mathieu Desnoyers --- diff --git a/src/lttng-uprobes.c b/src/lttng-uprobes.c index 2d97155e..cb9b1663 100644 --- a/src/lttng-uprobes.c +++ b/src/lttng-uprobes.c @@ -26,8 +26,13 @@ #include #include +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,13,0)) +static +int lttng_uprobes_event_handler_pre(struct uprobe_consumer *uc, struct pt_regs *regs, __u64 *data) +#else static int lttng_uprobes_event_handler_pre(struct uprobe_consumer *uc, struct pt_regs *regs) +#endif { struct lttng_uprobe_handler *uprobe_handler = container_of(uc, struct lttng_uprobe_handler, up_consumer); @@ -200,11 +205,19 @@ error: } +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,13,0)) +static +int lttng_uprobes_add_callsite(struct lttng_uprobe *uprobe, + struct lttng_kernel_abi_event_callsite __user *callsite, + int (*handler)(struct uprobe_consumer *self, struct pt_regs *regs, __u64 *data), + void *priv_data) +#else static int lttng_uprobes_add_callsite(struct lttng_uprobe *uprobe, struct lttng_kernel_abi_event_callsite __user *callsite, int (*handler)(struct uprobe_consumer *self, struct pt_regs *regs), void *priv_data) +#endif { int ret = 0; struct lttng_uprobe_handler *uprobe_handler;