From patchwork Thu Mar 7 14:22:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13585778 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 A0DC6C54E49 for ; Thu, 7 Mar 2024 14:22:56 +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=S+PJ30r+OI1Ykc ptYxyiUpBiNNpiqEKB5y82raX6uh8H8tKUf9pulkDL1v3ovUWwYi9R6DjmypzqpqsYJVCogdrkZCs qBP57cGj+CIpUefKnIFJdhMZHUZ3PrjwgQ1z2cz9LIx85cjfDnfx0YVeI8YChBlGXVARRrVXR0OSd tdkIoCZ+uShhYKsvgQLR+AcUAay7KpoHOCdNPHi3F0Wa76iIKCU/5rkLHdSRvFd0oWf2tgO3NnrqO 31SvucpVxaZDcch9sH/WvZYGd1ogDtWrLy35WSCUzaWta3RWsLzoW09MfM1YEF2GPItrT9aLAZJ3p bKf3C+5u3O2GV0hlj1Dw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1riEdu-000000051Yf-3rhr; Thu, 07 Mar 2024 14:22:42 +0000 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1riEdT-000000051Co-3nhc for linux-arm-kernel@lists.infradead.org; Thu, 07 Mar 2024 14:22:17 +0000 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-5134d7e16a8so783002e87.3 for ; Thu, 07 Mar 2024 06:22:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709821334; x=1710426134; 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=PVjetRkHXomfzbvjw/a3Yk3jcIMqleMT/OiQ4kHUO8gGgLziCnp6t/jewPerGhjPG9 p7D8oKx+SnvAsGQBPKuCdDJ7xTMma4C4cARMBje3iQyiSWq67hCBweEz6gsS2tWI+rG8 hj1rXwsOWJZw3Ks/clM8nspkNKxGdQHqpAWVV+LSdAZEU/mhupUqSty1RE2sUppByxCO C3amDFM5nBfWpLYE94BXIml0pDCSy20miBYNRfclLbkqQFMfKZ3t107TE8HPgG6j8Gid VjBqp6c7OGYP4YradN+jPLXFo77UWO3WXjPWfqM5kTFt43/T54AEEdnYdlZQm0cw7zf/ NaMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709821334; x=1710426134; 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=pIbjdI4nOmlmh9Npvk7WILo2Yrn0kHwnYeOXfIBb3JFV9mgqsxkGJGWZVzjsmlw5kb ISqBZeYXKXgZ7oKZg5s7SwUneF217lsECQBZQRj4W7q3eMRSRmuh77kHpyp7lPH2JnEf pvPORbDDVy6TmYjGi9/QNgHifVg+QRtFGsW2FsvbNv2ewPR4w3txmKDgIuwEbYxRvWTa uztHQ8V7GmYWc/Q4TSAvxlQsMQ+vwZJTKZ4ysJSQb0DNfJmuHsXgQPSZQxdvLQer2pXy Q9qn9xZqTk/Oe8huxxFQoaZooD/+mBF+H/60/Ab7UNEWjEWhdvr+T+0NkJa8lVTtxNqk xLkw== X-Gm-Message-State: AOJu0YzdUZpv5iyafmgVZ0M418uZ0ILwt5ak8M/y+x+xeZw6nxcOQ2ON c3P+o2sa1GFgDRJSFfPma3oD3HsUBB1r0WqvDyHQvgdBRbTT/rnv/RHJzoFu9FY= X-Google-Smtp-Source: AGHT+IGuVdEctc6eZaqVDqgJkOSPcRt7FloO7oS7Ik9PTreXsBbLelwTC+GMVqluqHoE3YBWXS+GEQ== X-Received: by 2002:a05:6512:1107:b0:513:df6:dcd3 with SMTP id l7-20020a056512110700b005130df6dcd3mr2367653lfg.48.1709821333814; Thu, 07 Mar 2024 06:22:13 -0800 (PST) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id x11-20020a19e00b000000b005133b381a5csm2417137lfg.90.2024.03.07.06.22.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 06:22:13 -0800 (PST) From: Linus Walleij Date: Thu, 07 Mar 2024 15:22:07 +0100 Subject: [PATCH v2 8/9] ARM: ftrace: Define ftrace_stub_graph MIME-Version: 1.0 Message-Id: <20240307-arm32-cfi-v2-8-cc74ea0306b3@linaro.org> References: <20240307-arm32-cfi-v2-0-cc74ea0306b3@linaro.org> In-Reply-To: <20240307-arm32-cfi-v2-0-cc74ea0306b3@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-20240307_062216_038805_75E6FD25 X-CRM114-Status: GOOD ( 11.13 ) 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