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 5DE52C433F5 for ; Mon, 4 Apr 2022 09:04:28 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=bvRaBPkLMeDUh9ZpCIpPbkAJW/U+PMK8+cXUKsxFC3E=; b=vEBJFcKsshGNPT 1MANhfLrTDTGhkS7ngUOOXfzIAWT4XLgWrfyIBfm9/PATD1wRSGkTkLT5SPoYcpBtAOlO0z3pZRF1 745xE9dSbO+xP3ZhhSdBf1Zszy/etmeDjbnjeFfrA8Kh6Yw0gtrAkZ/5RCxfkgD3BrCzZWmKdAKoT 2y3hLnFgPBrXMT//b5B78WH66Qnv+73SBVtcPinULmdVDnVl1hU8z1hyxGbgXHdw8E3RxphqNPKsF b3h9NusHRdk2nLYlRc3zM5lYVSRd7iAYgX4zMfKPRv8x9VTDg/ZnGPKc4YRPNElJLntydDi9U3DPQ FwDYNMcnn6ogp9WJbogw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nbIcQ-00E1vp-G8; Mon, 04 Apr 2022 09:03:26 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nbIcM-00E1rA-3m for linux-arm-kernel@lists.infradead.org; Mon, 04 Apr 2022 09:03:23 +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 sin.source.kernel.org (Postfix) with ESMTPS id 23633CE13BF; Mon, 4 Apr 2022 09:03:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9D3D7C340F3; Mon, 4 Apr 2022 09:03:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649062995; bh=bc9dhJ25NRgwnJv552m6vx+WUsOE7TY5Mhjhgf+DSOo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=A+mzOMUOX7/dVRw0BiZUbyGk3kEDYVlm2X9fuRp2IHwXCkNOcesJVKMgdz01b3zf3 Otp8wIOXtW6663J6Gde6vqftmjaaTHPkWIWFl0y35wVT6bKhJ1uSdNuIPZqW44srWq UEePwddtQA7Y8gcTQPqAK4IXAIPYDec8NI4paNkh85CNrpkTBw+zZ2Rjkrqqxh+6X1 TEIBycWYjt83Jo0CxZ5r0kArid12vmPnnjGxsuGMiGKtvplXwnxWwFKvG6vGSThjh9 KaYjHEHdTZl6jRXoHx1TQ0n2qdlNGfYXxYKTX/SRnuJYFFbgix5oJ1BdEtTsxc/Jgh wzfkBR39eGo4w== Date: Mon, 4 Apr 2022 10:03:09 +0100 From: Will Deacon To: Sami Tolvanen Cc: Kees Cook , Catalin Marinas , Mark Rutland , Masahiro Yamada , Nathan Chancellor , Nick Desaulniers , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH 3/3] arm64: Drop the inline assembly implementation of function_nocfi Message-ID: <20220404090309.GA22649@willie-the-truck> References: <20220401201916.1487500-1-samitolvanen@google.com> <20220401201916.1487500-4-samitolvanen@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220401201916.1487500-4-samitolvanen@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220404_020322_346665_E67B5A7B X-CRM114-Status: GOOD ( 18.95 ) 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 On Fri, Apr 01, 2022 at 01:19:16PM -0700, Sami Tolvanen wrote: > Drop the inline assembly version of function_nocfi() now that > CONFIG_CFI_CLANG depends on __builtin_function_start(), which allows > this macro to be implemented more cleanly and in a way that works also > with static initializers. > > Signed-off-by: Sami Tolvanen > --- > arch/arm64/include/asm/compiler.h | 16 ---------------- > 1 file changed, 16 deletions(-) > > diff --git a/arch/arm64/include/asm/compiler.h b/arch/arm64/include/asm/compiler.h > index dc3ea4080e2e..6fb2e6bcc392 100644 > --- a/arch/arm64/include/asm/compiler.h > +++ b/arch/arm64/include/asm/compiler.h > @@ -23,20 +23,4 @@ > #define __builtin_return_address(val) \ > (void *)(ptrauth_clear_pac((unsigned long)__builtin_return_address(val))) > > -#ifdef CONFIG_CFI_CLANG > -/* > - * With CONFIG_CFI_CLANG, the compiler replaces function address > - * references with the address of the function's CFI jump table > - * entry. The function_nocfi macro always returns the address of the > - * actual function instead. > - */ > -#define function_nocfi(x) ({ \ > - void *addr; \ > - asm("adrp %0, " __stringify(x) "\n\t" \ > - "add %0, %0, :lo12:" __stringify(x) \ > - : "=r" (addr)); \ > - addr; \ > -}) > -#endif > - > #endif /* __ASM_COMPILER_H */ Acked-by: Will Deacon Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel