From: Kienan Stewart Date: Wed, 22 Jan 2025 15:10:53 +0000 (+0000) Subject: Fix: uprobe consumer handler signature changed in Linux 6.13.0-rc1 X-Git-Tag: v2.13.17~3 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=1ff0eb56750c2e35560170b33b5ba02685093805;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/probes/lttng-uprobes.c b/src/probes/lttng-uprobes.c index 5be83cdb..a2e29c5d 100644 --- a/src/probes/lttng-uprobes.c +++ b/src/probes/lttng-uprobes.c @@ -24,8 +24,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); @@ -201,11 +206,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;