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 86BC0C6FD1F for ; Wed, 22 Mar 2023 18:27:13 +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=KhByq2kOFC9nCm4DjOKG9iKd8p7vv1dCbCozMSi7V7o=; b=GlFmzHIxzGfztD aJjbqdXznybrguVprAz0tgUYt1OPnATiy+gTLsj89wF7HvPSXDQzJmkqEMxzeVZptWyLUP58E8HUd HHafP16jzkxdbQURkFjl7UQMHEMQGBijP4jmBcrqSUhsNser/cThr025/hDQb2cv2SvGxHYdNd2DT IfKZeCxOYx4iy77PTUNxJFLOE950T1oH+0TTKDwA4taz7OnKf4g9vvDcNpRanzDxzxK9ubXL4k9Lh hrVPnAMQD7L6w1NrXXZEPQl32GvGtcR8aOj6X9xwFQEcM9viMhOqTsYcM/1l7hQXG845Wm3Ef3UpS BZ9RkQ4D9lUoM5iGRRog==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pf3AI-00H0zb-0d; Wed, 22 Mar 2023 18:26:26 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pf3AF-00H0yQ-0n for linux-arm-kernel@lists.infradead.org; Wed, 22 Mar 2023 18:26:24 +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 BE0DEB81D9E; Wed, 22 Mar 2023 18:26:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7423C433D2; Wed, 22 Mar 2023 18:26:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679509580; bh=CNp6XvgesRx5FTnJf4WjIyqASMOSmavUiGLUcOYLzso=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RvQKIcTFfZK63U9V7DUJe46dhC1GCCLr2F2jPTZzLZY7J0DxnFPRjCPynY75AhixD lH+8Pr4UfvBKblvicGrsVIoXbwfrVAU0s43W1jn+o0AY5gsKxcWjfzuh5Z9CBZwmmw tacWhoRTrfiZYbIFze8TFaN2P2Us4icLJgBUbrWjTWem/Ziw8CEtszTL+XiUYGYJv7 BsP+B0oF/Lj1FZwZJqUCmzJBKV1y28cI/R6G6CKVnqIfk4OfQTOLQ5AlXfTDGyXz4/ 0598mKJlgvN7E5S27seBH/wkMN1+y279EKja7AzCALguGG1fOPGMYTUWz7piz7w5Lt eAjX0Ugz50xMg== Date: Wed, 22 Mar 2023 11:26:17 -0700 From: Josh Poimboeuf To: Peter Zijlstra Cc: Mark Rutland , x86@kernel.org, linux-kernel@vger.kernel.org, Jason Baron , Steven Rostedt , Ard Biesheuvel , Christophe Leroy , Paolo Bonzini , Sean Christopherson , Sami Tolvanen , Nick Desaulniers , Will McVicker , Kees Cook , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 08/11] arm64/static_call: Fix static call CFI violations Message-ID: <20230322182617.eyfphw4o2tm5yqi2@treble> References: <3d8c9e67a7e29f3bed4e44429d953e1ac9c6d5be.1679456900.git.jpoimboe@kernel.org> <20230322141933.GD2357380@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230322141933.GD2357380@hirez.programming.kicks-ass.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230322_112623_430689_FDD86C82 X-CRM114-Status: GOOD ( 17.37 ) 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 Wed, Mar 22, 2023 at 03:19:33PM +0100, Peter Zijlstra wrote: > On Wed, Mar 22, 2023 at 12:22:07PM +0000, Mark Rutland wrote: > > On Tue, Mar 21, 2023 at 09:00:14PM -0700, Josh Poimboeuf wrote: > > > > +++ b/arch/arm64/include/asm/static_call.h > > > @@ -0,0 +1,29 @@ > > > +/* SPDX-License-Identifier: GPL-2.0 */ > > > +#ifndef _ASM_ARM64_STATIC_CALL_H > > > +#define _ASM_ARM64_STATIC_CALL_H > > > + > > > +/* > > > + * Make a dummy reference to a function pointer in C to force the compiler to > > > + * emit a __kcfi_typeid_ symbol for asm to use. > > > + */ > > > +#define GEN_CFI_SYM(func) \ > > > + static typeof(func) __used __section(".discard.cfi") *__UNIQUE_ID(cfi) = func > > > + > > > + > > > +/* Generate a CFI-compliant static call NOP function */ > > > +#define __ARCH_DEFINE_STATIC_CALL_CFI(name, insns) \ > > > + asm(".align 4 \n" \ > > Should this ^ be: > > __ALIGN_STR "\n" \ Ah right, you did mention that before. Will do. -- Josh _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel