From mboxrd@z Thu Jan 1 00:00:00 1970 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 9291B30C368; Tue, 31 Mar 2026 16:34:00 +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=1774974840; cv=none; b=glYohHl7WR3XPGe9o8Xlmoi14BcGFDbC1oodZsRUF/1FsR9FkN/MjkJkhY45cUYnsaisRRTerCXz8J3yiPiZEprWsLHXVf12Iump41qUzOIDq5HE5RyIfEDJufTgc7tun2xPsnH7q2zIZF0KbHdloxhRq82jZ66LNepsSMRlnGc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774974840; c=relaxed/simple; bh=uk6Y2f4anjq2d/Dxp23jRvLuieTcpx8rs602vcXa1iU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=c2QWvZOvu6GhHZro1BYeSN4qt2XLk/i04wEKK4EzLVucf2+M7K/rBBlYE7xIW5lBlGslIKoMviPuo4lre6Gk7OjA61IVn/He7VNY22pUqHYXPaXuT1z3iMOymguNIqPre6iZkIZF/+lZSthFzxFLRK04KGLDjyu04NJ8ryymhrM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=FtXgLYqR; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="FtXgLYqR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 27169C19423; Tue, 31 Mar 2026 16:33:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1774974840; bh=uk6Y2f4anjq2d/Dxp23jRvLuieTcpx8rs602vcXa1iU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FtXgLYqR9jUUqqco2GiKQ4PHTrsLd9UutvQFq8+jI7bTABElZNr9GB0uWNzthYzbz YImhCbQLY7C/xm2/LJRLHi91Of9TD5Q/31jy4Lmcwm2qGeEb6lMHL+PrOF+ebAuEdC S9lD2Z45shIvmOfGM2eaBNRp+rNq+hEy1DnKqR+8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Hari Bathini , Venkat Rao Bagalkote , Madhavan Srinivasan , Sasha Levin Subject: [PATCH 6.19 065/342] powerpc64/ftrace: fix OOL stub count with clang Date: Tue, 31 Mar 2026 18:18:18 +0200 Message-ID: <20260331161801.287082822@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260331161758.909578033@linuxfoundation.org> References: <20260331161758.909578033@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Hari Bathini [ Upstream commit 875612a7745013a43c67493cb0583ee3f7476344 ] The total number of out-of-line (OOL) stubs required for function tracing is determined using the following command: $(OBJDUMP) -r -j __patchable_function_entries vmlinux.o While this works correctly with GNU objdump, llvm-objdump does not list the expected relocation records for this section. Fix this by using the -d option and counting R_PPC64_ADDR64 relocation entries. This works as desired with both objdump and llvm-objdump. Signed-off-by: Hari Bathini Tested-by: Venkat Rao Bagalkote Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20260127084926.34497-3-hbathini@linux.ibm.com Signed-off-by: Sasha Levin --- arch/powerpc/tools/ftrace-gen-ool-stubs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/tools/ftrace-gen-ool-stubs.sh b/arch/powerpc/tools/ftrace-gen-ool-stubs.sh index bac186bdf64a7..9218d43aeb548 100755 --- a/arch/powerpc/tools/ftrace-gen-ool-stubs.sh +++ b/arch/powerpc/tools/ftrace-gen-ool-stubs.sh @@ -15,9 +15,9 @@ if [ -z "$is_64bit" ]; then RELOCATION=R_PPC_ADDR32 fi -num_ool_stubs_total=$($objdump -r -j __patchable_function_entries "$vmlinux_o" | +num_ool_stubs_total=$($objdump -r -j __patchable_function_entries -d "$vmlinux_o" | grep -c "$RELOCATION") -num_ool_stubs_inittext=$($objdump -r -j __patchable_function_entries "$vmlinux_o" | +num_ool_stubs_inittext=$($objdump -r -j __patchable_function_entries -d "$vmlinux_o" | grep -e ".init.text" -e ".text.startup" | grep -c "$RELOCATION") num_ool_stubs_text=$((num_ool_stubs_total - num_ool_stubs_inittext)) -- 2.51.0