Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp941042imw; Wed, 13 Jul 2022 10:41:54 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tQZDi7feu6RQqCEQqQDbXxAmiufefnEZ5+KGVciB+BrfEwNGNmBATCZLjAlsobVC+UB+UC X-Received: by 2002:a17:906:8475:b0:72b:12c7:effe with SMTP id hx21-20020a170906847500b0072b12c7effemr4538660ejc.337.1657734114692; Wed, 13 Jul 2022 10:41:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657734114; cv=none; d=google.com; s=arc-20160816; b=lyPnWJupTyL5DpVRWxfDUxTaR1/8fUGK0v6c1jGE7ovbN1qxiuXf8x1UkmTK/+AXqj zln0+/f1XtMsPu/Gy1lXoCemP+AL8McDVtadIqJ008iFETpWB+t+kFMXKcWTwDQi1k0v fvcBCu0UKdo7ivRRt5uk923vyCufFxex8gh107760y2XQnDFxMEti8O7EFLY2TEg5oA6 3+d/r2EXiMBqenf3bDd6lig7PbqvoHo0AANnmQiDZv8CsFKdsXip6YIUy5tLyGkoB0Cu xr7NS3YVjaMfUjda5ABpxmvnX6yAZCaGCZvIW9DOKlQWgCD4xc8SyE5QdN1nZq27yaQz sOXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=mK/jGNCOMnKHVt6NF57zmdKbMNLwzPodhfWbp8jzmhM=; b=xJY1amtFn6aB6wH4ivvB7elFyNAnXtb+ablbJyLMIk8D1SL6s/Jgh3y8zTbeNZKDeM agMiUjrJ/a6U5xzb/eh5e89hGh9q3sSrEFbXL4XBCaUCQtshm1W/WEtdrJ0q2UEddXPw ThalhE44KhhGe4x19PJ7nZgY1UPyvBlw+9t2FgkmUxjyNn+l8aAhXt0EOWOnId3/8sAS TbWXckbDx7JN94eDEumYGdLvWtDiZ6p+spwTPlkfFKoGaCRpMmnYyc+Z3XAKybCb3Acp Rq9HRWJgOsU9/Xoba2KihExmizESCshfWsetjCo5wy3VeWcY5PQOQwLBr/62PKj0/5s4 Xjvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KZH39mym; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f19-20020a05640214d300b0043a6c4ea4fcsi17343983edx.470.2022.07.13.10.41.29; Wed, 13 Jul 2022 10:41:54 -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=@kernel.org header.s=k20201202 header.b=KZH39mym; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236378AbiGMRfV (ORCPT + 99 others); Wed, 13 Jul 2022 13:35:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231560AbiGMRfT (ORCPT ); Wed, 13 Jul 2022 13:35:19 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDAAC2CCA5; Wed, 13 Jul 2022 10:35:18 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 7F38561D0E; Wed, 13 Jul 2022 17:35:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0B7AC34114; Wed, 13 Jul 2022 17:35:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657733717; bh=HFYEMG5wmH1mdTjCQGIo+9rp7fPWoJyZUnWc3Tmd2sw=; h=From:To:Cc:Subject:Date:From; b=KZH39mymqASDm9q7u3QUhCZoUL+Xy0JxQwhNr+L/ru6UA4A62Xz2q9o/4KkwE5Afh UJLM1p0KFFf6v7bRnUfh4vXa+ka3+H+jhcDFwR3isapLzjYSV/rY3Vt77RZZtQku0A RqKc+KDtptHIrcsho28fHkXw4/MNky5HsK/qWHVtbyYxbWMvYepM8dfVLRG1eladHQ y/yc5sO4hevdwpfw+ay2aic61o+ISvEe3zHgwh7SO8QdGQgsCerk5Alyr61XRT/mgs 7sgv8jAJI0FuCvBO5XQVosT14554IMlcoNxlWM7oMZwu0N8FIwOmJlyNKwOgt1+N8W YiI92vMFWKEcg== From: Nathan Chancellor To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko Cc: Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , 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, Nathan Chancellor , Sami Tolvanen Subject: [PATCH] bpf, arm64: Mark dummy_tramp as global Date: Wed, 13 Jul 2022 10:35:03 -0700 Message-Id: <20220713173503.3889486-1-nathan@kernel.org> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 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 --- 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