From patchwork Tue Jan 28 15:29:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Masami Hiramatsu (Google)" X-Patchwork-Id: 13952647 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CA0451A9B3C; Tue, 28 Jan 2025 15:29:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738078184; cv=none; b=igjjJDMG28JNEjR0wonxqTdvS2kgYcEnHF1zKhrc+rXIGTziCSYZKiPr/znMS69H25NdkkOSaJub4ZHwAz72IuJGVr2AAEKSE62jgkxhE8nwjvb4KQCCfWUtglVcQtwutFLzrQK4wtc3K7VDnh9lzDTxo36K79jyJdIzYGe6pfA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738078184; c=relaxed/simple; bh=E/5O05Bc7J6h133K9M/P8YXXz8k0LwjfSLaX2RCm+V8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ISbmOfO9/Q0SC8TJf+oImmpKRhOEbOTi4IgTxY0NQ4nxet50T0p5xvXPj2Cyh2R6mCdaVLHX+Zy7LrrvGi/Y0j8WFeH/RqMAMU2QLZdxJWsdOiY/OyFMBK8EmIpXYItEtTL0hZ7AX5Qx016veDYFP8lylw/0dWLTR2ytncJaKI8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=of6z6BSZ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="of6z6BSZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C9A26C4CEDF; Tue, 28 Jan 2025 15:29:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1738078183; bh=E/5O05Bc7J6h133K9M/P8YXXz8k0LwjfSLaX2RCm+V8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=of6z6BSZ+dT83xgkWUvnDzqC30ynuE9dlkPtB9DN9TI4kaH5xqBmpcL9RgkI8o9TA LKnaeAFl2dj/klNRplxgq1yV7RYLaRT9Uy2+xD8ZaiM2TWHKpKeppaH1rQA+kssE/h 8kUpDW9xsgbr+2EdWYhVWZPspzqP9LzXegNKTdvP9yssYv7RSVkBXMAv88HhNh4qxN tXG8ftNHMN55G+IhXC6f08B0GGdjqx/s8oXm+uDUsP6AGhApxJglVE90Fz+r6pHCl1 EnU41PEUgeLl1xLl0FRefif5WyKpQqg1kAUArGZGuaLhix1yDFx8qIYP2oNQOPO+cm EQk9JUPOMfIBw== From: "Masami Hiramatsu (Google)" To: Steven Rostedt , Heiko Carstens , Sven Schnelle Cc: Jiri Olsa , Masami Hiramatsu , Mark Rutland , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Andrii Nakryiko , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-s390@vger.kernel.org, bpf Subject: [PATCH 1/2] s390: fgraph: Fix to remove ftrace_test_recursion_trylock() Date: Wed, 29 Jan 2025 00:29:37 +0900 Message-ID: <173807817692.1854334.2985776940754607459.stgit@devnote2> X-Mailer: git-send-email 2.43.0 In-Reply-To: <173807816551.1854334.146350914633413330.stgit@devnote2> References: <173807816551.1854334.146350914633413330.stgit@devnote2> User-Agent: StGit/0.19 Precedence: bulk X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Masami Hiramatsu (Google) Fix to remove ftrace_test_recursion_trylock() from ftrace_graph_func() because commit d576aec24df9 ("fgraph: Get ftrace recursion lock in function_graph_enter") has been moved it to function_graph_enter_regs() already. Reported-by: Jiri Olsa Closes: https://lore.kernel.org/all/Z5O0shrdgeExZ2kF@krava/ Fixes: d576aec24df9 ("fgraph: Get ftrace recursion lock in function_graph_enter") Signed-off-by: Masami Hiramatsu (Google) Tested-by: Jiri Olsa Tested-by: Ihor Solodrai --- arch/s390/kernel/ftrace.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/arch/s390/kernel/ftrace.c b/arch/s390/kernel/ftrace.c index c0b2c97efefb..63ba6306632e 100644 --- a/arch/s390/kernel/ftrace.c +++ b/arch/s390/kernel/ftrace.c @@ -266,18 +266,13 @@ void ftrace_graph_func(unsigned long ip, unsigned long parent_ip, struct ftrace_ops *op, struct ftrace_regs *fregs) { unsigned long *parent = &arch_ftrace_regs(fregs)->regs.gprs[14]; - int bit; if (unlikely(ftrace_graph_is_dead())) return; if (unlikely(atomic_read(¤t->tracing_graph_pause))) return; - bit = ftrace_test_recursion_trylock(ip, *parent); - if (bit < 0) - return; if (!function_graph_enter_regs(*parent, ip, 0, parent, fregs)) *parent = (unsigned long)&return_to_handler; - ftrace_test_recursion_unlock(bit); } #endif /* CONFIG_FUNCTION_GRAPH_TRACER */ From patchwork Tue Jan 28 15:29:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Masami Hiramatsu (Google)" X-Patchwork-Id: 13952648 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D9CC51A8F61; Tue, 28 Jan 2025 15:29:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738078195; cv=none; b=j/YtMATzRkwRwyRRQeWWnRsgNn8YQEsnPO5As3ivh3bCe551JSJefyfDo6ihFBMisdIK0w1BaP/SeRbtiMCbGmru3rXR6VxWp7Ej6MG1mhcCpd2J+4taeK6a0d6SZ586xgzBQxQk6nVF9Vf8VNQms+vg+tx94KqvtAGaHX/nz18= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738078195; c=relaxed/simple; bh=0c2LE7rOoVqLrtfbqVXdQvbhQkkgLhZuKApxToWAa1g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=IAnCvRV3Ea2bol7HB4UhmCqHuvjvZuwePyarXL9GzGL7tiryJ+s0jNH5zpEo0n+PTFWt0TsAg5uLG1hm/ZTwTLRfc4EY2WIYyVLL3QH0fZOescJneOqnEgcqR8wTomCOcGim4xp+1QCZX3JL/kEWU7vzdlQZEl809dZvNou8icY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Wscfs6p1; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Wscfs6p1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 627C0C4CED3; Tue, 28 Jan 2025 15:29:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1738078194; bh=0c2LE7rOoVqLrtfbqVXdQvbhQkkgLhZuKApxToWAa1g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Wscfs6p1WhOpKKpZKZr+MJ+8jx7Acvu4RDw4jCVYS0srs+X5s9we617IxhFMyr1qu 6eTOEH7yqGvtxGzYVA40D0aMIgyTgBIbWSyiQgzTtsi7cvQMnTmVz5enE8rat3yYpp IOvJOzZk/yGg5zF3m7UqEEdJWLu9ZqMlNuSxJei3o3htTm/YCbt22m87IoeCLf/OVJ 4CyjUn0wHRZ7iPsmAER9zaQ/Ibti2SJB2F0xK2t2+ZzYmZ7sTizWFRvGLhSGnQVAOS Pym7Pn4f4sKv4tDsHW4etW9HWPKf9ODYbdy3AyJmx+o444c1160ABg9pLL11q6sIiN yLzC6xg63fCmQ== From: "Masami Hiramatsu (Google)" To: Steven Rostedt , Heiko Carstens , Sven Schnelle Cc: Jiri Olsa , Masami Hiramatsu , Mark Rutland , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Andrii Nakryiko , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-s390@vger.kernel.org, bpf Subject: [PATCH 2/2] s390: tracing: Define ftrace_get_symaddr() for s390 Date: Wed, 29 Jan 2025 00:29:48 +0900 Message-ID: <173807818869.1854334.15474589105952793986.stgit@devnote2> X-Mailer: git-send-email 2.43.0 In-Reply-To: <173807816551.1854334.146350914633413330.stgit@devnote2> References: <173807816551.1854334.146350914633413330.stgit@devnote2> User-Agent: StGit/0.19 Precedence: bulk X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Masami Hiramatsu (Google) Add ftrace_get_symaddr() for s390, which returns the symbol address from ftrace's 'ip' parameter. Signed-off-by: Masami Hiramatsu (Google) --- arch/s390/include/asm/ftrace.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/s390/include/asm/ftrace.h b/arch/s390/include/asm/ftrace.h index a3b73a4f626e..185331e91f83 100644 --- a/arch/s390/include/asm/ftrace.h +++ b/arch/s390/include/asm/ftrace.h @@ -51,6 +51,7 @@ static inline unsigned long ftrace_call_adjust(unsigned long addr) { return addr; } +#define ftrace_get_symaddr(fentry_ip) ((unsigned long)(fentry_ip)) #include