From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796382767; b=PwambojQA7XwybkjwQYTpEHNYb+ErvsScKbKs7+VZyc6oWB4jQN+SoN3YV7tWepwbsQ3 2qzK05JPfk7e6ZcWUueVBmLhUiw4b6JHMmcANyFr/fNJG7WZBfFWZur6G1GuhQB6HNvtf H0SJB7zI8Rfpd6PPdG+C1kwYetJ3cMZWXnUGGOLawG4qmub5zXG9K40A31XYR3VOBcHDk F6mB0A2UJ6AkYnAfBNxowUhfFnP8QrtuXMXtPD6urSyJNYrzS8vGfC061aT5orrzKg7t+ lUfFFV1KEhyj1XNsk2jab7xVfCQY7h/Ni4OuBMXBAXh8oPc/FJV/CUWseXr8slQPWFQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796382767; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=zCz9iWnRo0sAod0OPeGeDpMWQZKl0He+7kLVTFeYdy4=; b=ula4hhRGJQC5SgrCHnq2ZJccb8/79cbsvb90T46h+JttDoH1AV9XwxnPDwvYLygydn1P BBokPjCqwoJiFEqFWLbRwvRGJ63fIdQIarMVd4VYLdDpep6miTj+GETfKHhDc4eMSfDHh JZgchQUC42cYm279Y1yW3tZVzCiPN4/TQa6donXLQhVLEOLfUepMeo68LPZcriX91m2dx +QNOn4ijeVZWMYMfnYP8R3YakOKwGOn3+tphweKFEuNrVF8Aq7kwzRlucGprWwua9oH3o B/ETRoy3Tm37JumgWQqrSLiyGnkdFQA2QIlGXHvbNkWdVt9jgxZ9mrh1IwEPKoD21dA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=Vq0slzn6; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C5EDE606A68B; Fri, 4 Dec 2026 11:12:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=Vq0slzn6 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D30031F00A2D; Fri, 4 Dec 2026 11:12:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796382767; bh=zCz9iWnRo0sAod0OPeGeDpMWQZKl0He+7kLVTFeYdy4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Vq0slzn6xyQ6127cDnP3PxYW7Cxaa3S2a1OBR8rwFGiS2XMQOvCu75yX+z2t6yUo0 wm988b7sCMkUahfCuVRoHGgEXvcahmUEcgaLv7vv1eI8f85zAbW4mDIzDvqux1FRlX btK/oEOd9ePoQIklJjFEyhm6v+NAjhnc2egkWM+U= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Steven Rostedt , David Carlier Subject: [PATCH 6.18 594/703] tracing: Ignore .function on the function trace event Date: Fri, 4 Dec 2026 19:08:13 +0900 Message-ID: <20261204100643.551368557@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100627.522266145@linuxfoundation.org> References: <20261204100627.522266145@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: David Carlier commit 56ce4ed6316cae9536ea891d6686b92f1d930c00 upstream. For the function event, parse_pred() handles the .function suffix before the ftrace_event_is_function() case, so "ip.function == schedule" builds a predicate with no regex. Setting it through perf then dereferences the NULL pred->regex in ftrace_function_set_filter_pred(). The "ip" field of that event already takes a function name, so ignore the suffix there and let the function event case handle it. Cc: stable@vger.kernel.org Fixes: cfb58e278c6a ("tracing/filters: Dynamically allocate filter_pred.regex") Link: https://patch.msgid.link/20261119080139.131834-1-devnexen@gmail.com Suggested-by: Steven Rostedt Signed-off-by: David Carlier Signed-off-by: Steven Rostedt Signed-off-by: Greg Kroah-Hartman --- kernel/trace/trace_events_filter.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/kernel/trace/trace_events_filter.c +++ b/kernel/trace/trace_events_filter.c @@ -1722,7 +1722,9 @@ static int parse_pred(const char *str, v /* See if the field is a kernel function name */ if ((len = str_has_prefix(str + i, ".function"))) { - function = true; + /* Ignore if event is already a function */ + if (!ftrace_event_is_function(call)) + function = true; i += len; }