]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.1-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Dec 2024 09:08:11 +0000 (10:08 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Dec 2024 09:08:11 +0000 (10:08 +0100)
added patches:
tracing-kprobes-skip-symbol-counting-logic-for-module-symbols-in-create_local_trace_kprobe.patch

queue-6.1/series
queue-6.1/tracing-kprobes-skip-symbol-counting-logic-for-module-symbols-in-create_local_trace_kprobe.patch [new file with mode: 0644]

index 8f12b003126811c119a7c2e640f0e7e2a786ddb3..291ce0f5fafc33083faafff53ad08ebf4708dd5d 100644 (file)
@@ -65,3 +65,4 @@ bluetooth-iso-fix-recursive-locking-warning.patch
 bluetooth-sco-add-support-for-16-bits-transparent-vo.patch
 blk-iocost-avoid-using-clamp-on-inuse-in-__propagate.patch
 bpf-sync_linked_regs-must-preserve-subreg_def.patch
+tracing-kprobes-skip-symbol-counting-logic-for-module-symbols-in-create_local_trace_kprobe.patch
diff --git a/queue-6.1/tracing-kprobes-skip-symbol-counting-logic-for-module-symbols-in-create_local_trace_kprobe.patch b/queue-6.1/tracing-kprobes-skip-symbol-counting-logic-for-module-symbols-in-create_local_trace_kprobe.patch
new file mode 100644 (file)
index 0000000..4d76d38
--- /dev/null
@@ -0,0 +1,42 @@
+From kniv@yandex-team.ru  Tue Dec 17 09:59:08 2024
+From: Nikolay Kuratov <kniv@yandex-team.ru>
+Date: Mon, 16 Dec 2024 14:19:23 +0300
+Subject: tracing/kprobes: Skip symbol counting logic for module symbols in create_local_trace_kprobe()
+To: stable@vger.kernel.org
+Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Masami Hiramatsu <mhiramat@kernel.org>, Francis Laniel <flaniel@linux.microsoft.com>, Steven Rostedt <rostedt@goodmis.org>, Mathieu Desnoyers <mathieu.desnoyers@efficios.com>, Nikolay Kuratov <kniv@yandex-team.ru>
+Message-ID: <20241216111923.2547104-1-kniv@yandex-team.ru>
+
+From: Nikolay Kuratov <kniv@yandex-team.ru>
+
+commit b022f0c7e404 ("tracing/kprobes: Return EADDRNOTAVAIL when func matches several symbols")
+avoids checking number_of_same_symbols() for module symbol in
+__trace_kprobe_create(), but create_local_trace_kprobe() should avoid this
+check too. Doing this check leads to ENOENT for module_name:symbol_name
+constructions passed over perf_event_open.
+
+No bug in newer kernels as it was fixed more generally by
+commit 9d8616034f16 ("tracing/kprobes: Add symbol counting check when module loads")
+
+Link: https://lore.kernel.org/linux-trace-kernel/20240705161030.b3ddb33a8167013b9b1da202@kernel.org
+Fixes: b022f0c7e404 ("tracing/kprobes: Return EADDRNOTAVAIL when func matches several symbols")
+Signed-off-by: Nikolay Kuratov <kniv@yandex-team.ru>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+v1 -> v2:
+ * Reword commit title and message
+ * Send for stable instead of mainline
+
+ kernel/trace/trace_kprobe.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/kernel/trace/trace_kprobe.c
++++ b/kernel/trace/trace_kprobe.c
+@@ -1816,7 +1816,7 @@ create_local_trace_kprobe(char *func, vo
+       int ret;
+       char *event;
+-      if (func) {
++      if (func && !strchr(func, ':')) {
+               unsigned int count;
+               count = number_of_same_symbols(func);