Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp515921imi; Thu, 21 Jul 2022 05:54:31 -0700 (PDT) X-Google-Smtp-Source: AGRyM1suJtQY9OdyqlC/U+AdQCBxoj3A0mhSnGrf9IW5RgH7jBoDitCpoULUp/WBofiiOUWFTY8d X-Received: by 2002:a63:ba1d:0:b0:419:7e6e:2858 with SMTP id k29-20020a63ba1d000000b004197e6e2858mr37168788pgf.67.1658408071014; Thu, 21 Jul 2022 05:54:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658408071; cv=none; d=google.com; s=arc-20160816; b=KRx/5yGqAhwXj1DmfZERXmzTu/Gu6AsW+iQMC+A82+P7e79nPWU/cCSd0flXRvrrpH 0XhACwLu6k02OEhX69GYWTz2Zao6mQ8jdC6oWpf6hNL4Q36E7oc+yVenu+3DtdVhybgK HAxgNjJ2AUr1+Jdrrd42ffLS7toYizHnHgcIAZUwP9oE7pMRBpmWiHArOJapADUhhr3L l3THe1ccURfyvbMF4We6+Rp6gX4BIHkNK4WQDSedhjI/qumGHAC7GqOs2J/sxO/l2JJe 5rseMqvaxHzFual59U7xWRGsGnvPlK0FVSMB5FfmnUQHm8ZyikgVGtmlmz1hH4Q6damH MneQ== 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; bh=nerFO3gh+jDS+/LdaWpmEbHQzV4quAWxWtq/edk/d/k=; b=jgwfVzN8J/gQmSYe149JIhy7AnYBAXJOzDtLNIJ58+W/pnsOIwSa00qWrt7Hd+Szi+ tYP2y4viJXdUb1aPq/ADD9lBdr3aStQMYXt2lu2gKwzj3CVvY5SJp4R335R/id3mWAmI UM1hKqZiLpqMkuqOH2eRdAv6lmnpNNLqee5bk9Dsr3Fuza5GgSPQnqjGvMFhip1WeeOG FXfFjDeL0KWjTudch2z4+t9m+B/obHH2GMayUXMvVnkFGGK7U4TUxQCZcw3Avm2WkvNT l5yu0hTNLp5l4f1KOIwJ3Wj4cjPT41gU4xQ22RQOrFch83Z0UlIp1Ue+4l2uZqqX1URR OU/w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w17-20020a63af11000000b00419d4533627si1929760pge.123.2022.07.21.05.54.16; Thu, 21 Jul 2022 05:54:30 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233673AbiGUMji (ORCPT + 99 others); Thu, 21 Jul 2022 08:39:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232164AbiGUMjh (ORCPT ); Thu, 21 Jul 2022 08:39:37 -0400 X-Greylist: delayed 1200 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 21 Jul 2022 05:39:35 PDT Received: from dggsgout12.his.huawei.com (dggsgout12.his.huawei.com [45.249.212.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1CB07538E; Thu, 21 Jul 2022 05:39:35 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.169]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4LpWRs64fYz6S3Md; Thu, 21 Jul 2022 20:03:21 +0800 (CST) Received: from k01.huawei.com (unknown [10.67.174.197]) by APP1 (Coremail) with SMTP id cCh0CgAnLWHKQNliUh8JBA--.48026S2; Thu, 21 Jul 2022 20:04:27 +0800 (CST) From: Xu Kuohai To: bpf@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Alexei Starovoitov , Andrii Nakryiko , Catalin Marinas , Daniel Borkmann , Hao Luo , Jakub Sitnicki , Jean-Philippe Brucker , Jiri Olsa , John Fastabend , Jon Hunter , KP Singh , Martin KaFai Lau , Song Liu , Stanislav Fomichev , Will Deacon , Yonghong Song , Zi Shen Lim Subject: [PATCH bpf-next] bpf, arm64: Fix compile error in dummy_tramp() Date: Thu, 21 Jul 2022 08:13:19 -0400 Message-Id: <20220721121319.2999259-1-xukuohai@huaweicloud.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: cCh0CgAnLWHKQNliUh8JBA--.48026S2 X-Coremail-Antispam: 1UD129KBjvJXoW7uFyxCF15uw18tFWfAF45trb_yoW8GF1kpw 1UCrnxC3yqgF4DGa4rXa1fXF15tF4qqFWa9rW2grW5tF9FvryUGr4fKw1kWrZxJr1Fva1r AFWjkwn5A3Wvv3DanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUkIb4IE77IF4wAFF20E14v26ryj6rWUM7CY07I20VC2zVCF04k2 6cxKx2IYs7xG6r106r1rM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4 vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Ar0_tr1l84ACjcxK6xIIjxv20xvEc7Cj xVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x 0267AKxVW0oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG 6I80ewAv7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFV Cjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JM4IIrI8v6xkF7I0E8cxan2IY04v7MxAIw28I cxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2 IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVW8ZVWrXwCIc40Y0x0EwIxGrwCI 42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwCI42 IY6xAIw20EY4v20xvaj40_Wr1j6rW3Jr1lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2 z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7IU13rcDUUUUU== X-CM-SenderInfo: 50xn30hkdlqx5xdzvxpfor3voofrz/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS 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 From: Xu Kuohai dummy_tramp() uses "lr" to refer to the x30 register, but some assembler does not recognize "lr" and reports a build failure: /tmp/cc52xO0c.s: Assembler messages: /tmp/cc52xO0c.s:8: Error: operand 1 should be an integer register -- `mov lr,x9' /tmp/cc52xO0c.s:7: Error: undefined symbol lr used as an immediate value make[2]: *** [scripts/Makefile.build:250: arch/arm64/net/bpf_jit_comp.o] Error 1 make[1]: *** [scripts/Makefile.build:525: arch/arm64/net] Error 2 So replace "lr" with "x30" to fix it. Fixes: b2ad54e1533e ("bpf, arm64: Implement bpf_arch_text_poke() for arm64") Reported-by: Jon Hunter Tested-by: Jon Hunter Signed-off-by: Xu Kuohai --- arch/arm64/net/bpf_jit_comp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c index dcc572b7d4da..7ca8779ae34f 100644 --- a/arch/arm64/net/bpf_jit_comp.c +++ b/arch/arm64/net/bpf_jit_comp.c @@ -610,8 +610,8 @@ asm ( #if IS_ENABLED(CONFIG_ARM64_BTI_KERNEL) " bti j\n" /* dummy_tramp is called via "br x10" */ #endif -" mov x10, lr\n" -" mov lr, x9\n" +" mov x10, x30\n" +" mov x30, x9\n" " ret x10\n" " .size dummy_tramp, .-dummy_tramp\n" " .popsection\n" -- 2.30.2