From patchwork Thu Mar 28 08:19:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13608168 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 A285EC54E64 for ; Thu, 28 Mar 2024 08:20:06 +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=5pZ3EpWk7b9wLWKpAu9oqPQi0c2HbWlLUxrtozuKgv0=; b=h5SdubKnMtWO8F dFmA0MTJN5gUjSlbUpqxZTt7D4qSiQJRNPntACJfXF5tPYnDsClY5rzcufefyhgHgnW41JPT5rXew 8DVB2UIGTDzGbSS/qyHe8fxZJcijat7e/m6nOSLlDI7BRZ8tuV85w9PPNJoAMauXfQvkm2ZzOMck1 zwlYNhzbL0JPqrY6FqKv0TFM7BTytPrnCe3s00H+7Ia3t7W+8SoPpS6+qSQO20aLN7vX4hfoNIAnO 5iwZLOsGb0F6nmmV4gVzcXVOytgSbU2FzvY48zWsb0xZ4n+MHjp4Z8ZU/aeu4ZYYgrDnzw8oO5E7v aYTTqKuIiLu+5ikfOyfA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpkzK-0000000D4DV-3yYW; Thu, 28 Mar 2024 08:19:54 +0000 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpkz1-0000000D43n-0jDt for linux-arm-kernel@lists.infradead.org; Thu, 28 Mar 2024 08:19:36 +0000 Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-56c08d1e900so746156a12.3 for ; Thu, 28 Mar 2024 01:19:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711613971; x=1712218771; 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=d0w4V8x7+aGb8z229X+5uqykrw6yy++FeJfQ8uxYhY4=; b=rKXbRS4LTWSlnsyTgL/ewQgvk42Ah4W2ZFJNv6apEtw9GMlcrdVLxN/kioypuDouao SP8tMbRSQl9sCtyvnlCbK4KCqSMQ/F7Wv+PRZnTWjGrzTzLleeP+zT/eI8PzeV+t6ljF QhUxS9dxPxkNppEpzqdTYtDy0ZBGVkDXu3tbAQ8E9YcwHynj13y7g01Dd5a5QM4JmyeW aIZIlrjKnzxXer/E+96sa4DiZDzK4AabILYfhn72ntQH4LGtjHSkjNVlQC8AcLrkDBhJ HhV1Zg29y3JqiPd6Q3YWA12H91aCcI8jp9xpx3kWak6ccMvO2wZE9vAhoRRfPJJin5hm 6EZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711613971; x=1712218771; 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=d0w4V8x7+aGb8z229X+5uqykrw6yy++FeJfQ8uxYhY4=; b=lP4ato0iCIVVc7wQIuUdcKD0Z6jXnwhRSqQlMuHAs288ovCiRE7kW3rnrXUrcj4G+h q6AN5RaNmYc1fytDo6S6C29Cqf0//HVPnoGzmMjKCM2ackKWNCyctQ3sWtUZz/KSDnkU fGXLcbu98kTfjolv0SozQvGwydst8En1fEBFJFnLjGTZTke830DcFRZBG/ub2p3gXCTz TGprmZQ7hYhZrL3naMY+oTDg2jN1H78JJpgfyhAbQ2cGXTZ7cFbwas6l2PKam0yke+cT rR0EL6O8xdNnSq45bUlReG0k2Eo1HQU3tW4ovCtK2I2UuOb37wjWStpNTJgkMVmYUCUT u2Qw== X-Gm-Message-State: AOJu0Ywn9HuB0b5JK3ZifnrbjyXB6XzsZ9RxPjAXlIkPiC/4tQv6CPcY tLgbVoVYP9iVDTv/ydLsvVSwhIGetm24b2q/fJ9v6ADNHED3OCRlm6NbE9oZc4k= X-Google-Smtp-Source: AGHT+IFMuVYCIFTpoTH4bYnhvKcaeqcoow/AucoEJQ3LZDOry1RJHyX/3QSG5ycGe9YCxcyz9p1p3g== X-Received: by 2002:a50:8e16:0:b0:56c:3b7a:632b with SMTP id 22-20020a508e16000000b0056c3b7a632bmr1423714edw.29.1711613971633; Thu, 28 Mar 2024 01:19:31 -0700 (PDT) Received: from [192.168.1.140] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id n7-20020a509347000000b0056c24df7a78sm566397eda.5.2024.03.28.01.19.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 01:19:31 -0700 (PDT) From: Linus Walleij Date: Thu, 28 Mar 2024 09:19:25 +0100 Subject: [PATCH v4 2/8] ARM: ftrace: Define ftrace_stub_graph MIME-Version: 1.0 Message-Id: <20240328-arm32-cfi-v4-2-a11046139125@linaro.org> References: <20240328-arm32-cfi-v4-0-a11046139125@linaro.org> In-Reply-To: <20240328-arm32-cfi-v4-0-a11046139125@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-20240328_011935_305882_32F80EF3 X-CRM114-Status: GOOD ( 10.99 ) 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