Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1037574imw; Wed, 13 Jul 2022 12:34:37 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tAvDJp+XamvIxFPOR8HOSqoegzDv1tZ9kSh9rwVxWxUOZ+T2qUtY6Bdfvvz+s2NO41dLau X-Received: by 2002:a05:6a00:a0c:b0:528:5233:f119 with SMTP id p12-20020a056a000a0c00b005285233f119mr4759964pfh.69.1657740877202; Wed, 13 Jul 2022 12:34:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657740877; cv=none; d=google.com; s=arc-20160816; b=zr028LXqhydheOCmov6ZW5rkLmdrqkeq5eBWekS61rtyQJj9QclthFQoTp0L6R78Z7 gDYcFvyC59MLtWxf4X1KmXD0BscT3RxEc4Okz9dZKF4tc2yg03bGQlO7Za9SoZh4ULYM lg6ewXp2Wz2i7Nzfx3TdAD/FNLl6Fq9SUo/xvC0Kno04f9VSVKkjaHM8PTp2MCbMa6Ct EQXJoXQCGPfyqjhuvLyP99k3Ab3eXO48fjNa/37RzXxKDQy1hB0aHJT4+VbV76T64YU6 Vpa0fE/SeXjinOH9/yMa0IjZ7ffKqqBlQ4ZHcTs++2SohZqpHni/maizhH2Kn2jPSyk6 SaZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=6WniWrj3ZgV51g7LWc0uoxvElrFWWSWmqIiBeCx0TGA=; b=FfgtvWdqaOdwgr7F5M/Y9hRecB2lgPEUBdkhaZJQVGzCV9vh2axMWYmOKwC/7af+Yb HUmkXOnAAfF2hL86cm//0Dl6YxOOYOBTqPuutWgTmtpWgTk8AKWaNCZEeXYDOOyGFObm SE954Fkd0YV3xc78jKVRZavmzE6VCTNsm7vj1ZC2rpsc0VHVdnC7+rWsyYxmX2zZC9EY Ui5T4CN20ggBvfNBwFSuP4bZnUl1dfJo5tmcJ5jW2UqjJNC770MrWCNbpmnLR8MekicB pSVxDXXWZLvsg/Sm0qu4Pd4HeY/ZUxy0u89Cs9bCsh8Mz4y/IEF0Pb0mhHz1NvJHGLwA 8XJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=ftc2b3pp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q11-20020a17090a7a8b00b001ef97f43371si3239871pjf.148.2022.07.13.12.34.24; Wed, 13 Jul 2022 12:34:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=ftc2b3pp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236653AbiGMTLv (ORCPT + 99 others); Wed, 13 Jul 2022 15:11:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229604AbiGMTLu (ORCPT ); Wed, 13 Jul 2022 15:11:50 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E974F1F63D for ; Wed, 13 Jul 2022 12:11:49 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id z12-20020a17090a7b8c00b001ef84000b8bso5315393pjc.1 for ; Wed, 13 Jul 2022 12:11:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6WniWrj3ZgV51g7LWc0uoxvElrFWWSWmqIiBeCx0TGA=; b=ftc2b3pp6VR3l1NA92GZ1N4vRKA+MEjmtdqoxsl3Ilze+gmL3NDB39Xm1aCUdHFAve ViqgNdDyRFizVooQRLgGQH4tRCDVbf4YL5Uh6mby/MBunMDDoadRWmyj+YL3qrHF0ypW MkAabV2guUnjUXJVxtpso92ITWK0U905ay0RjCxncmkv0mJM8tDNb4SXV8BKG4ELjF+V lgFX2eOjqFWohepJI+Jle2fvaTfUeWje32HNTboIhc2w6V2+2S5ky6HHrX0eWNVnaMfo UpJP2oGxGfI7HhWKRl9gQIMdw38F9HGZxfy6d326Dhx08QkiR6O7njqSDrStBulkTbw+ NdSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6WniWrj3ZgV51g7LWc0uoxvElrFWWSWmqIiBeCx0TGA=; b=aaSSMc5wcWTD6BPwc2aE12frsiz/qAzd6OgI40hmrMo4KOEL/SBtW04OejysF5Wo4w S1DzAWwgiIIoquafTg27eLm0D5SsW4tm+PVfEORdPGUk25MZT2Y72ezwcbWbZzKgZ+Tp ZCVgjgDFqreyvxHElTB9ShrIvCdMXXK84JggvTmMqJwhKKR5rulR8gYlK7wNnVmOvO0w BeXgv4vo4YQnZ9q41hoR0brpQvNMyMGLX9M2ZSwKJ2I3t0rw/K1xCNexxUzxA8oQw22Q wmVwjf+SkLSEJvJ3JFjGx/DjRO/ZmixrT8ZZg98X+S2vjQuehci/Hgl7ElosaL52EejE 68dg== X-Gm-Message-State: AJIora/9BxdDE3TBXDFI02H4C/VqSoZiPXRw4MeD5FZMNLqKiwW+EdbQ Soq1Jro2aPlJ8tK32P5rOSLwwKRC2wWSx1C3y3R7Eg== X-Received: by 2002:a17:903:244d:b0:16c:5bfe:2e87 with SMTP id l13-20020a170903244d00b0016c5bfe2e87mr4671742pls.148.1657739509327; Wed, 13 Jul 2022 12:11:49 -0700 (PDT) MIME-Version: 1.0 References: <20220713173503.3889486-1-nathan@kernel.org> In-Reply-To: <20220713173503.3889486-1-nathan@kernel.org> From: Stanislav Fomichev Date: Wed, 13 Jul 2022 12:11:38 -0700 Message-ID: Subject: Re: [PATCH] bpf, arm64: Mark dummy_tramp as global To: Nathan Chancellor Cc: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Hao Luo , Jiri Olsa , Zi Shen Lim , Xu Kuohai , Nick Desaulniers , Tom Rix , bpf@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, patches@lists.linux.dev, Sami Tolvanen Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 13, 2022 at 10:35 AM Nathan Chancellor wrote: > > When building with clang + CONFIG_CFI_CLANG=y, the following error > occurs at link time: > > ld.lld: error: undefined symbol: dummy_tramp > > dummy_tramp is declared globally in C but its definition in inline > assembly does not use .global, which prevents clang from properly > resolving the references to it when creating the CFI jump tables. > > Mark dummy_tramp as global so that the reference can be properly > resolved. > > Fixes: b2ad54e1533e ("bpf, arm64: Implement bpf_arch_text_poke() for arm64") > Link: https://github.com/ClangBuiltLinux/linux/issues/1661 > Suggested-by: Sami Tolvanen > Signed-off-by: Nathan Chancellor Reviewed-by: Stanislav Fomichev > --- > arch/arm64/net/bpf_jit_comp.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c > index fd1cb0d2aaa6..dcc572b7d4da 100644 > --- a/arch/arm64/net/bpf_jit_comp.c > +++ b/arch/arm64/net/bpf_jit_comp.c > @@ -604,6 +604,7 @@ void dummy_tramp(void); > > asm ( > " .pushsection .text, \"ax\", @progbits\n" > +" .global dummy_tramp\n" > " .type dummy_tramp, %function\n" > "dummy_tramp:" > #if IS_ENABLED(CONFIG_ARM64_BTI_KERNEL) > > base-commit: ace2bee839e08df324cb320763258dfd72e6120e > -- > 2.37.1 >