From patchwork Sun Apr 21 18:28:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13637480 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 CDC62C4345F for ; Sun, 21 Apr 2024 18:29:04 +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=1lERpYS8ac+IFHXZDhuYafpNWuSAzCnHwP5KbIjLudM=; b=ImM1S/bEyaXXqM T+RME2Wu+v6G2RGfG53TTH/vv9TdtA35eingiIH7bPwGYluZcj4XG8tm52AAz9gKaivRp5roQHseI lRQVrwz2rfKLXAI7ZJcR8vGuqhYEMacRlGiCHPvPfbWpSkwUYb46V2OEQASIK2hupyFyLcm11j4df zKJVlPAts68POFZ0RSfKR0LoA7r6AAza3+RbamK9MHhizsDGp+zEdRxHQmHdIre8gnV8I4WzZ3c/T mfA6xYG8Jr8GZxaVSVSDvgDqD2YNC7ur8nmX1G3IlZJU3EuLswYMiftSLdM4JHeHtd2k3QHRNr67K wK+ADmHBGgZvpa/a6H8w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rybvq-0000000B47u-0MmH; Sun, 21 Apr 2024 18:28:54 +0000 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rybvV-0000000B40K-1clk for linux-arm-kernel@lists.infradead.org; Sun, 21 Apr 2024 18:28:35 +0000 Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-516d4d80d00so4631939e87.0 for ; Sun, 21 Apr 2024 11:28:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713724111; x=1714328911; 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=B8O1l9DG1nr6tC/T09XllcDqc2JZrTHVCm6s1PJNYaY=; b=KSv7w3yETvnsmAXRFEh3l+kCzxeu+YDVrIbmNYCNA2vfGSll1jDbkHeJaSDuE3s9nu WygsfxkRiFHPX0fOfwLkWss9W3/8PnlwE9JBms71gXw0UT4hSN+wtrVc6Z3GFgmlAxa6 hVfYX5bJwO4sZPVYsb5tuVDyDpMorbgRhzcNjpO+xAjXUkO3xjJLl5VrV6YRjFdINRdI u3KvNA1o3xnnXuwIE1YL7vHl8m5d8URL2egEte/Vbe89pZNnOFZmwaveQOMnVSDR37JK VJIa7TdgE4VhZ2xUbWYOLkKOaFTwODKzAZZfIs3KHnodOXATyVhyqWv9FMb5dSvMDw/Z k68Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713724111; x=1714328911; 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=B8O1l9DG1nr6tC/T09XllcDqc2JZrTHVCm6s1PJNYaY=; b=ijuESlN8giXxFWzDiLYbNbu9lvlJEZbtHJwyjfByxpGmw+ORE0R1kK3sGOyO2geDLz us3JOpn+P9y7ZIHjOK5a5oTxStHaTV8jLDrIVhqV7kKz7JJdXhGW6REtWLGizBLf1AXn pJ2/vmyXCj0HrmnEDyfA22jnTzEUBdDo3yY14DIQFTzPu0xmHF5+kwCO0gQC7wQTfrm1 xDmj43mq4J6dzIF2AXn3PP95D/fyV7YWs+eiPAi0R5+/UCMJST1P0z70jBD6aj3oAy1G i73YbFwJ+znVttTc5izJ+MP4fLk7bkokbymxJbOc3XzpGxXpdeq0jx5lKXb5h5TAsehy Mm8w== X-Gm-Message-State: AOJu0YxsLqFgP4MDi5a4Mhu6Z9+05uOCYVN/1sLuMkv4rpeJjisbxz/H TI1BGX9CRX5UujaWulA5gmQdmoJ86mj7qvdq9e9/vb+e+HYohFpFitfmX43TQB0= X-Google-Smtp-Source: AGHT+IGUFYUliEnd1IWACpXaMye/ynirYNYqr75NfYKj0gCPLVipXdzKt9Z42rZSYd+VATr2Qtox7Q== X-Received: by 2002:a05:6512:10c6:b0:51a:c44d:b95f with SMTP id k6-20020a05651210c600b0051ac44db95fmr6479537lfg.28.1713724111153; Sun, 21 Apr 2024 11:28:31 -0700 (PDT) Received: from [192.168.1.140] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id s14-20020a19770e000000b005188ea5d2b5sm1549641lfc.303.2024.04.21.11.28.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Apr 2024 11:28:30 -0700 (PDT) From: Linus Walleij Date: Sun, 21 Apr 2024 20:28:28 +0200 Subject: [PATCH v7 02/11] ARM: ftrace: Define ftrace_stub_graph MIME-Version: 1.0 Message-Id: <20240421-arm32-cfi-v7-2-6e132a948cc8@linaro.org> References: <20240421-arm32-cfi-v7-0-6e132a948cc8@linaro.org> In-Reply-To: <20240421-arm32-cfi-v7-0-6e132a948cc8@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.13.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240421_112833_478750_BD57F465 X-CRM114-Status: GOOD ( 10.42 ) 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. Tested-by: Kees Cook 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