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 2454CC43334 for ; Thu, 21 Jul 2022 12:46:36 +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:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=r7vAVtt6p8sOHL2lmnukIv8gbrXbXyUE0h/JA2SoNtQ=; b=euNxu4k1Fi9LLz 9gWHKjVESUJ/D+AMy4raOBv7EoQVgIDmmU9cFB8bwOFElsKrXglVd3UAAZrq+ZJyfYmzPXI4zmx/o BTm++HANp9xYmkAVMm0UpIHjUbIVld7R/tOSTXp7JqG1+BjPT16qeErIWD6P5q+mfWeofnT1jSdRa 58Pr/R2hWFdLGr9+kkoYJEYemt6awNgn40Sy2LeOFTHwY2xvFSI/nkFmJ+E0/cQ+XAqRVj7VKFH6u PRX4lxWOjV1kQY31/efJg+KL/7Hk/PfRQFOrouT8MgzCWWZx0IZQu0XkmOFbGFlZvSA06D0jNcFCI ufH1rOd1J2xIqdUNT/lw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oEVYc-006OlK-TK; Thu, 21 Jul 2022 12:45:35 +0000 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oEVYa-006OiO-P7 for linux-arm-kernel@lists.infradead.org; Thu, 21 Jul 2022 12:45:34 +0000 Received: by mail-ej1-x629.google.com with SMTP id oy13so2994334ejb.1 for ; Thu, 21 Jul 2022 05:45:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=SF6PL+9u/rWTvGFnN3y5cs77lAmi9XzrDEhj4k0QMec=; b=hRUA5VukzV+cxLpP4an3+Kxq60Q1V3UATiWvA4aHCoLz/H7MyK8opnRFn40TPS8XSc arMzN10oZ1r71fBI2vBh8N3ALxuUBaTWW/+wrR4tDQbOYY9DoGLQQ4QIsIKkHTPBFGvn FuN2M6pAgnTvOuECZtBHkW2bU2+DRtgLi+3qPngZt5Uv46xi6VW3eXCi3E+R94XvjmUI FXpSSNBFXt95eGkLzKO6wgcp0Y1bDtS4pbdwI2E6ejg/G/7PDEemz3AqMwFyY/4GH+W2 DQLh7pzmeksKneyB3q1LhsoG4AriogNHqKdPSAhknLSult4hulnZGGd7iY2cnPNg78vh DwMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=SF6PL+9u/rWTvGFnN3y5cs77lAmi9XzrDEhj4k0QMec=; b=SE+75nroCuyjs3zeAbI86Vl5pULGZgsepXy1vF0/bPSc8GJh2zhNM4zYlSkbhR64AM ztCcBhHdQ354Yes1NfGUB7h7CAUb5YLm2+JMTInxOsMzsmYxMAI8jKPpnHSPzWBga5JD b2nQ4nlg5kk0443XHs7nmkAlh4zbB2QsieLKEVfb8momC8o8Oer3L4qT9GSWdE+iJx25 dCOFyaBOg0yzQHuk2gDb6B9n/Dnp7g3S3jpLlomKOQrY4U0XuYBqjF7ETLZcvST5eN9+ 7/VDM+CYwLmZeCV0QS/EbbBOM8Qt83Bj0Vj/2pJUhrVsAX5dBHqwQg1BZm8/CWaRS+uW tbuw== X-Gm-Message-State: AJIora8HIRDXBWYT8ey/+qcmytdYwZr/tgPsOtWpA487B20SrkdmMj54 7WrRf0ykb3yD4PIntu6z1EI= X-Google-Smtp-Source: AGRyM1v1wMIO6eOgjaSlIbNT/CZKAMn4rrstcY4XHB01MyAXyU4DHf7Ls3PxG8QhieA1PNW6DtWrKA== X-Received: by 2002:a17:906:5d0d:b0:72f:4782:2219 with SMTP id g13-20020a1709065d0d00b0072f47822219mr14732150ejt.498.1658407528202; Thu, 21 Jul 2022 05:45:28 -0700 (PDT) Received: from krava ([193.85.244.190]) by smtp.gmail.com with ESMTPSA id rn9-20020a170906d92900b0072abb95eaa4sm794288ejb.215.2022.07.21.05.45.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jul 2022 05:45:27 -0700 (PDT) From: Jiri Olsa X-Google-Original-From: Jiri Olsa Date: Thu, 21 Jul 2022 14:45:25 +0200 To: Xu Kuohai , Jean-Philippe Brucker 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 , 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_054532_839108_765DB465 X-CRM114-Status: GOOD ( 17.21 ) 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 Jean-Philippe, could you please take a look? thanks, jirka > --- > 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