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 867ABCCA488 for ; Thu, 21 Jul 2022 13:43:48 +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=JiLvKwsbJCCleVwVkkIQ74tLmKiNuSNUwzv/WGWXi2Y=; b=HMUztsHyF4dTcb JnotqMSQQVe4qx9nPG9eEBv4T868xuxQHSekyE3teEI9vPFNtakqB5I+btZ9ldZyNx5n3pf+LzfYp GlrEDsCHMlBsWJBUMJu681nAQJcQwtT760XFsNX3mrUWg9LCt+KzTFHui/K9qzY3NF3ozxKI5qxgw DKXg7xTz3w/l70x7lTNaNO66sjcsvKni1VXe9imUtiXJWvCBtVBvbu2mRKuUgSTfk7D0qJc/TZAbz 4c5M3S7/uE/cJeSgjIVNye+yJZv9Uw4O3BNW+9+7jO4+P/Nb2jCWn2xjhrxy/v6Uvkhmta01HJGrQ muyUsgw7lwYHDN2w+lUg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oEWRe-007CGS-Su; Thu, 21 Jul 2022 13:42:27 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oEWQy-007BgH-UX for linux-arm-kernel@lists.infradead.org; Thu, 21 Jul 2022 13:41:46 +0000 Received: by mail-wm1-x32b.google.com with SMTP id v5so1089001wmj.0 for ; Thu, 21 Jul 2022 06:41:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=1ZOd/Gq++6P9/egrjfq0hLbqfmWCQrpYvj+T6OMIRcA=; b=XePPEM4RRwanEDLwjDstnSZCVj1tto3cW5NKsAzKSn1mccMSMC/Kuk1+bODT32j6ro lU0EQLFZO/jmM0fADBWn/HBeLcOHrmKOpxS51Bdj+Mo9u2PfEGdD05msKOxw09yc5/fJ +14EaD9uzzG2/OGgSkWSBGhgbSbIy3sa2pBORDupvOHcLrvzjHFwEGPSAqL/WLkoBBkB 3cEIGnGKxCX/iNlsspBW+UJmxQidu1C2WcAw4k8jSaqnV2D32xwSXeGcZH8BPxiVdaOA kiZZQ7alXk5g7dtU0VcGXBk/z9MwXQry8wno1WiMdGaz5+9rOmgAj8QJuwc0X3Wu7t/X 7OrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=1ZOd/Gq++6P9/egrjfq0hLbqfmWCQrpYvj+T6OMIRcA=; b=p9v/2V7xkJWcPQexOSXPUEcvBRfj7YME0iGOrWVX3+BJjIAuRC5EpTuc6Y6lzJzzB+ I+EMByui/zyQCi4U9PJ87sMDMOA90Q8URz9aGzmQpA0defN6RHEHJm+MLz7rKYY95pJv dgdj5bbop8Eh5zZQ1MLMjLDCU00wd89JoLoohb5UFU4acwPbtH2AsyEI+//hUUuw9SM7 SoBq0Q3cGQsc2hN8u3CMI+tpq1w+XsvJ2koJBRtj3HkzUZ0BVV4mesa8sJF4ogNYmvGf db7Nt56ifeMWPOg8iX6xRck9mAuWmGqSFTsbvHwKGYiOJh83PsZ1rIJOQUT4H3etjNMN ey9Q== X-Gm-Message-State: AJIora/86HnjFpH1X1/iHwgmmASyMNxzJBM6ZZAPl9V56ah5sqvmgR+0 XOKSbnB4K/7sB5EgJ8C8hBffYw== X-Google-Smtp-Source: AGRyM1tyiSs+bsKfSaH2hJxxA8JS1C7ucliDlZGzwNOh7X+0SsXr+sRq5xXvqIfCkBSEEyZx4FYHqg== X-Received: by 2002:a05:600c:35d5:b0:3a3:2490:c984 with SMTP id r21-20020a05600c35d500b003a32490c984mr8823738wmq.162.1658410901611; Thu, 21 Jul 2022 06:41:41 -0700 (PDT) Received: from myrica (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id i13-20020adff30d000000b0021e4982270asm2078759wro.13.2022.07.21.06.41.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jul 2022 06:41:41 -0700 (PDT) Date: Thu, 21 Jul 2022 14:41:15 +0100 From: Jean-Philippe Brucker To: Xu Kuohai Cc: bpf@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Alexei Starovoitov , Andrii Nakryiko , Catalin Marinas , Daniel Borkmann , Hao Luo , Jakub Sitnicki , Jiri Olsa , John Fastabend , Jon Hunter , KP Singh , Martin KaFai Lau , Song Liu , Stanislav Fomichev , Will Deacon , Yonghong Song , Zi Shen Lim Subject: Re: [PATCH bpf-next] bpf, arm64: Fix compile error in dummy_tramp() Message-ID: References: <20220721121319.2999259-1-xukuohai@huaweicloud.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220721121319.2999259-1-xukuohai@huaweicloud.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220721_064145_026187_15EF5A94 X-CRM114-Status: GOOD ( 17.48 ) 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 Thu, Jul 21, 2022 at 08:13:19AM -0400, Xu Kuohai wrote: > 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 Right, it looks like the lr alias was only added to binutils 2.30, and Linux supports 2.23+ Reviewed-by: Jean-Philippe Brucker > --- > 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 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel