[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251030193206.22bb773e697b6cc385d5aa67@linux-foundation.org>
Date: Thu, 30 Oct 2025 19:32:06 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Martin Kaiser <martin@...ser.cx>
Cc: "Liam R . Howlett" <Liam.Howlett@...cle.com>,
 maple-tree@...ts.infradead.org, linux-mm@...ck.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] maple_tree: fix tracepoint string pointers
On Thu, 30 Oct 2025 16:55:05 +0100 Martin Kaiser <martin@...ser.cx> wrote:
> 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.
Oh.
> 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.
> 
> ...
>  
> -	trace_ma_op(__func__, mas);
> +	trace_ma_op(TP_FCT, mas);
>
What could cause the storage for __func__ to disappear as you suggest?
Powered by blists - more mailing lists
 
