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=1796221052; b=DTNt2y4Ke0FeIzllXeRzVcrUdw2q5MaHImBO78V6nRzqpq5UFWu5xGWuutieadL5T3Ga BZArN9fUWI7+PUZmFJOAmbxoNr7co/Yjaotf8X5bjFLG+ZjNBC2RokRQqi9Z9IcFtsQw3 9z6Hpvrtz5JMjIspuriiMz5Pa32rkSUapUPcsoJu5HBrhQnj34iqhO7Hoh+vt8jkGMMW1 u6YXohsKp5GmjqOvZnUS9uTiqcIRPtpFOtZWX0Qmc35KB1gHSeZ0HKY5/Ax/2qiF2G5FO zaZyDieujdZ+Qv9rBogl04ItBdkykM/LODuvZTDxuAUbjDYI9ct0ef+K+FO80w+OcHA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796221052; h=Received:DKIM-Signature:Subject:To:Cc:From:Date:Message-ID: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=jbPFyS7Y5hmqT33qeQE5SmZ6SL7TLYYtDpGEjxpioiQ=; b=ETWwLuJv+abpGkfYKjzmP4JkYWDUX2t7GxglN9TloMkv/ZhHzXFkQQTYym/KKQJeXXav ZK05keZw5jHEdoh7yfDcXvBpfzT0MgcgQG6p1zAwz5ZU48H3rkTu4AQXAudmqXQzhn9YQ iOV6PChm70giPbQGk+YhOCKwiWshiDP3in4/8gLxaZt2euaFgFvsXiMqkh5q3BJSTxfKW tRjFQV5WRMvDIDgO0mEZuU1/WW5Qa8HEJQRGKKbWX/wfPN90rTMRYyRGE1Dd9xqHc3bY2 fV/MwfldhgAwIPT0uKeVdSoXzMljiNBZ1BLKGPvUj+yIONV5Vgj2gLZhLHYkCZ3jkYw== 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=xB1uXo1b; 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 A6A53606A330 for ; Wed, 2 Dec 2026 14:17:32 +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=xB1uXo1b Received: by smtp.kernel.org (Postfix) with ESMTPSA id 970861F00897; Wed, 2 Dec 2026 14:17:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796221052; bh=jbPFyS7Y5hmqT33qeQE5SmZ6SL7TLYYtDpGEjxpioiQ=; h=Subject:To:Cc:From:Date; b=xB1uXo1bVnLVt5a5FCSQeXvbbsJJ/584mvaA7MtgeO3AogP8UMUSX4dUbT6d5AAMM p0ePLBrZSpn9dpKiUVn4pLuV3frYk1Xevl+Jq5ZWuzkZ3JX/xesFgp/jAac7KKWIar Ui7f5aXjH6uEfJR3Cg5hTr+a5DGrJhhLv1gtxCdo= Subject: FAILED: patch "[PATCH] fgraph: Do not mark index 0 in every shadow stack frame" failed to apply to 6.6-stable tree To: leitao@debian.org,rostedt@goodmis.org Cc: From: Date: Wed, 02 Dec 2026 14:01:32 +0100 Message-ID: <2026120232-implosion-popular-ac12@gregkh> 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-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.6-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y git checkout FETCH_HEAD git cherry-pick -x 65f42f1fa03829e0ab1473369461a7aabf525cb2 # git commit -s git send-email --to '' --in-reply-to '2026120232-implosion-popular-ac12@gregkh' --subject-prefix 'PATCH 6.6.y' 'HEAD^..' Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 65f42f1fa03829e0ab1473369461a7aabf525cb2 Mon Sep 17 00:00:00 2001 From: Breno Leitao Date: Thu, 12 Nov 2026 07:18:42 -0800 Subject: [PATCH] fgraph: Do not mark index 0 in every shadow stack frame We are seeing this warning on an arm64 host: WARNING: kernel/trace/fprobe.c:676 at fprobe_return+0x260/0x2c8, CPU#16: FuncSched/3281330 Call trace: fprobe_return+0x260/0x2c8 (P) ftrace_return_to_handler+0x2bc/0x5a8 return_to_handler+0x20/0x48 futex_wait+0xa4/0x218 do_futex+0xb4/0x1d0 __arm64_sys_futex+0x15c/0x278 The theory is that function_graph_enter_regs() sets BIT(0) in the bitmap of every frame, a leftover of an old tail-call check, while the return path calls the retfunc of every set bit. A reproducer on linux-next supports the theory. On a fresh boot, with no other fgraph user yet: cd /sys/kernel/tracing echo 'f:fpexit vfs_read%return' >> dynamic_events echo 1 > events/fprobes/fpexit/enable # fprobe_graph_ops: index 0 echo vfs_write > set_ftrace_filter echo function_graph > current_tracer # function_graph: index 1 echo x > /dev/null # WARN on vfs_write return Removing the bit was agreed in the review of the series that added it [0], but the line stayed. Drop it now. [0] https://lore.kernel.org/all/20240527093436.7060d358a64cc2ea3213b07b@kernel.org/ Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20261112-fgraph-bit0-v1-1-695ad14f4b1e@debian.org Fixes: 7aa1eaef9f42 ("function_graph: Allow multiple users to attach to function graph") Signed-off-by: Breno Leitao Signed-off-by: Steven Rostedt diff --git a/kernel/trace/fgraph.c b/kernel/trace/fgraph.c index 1d900445d23a..d1f79a85ed2e 100644 --- a/kernel/trace/fgraph.c +++ b/kernel/trace/fgraph.c @@ -698,11 +698,7 @@ int function_graph_enter_regs(unsigned long ret, unsigned long func, if (!bitmap) goto out_ret; - /* - * Since this function uses fgraph_idx = 0 as a tail-call checking - * flag, set that bit always. - */ - set_bitmap(current, offset, bitmap | BIT(0)); + set_bitmap(current, offset, bitmap); ftrace_test_recursion_unlock(bit); return 0; out_ret: