From patchwork Mon Mar 11 09:15:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13588401 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2E500C5475B for ; Mon, 11 Mar 2024 09:16:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+CPW0zr5OAEosT+gkaB8qohpOW9Zu0C7Ug8MgBC9BMc=; b=hqV0AQCfh2Jc8C +m4qM3nfAjWcVIyF4neVJBg9OAwxs/8RQ1qGop4/LayXQZMBtgj7GRBrQqLo1Etbz8ui4Yj/dIxdy bJIPKTQnhKiEhuO03g6bSUI//KKCUeYgA/YHF5G0twbCfTvL9Cs6WYrMiW0saZbpyJO/p1gfYe/1x gEcB4rEIYYWrkYDBSs1QK1mRriGvOUgJh7Muns9/cddrqPhedU+YR+CGxxrR3ahhW4M0qKbtNVf3T cDCwIGXD+K2IWNkzPa8YS5iGt2vCZwpVazXkWJcmEt/8Z+c9icfIwAealZfZpvgh4mqTo+LWd6eU4 uoVR6CCY6Rim8A3THVIA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rjblO-00000000mff-0qn5; Mon, 11 Mar 2024 09:16:06 +0000 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rjbl9-00000000mUH-2Dvr for linux-arm-kernel@lists.infradead.org; Mon, 11 Mar 2024 09:15:54 +0000 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a462a1b7754so66414466b.2 for ; Mon, 11 Mar 2024 02:15:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710148550; x=1710753350; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=t7VN7dAxY/atiKl1Kg9VLJc8sP0Tkd5ODVxcz6HIAw0=; b=uEdn3iipn8q0kWTee8w6RK0q6ESXHparvlJPO421AImHu2vsg2/X5vP3aAnc7JHbsZ 7kSWGuMLbfShyO323Zuwm/tii6+X4gjHutZmSiOvpf+sKoJ1W+eviBhLUTtSn7RCKW3m t9dQ5ymjFXcUYV+BLmSg3w41EN9bOahFCSYOKGBhz5g9YYzUcJtVySufTu3R/QOo6Gif /XDCPId21qBAjT37E7c1ebTbufTlfR/hMhshl6f30qyidq+06zRKP/PWt4pobvLd29RZ +mU8u94T3PjiKJshNwIEO30SalKI2GevaDGXhxgNu79KJipucwmjSrmA1F0pdrgAuWht kf1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710148550; x=1710753350; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=t7VN7dAxY/atiKl1Kg9VLJc8sP0Tkd5ODVxcz6HIAw0=; b=dTFS5eVf4YrJ26o1viL35nUZRdcP9Ch7eQkiUZkj7/i88E9nSnRm+pLq2xWz60Lgu7 0cIuDsR15XqYUgz79W/yb+JvhB8HX5Q27ozf6JILVcjf9P51NkXmwXoCxGJhaV46A1Hs pIk1WhVZVDs8wpXoluMCQ7VmdsckUCM9x7cOxwfG0DDfRd+WFgCzPnyk8maiJHc8u883 Bck5v6ivSXpV//BKFh3990uYx+957WBGqKCaSzucb1kg50a3MVnuKuuHtgoAyImw+rTQ n0s/AFUzErQdIwwOnISnNzSvNRdmdg3mQB7OfzgkyyLF4TFEak8qj54U1KCICW9WN3QW pWkw== X-Gm-Message-State: AOJu0Yy+H7abNML/e0xY+auEYqLPZWJwQAuBML41PdCa7w2a936G+oEg 2L27MkOBJd35JNxPWUISKyeSP+9xl+WIfzs+XSMQeHoaeyWEZYd93YdLQq8uPag= X-Google-Smtp-Source: AGHT+IGs6MpU+OJdf17qXIWc5gk5kFevP1w8nstqMmBURQruw+S+ldJXmahriXpzUE/kIpVAuq56Rg== X-Received: by 2002:a17:907:d041:b0:a46:1cd4:cb49 with SMTP id vb1-20020a170907d04100b00a461cd4cb49mr2430183ejc.48.1710148550112; Mon, 11 Mar 2024 02:15:50 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id js23-20020a170906ca9700b00a4617f1ccf3sm1601256ejb.169.2024.03.11.02.15.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 02:15:49 -0700 (PDT) From: Linus Walleij Date: Mon, 11 Mar 2024 10:15:45 +0100 Subject: [PATCH v3 8/9] ARM: ftrace: Define ftrace_stub_graph MIME-Version: 1.0 Message-Id: <20240311-arm32-cfi-v3-8-224a0f0a45c2@linaro.org> References: <20240311-arm32-cfi-v3-0-224a0f0a45c2@linaro.org> In-Reply-To: <20240311-arm32-cfi-v3-0-224a0f0a45c2@linaro.org> To: Russell King , Sami Tolvanen , Kees Cook , Nathan Chancellor , Nick Desaulniers , Ard Biesheuvel , Arnd Bergmann Cc: linux-arm-kernel@lists.infradead.org, llvm@lists.linux.dev, Linus Walleij X-Mailer: b4 0.12.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240311_021553_004505_E9DEB19E X-CRM114-Status: GOOD ( 10.94 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Several architectures defines this stub for the graph tracer, and it is needed for CFI, as it needs a separate symbol for it. The trick from include/asm-generic/vmlinux.lds.h to define ftrace_stub_graph to ftrace_stub isn't working when using CFI. Commit 883bbbffa5a4 contains the details. Signed-off-by: Linus Walleij --- arch/arm/kernel/entry-ftrace.S | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/kernel/entry-ftrace.S b/arch/arm/kernel/entry-ftrace.S index 3e7bcaca5e07..bc598e3d8dd2 100644 --- a/arch/arm/kernel/entry-ftrace.S +++ b/arch/arm/kernel/entry-ftrace.S @@ -271,6 +271,10 @@ ENTRY(ftrace_stub) ret lr ENDPROC(ftrace_stub) +ENTRY(ftrace_stub_graph) + ret lr +ENDPROC(ftrace_stub_graph) + #ifdef CONFIG_DYNAMIC_FTRACE __INIT