Files
linux/lib
Martin Kaiser 16bb361f48 maple_tree: fix tracepoint string pointers
commit 91a5409002 upstream.

maple_tree tracepoints contain pointers to function names. Such a pointer
is saved when a tracepoint logs an event. There's no guarantee that it's
still valid when the event is parsed later and the pointer is dereferenced.

The kernel warns about these unsafe pointers.

	event 'ma_read' has unsafe pointer field 'fn'
	WARNING: kernel/trace/trace.c:3779 at ignore_event+0x1da/0x1e4

Mark the function names as tracepoint_string() to fix the events.

One case that doesn't work without my patch would be trace-cmd record
to save the binary ringbuffer and trace-cmd report to parse it in
userspace.  The address of __func__ can't be dereferenced from
userspace but tracepoint_string will add an entry to
/sys/kernel/tracing/printk_formats

Link: https://lkml.kernel.org/r/20251030155537.87972-1-martin@kaiser.cx
Fixes: 54a611b605 ("Maple Tree: add new data structure")
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Acked-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-11-24 10:37:42 +01:00
..
2024-12-12 18:26:32 +01:00
2025-03-16 22:30:49 -07:00
2025-04-11 17:32:38 -07:00
2025-04-11 17:32:37 -07:00
2024-07-12 16:39:53 -07:00
2024-02-01 13:06:40 +01:00
2023-02-02 22:50:01 -08:00
2023-02-02 22:50:01 -08:00
2025-07-08 19:11:57 -04:00
2025-03-25 10:18:31 -03:00
2025-01-12 20:21:15 -08:00
2025-06-30 09:31:57 -07:00
2025-01-14 19:45:35 +01:00
2024-10-14 16:33:24 -05:00
2023-10-16 12:44:06 -04:00
2022-10-03 17:34:32 -07:00
2025-03-17 12:17:00 -07:00
2025-05-11 17:54:04 -07:00
2024-02-15 12:17:28 -05:00
2025-07-09 22:42:05 -07:00
2025-03-25 10:18:31 -03:00
2025-08-02 12:01:41 -07:00
2024-12-09 13:48:29 -08:00
2025-08-02 12:01:37 -07:00