From mboxrd@z Thu Jan 1 00:00:00 1970 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 7FB09C433EF for ; Tue, 14 Dec 2021 15:29:34 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lW4k51oehWWmoZthp4f+L4QH9V8m8tTRd0oPCH7PU0w=; b=QSxx+6hzhGbIC8 ml27jVOBrfyXJ5dLTAMXoVcDCRUYTgDXMnm7pl8qcO1jjmeiwWpZ8PvnioPdfdcgME40zNB4f7RL7 SyOuiJyph+WTFZ0KRJ+B31cSrTDDxCqvNG7II9849J3zqWgCDO2Dw3m+voScCvsiLTtvAtr8pP4LC vs2CPq1FkXSzM15rVBR6dr0Kv90Mg/YF84G4hCL6pjw/VbkKjpU1HL+9f8nH9JFnaKxvozBfAAzM1 ZGi1zWbShAKDEPg9EV/tpPHYt08sMIwm7QZdKs+m4IcX4swnziSMU7Xkx34YN+eTZ1RSIaGK+mVRI VfYzM/EgT2HBlr4Ysb8A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mx9j2-00EfjE-QB; Tue, 14 Dec 2021 15:28:20 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mx9ik-00EfeL-Jq for linux-arm-kernel@lists.infradead.org; Tue, 14 Dec 2021 15:28:04 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 3D3C3B819D9; Tue, 14 Dec 2021 15:28:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 808C3C34605; Tue, 14 Dec 2021 15:27:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1639495679; bh=6tdyIg++as6p5dy/j2Qz8a+huMq69FWTdj+7dPua2Xs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ls0xsCeuy0lx98BACq2GytzY1jTwmDDd7AUV+bxWegLN/UvSoveJQV38E/Y0BLI2Y tRghhlsDVPm+taoYKZgKh67zF50UzgvwVvqp/cX7ZLsIy1e7c2NIuqAxlx06uScI+9 whHjYibBXB60xPZum+W8c2xwO7E0FEluQ4+P99LJPuzFVcYukIl06yD30TSOrBk4Uw i5uIMsascKstdJGvfOKTfI3cejebblGlmD/iSn6lc7rW07QZ1XV/6Z4mKYSOv/sRRn iXpZE7limp5rlwgd/kQemsBVREWHE0F2+1yopXwjgxwF2jzHg04gHjg+4R4jgZRxWh DezT3wVS+5HbA== From: Mark Brown To: Catalin Marinas , Will Deacon Cc: Mark Rutland , Ard Biesheuvel , linux-arm-kernel@lists.infradead.org, Mark Brown Subject: [PATCH v4 2/3] arm64: Unconditionally override SYM_FUNC macros Date: Tue, 14 Dec 2021 15:27:13 +0000 Message-Id: <20211214152714.2380849-3-broonie@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211214152714.2380849-1-broonie@kernel.org> References: <20211214152714.2380849-1-broonie@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1591; h=from:subject; bh=6tdyIg++as6p5dy/j2Qz8a+huMq69FWTdj+7dPua2Xs=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBhuLfP9olcgUxjFBa7UMiGvjyYjgfPblPk+oTzJRv+ c0nGuNmJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCYbi3zwAKCRAk1otyXVSH0OYuB/ 9TIgkjwaFcfVnu50xEenAakvPEcrpciDKGvCj5fxhj9pSJH+58b0sR4eUCT39tijyfN7iVvjeCb2UH mre5Ay3q1aWMdtLp2HOiofsroOy8Evk2QPP64ztgA8LXrQT6vlT76cLON3pH0jJR48BbNgRCDUA9JP fYpF3VXOxFHLqva3miVRnj+m0nUeuux0aLG7jZ75ujRE8TQPfKXiyg7PwU5V7yDjwwZ539QmMIDfx6 L0YXQOO+NKavEWC87fP1+MoY1eCM8EZMhYux+1WrZNpnfSAIbqzk2BYVdUWe6baOvSsr7nNUlxcAQV ZPt9WXtCjTDZRtBHT27q7NAVTc/Now X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211214_072802_825914_338770A4 X-CRM114-Status: GOOD ( 13.93 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Currently we only override the SYM_FUNC macros when we need to insert BTI C into them, do this unconditionally to make it more likely that we'll notice bugs in our override. Suggested-by: Mark Rutland Acked-by: Ard Biesheuvel Signed-off-by: Mark Brown --- arch/arm64/include/asm/linkage.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/arch/arm64/include/asm/linkage.h b/arch/arm64/include/asm/linkage.h index c5d0c11d7709..1cfa8bb33edd 100644 --- a/arch/arm64/include/asm/linkage.h +++ b/arch/arm64/include/asm/linkage.h @@ -8,10 +8,18 @@ #define BTI_C bti c ; +#else + +#define BTI_C + +#endif + /* - * When using in-kernel BTI we need to ensure that PCS-conformant assembly - * functions have suitable annotations. Override SYM_FUNC_START to insert - * a BTI landing pad at the start of everything. + * When using in-kernel BTI we need to ensure that PCS-conformant + * assembly functions have suitable annotations. Override + * SYM_FUNC_START to insert a BTI landing pad at the start of + * everything, the override is done unconditionally so we're more + * likely to notice any drift from the overridden definitions. */ #define SYM_FUNC_START(name) \ SYM_START(name, SYM_L_GLOBAL, SYM_A_ALIGN) \ @@ -37,8 +45,6 @@ SYM_START(name, SYM_L_WEAK, SYM_A_NONE) \ BTI_C -#endif - /* * Annotate a function as position independent, i.e., safe to be called before * the kernel virtual mapping is activated. -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel