Message ID | 20230227072016.14618-1-rdunlap@infradead.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2279559wrd; Sun, 26 Feb 2023 23:23:43 -0800 (PST) X-Google-Smtp-Source: AK7set9tLxzwe0mXz+MOuF7C2B16jGykNpRLLjKcVLXjzH7dm29Gz/siPNo8KVfmAzc+1T6WNoM7 X-Received: by 2002:a05:6402:500b:b0:4af:6227:763b with SMTP id p11-20020a056402500b00b004af6227763bmr7388402eda.18.1677482623653; Sun, 26 Feb 2023 23:23:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677482623; cv=none; d=google.com; s=arc-20160816; b=e+WfVywVcZuwhc4jpSkxNGDcpXeJnEEHZiZ55Xu9HYgfc497KNnVkdzDlHbcqB5mAi qvZOFlq/BcgCiupQ87OQg4C7CcABaHHZAuWviOelm6eOMWtxsZpugL+WdLX+015kuDPO 5lc2yqBxwxJmc8qmbL4Uz7XklE+X/lunhYfwcUauEM3v/guS8luJ2Tx6LHaLPV9JOY1p 5LOA1IBG4GJWCZJpWOpk26i3Zd/xQ0J3cGm1N7ZAzJhTXZOj076zAh3h8XIfRuaWOdgk 1zRUgBVbzr/CMb/yCVF92Mf91i71K5jppmNmvkL3qSGeWSZu1zUJFioIGNTW1wqDOvnI tX7w== 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=SzNBAEO+HmUg2XhCvzB8GyNus0AL5as/+GanLa2IUdI=; b=jabPicF//cACm3zHsryFCPrFmLvrarhlgfMj3vQuOITTLiokVgStq7jcGNyEOWfXqi y8ty3bSHQ+fpKcFCNZKREJGhnB2bfP5izUK9ilYn97FgIAPoH0vOBuuea6dEz5MTh+ky PWpIzj04XBcvjExjtXBwaxJhGBLkO3zR+ct2wlszWcQMDf1C4fOQcnQnQ5DhZb1xAzKD 2w8u8onORfD9oVlfNqE0UZjam22jog78bGBZg3ui1W6j7xNa4j1RkTGSnHS3Plu6X3i3 SI/KVVjXhqLfDCZP7f+x58RsIECmS7UBJXvvISvL+cOFd1eyyGlFYI17X2nVYYO81oi2 30qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=a4RotzB3; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n10-20020aa7d04a000000b0046c0f2a94dbsi7551396edo.353.2023.02.26.23.23.21; Sun, 26 Feb 2023 23:23:43 -0800 (PST) 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=@infradead.org header.s=bombadil.20210309 header.b=a4RotzB3; 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 S229965AbjB0HUX (ORCPT <rfc822;sukrut.bellary@gmail.com> + 99 others); Mon, 27 Feb 2023 02:20:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229542AbjB0HUW (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 27 Feb 2023 02:20:22 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34A58E3B9; Sun, 26 Feb 2023 23:20:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-ID:Content-Description:In-Reply-To:References; bh=SzNBAEO+HmUg2XhCvzB8GyNus0AL5as/+GanLa2IUdI=; b=a4RotzB3NzKQxisTWmEXktURhp VDuqMEFXS7GGh8QoXglF+7y2Vm4WQn3gnBxElZsVXCO4wiRx3JXJlB95crv/AxnyIlS66mj+hGGNH KsOacAZCu+W6DKrZ1gdNO0QRnX16tPnEPBlw1ud5Irgt8PAg/mlcNWUuQrabD5Mq3Yf75McV0zJ72 K9t0BFZujtFNnpyU8kNPgCclm1POJKWYiykPQD3zcagssQjnf7eESBhZuOYkPFawSV3PKn3a6JLHO yATNlYcIuDIgMzIgOAOhvpWnJu+z7/rBpjM7CKv7n4ssMGxrG/8T9wK46WeNsK2gRSHdBxUveqxUN DWc6zhTQ==; Received: from [2601:1c2:980:9ec0::df2f] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWXo1-008esp-Hx; Mon, 27 Feb 2023 07:20:17 +0000 From: Randy Dunlap <rdunlap@infradead.org> To: linux-kernel@vger.kernel.org Cc: Randy Dunlap <rdunlap@infradead.org>, kernel test robot <lkp@intel.com>, Pu Lehui <pulehui@huawei.com>, Luke Nelson <luke.r.nels@gmail.com>, Xi Wang <xi.wang@gmail.com>, bpf@vger.kernel.org, Alexei Starovoitov <ast@kernel.org>, Daniel Borkmann <daniel@iogearbox.net>, John Fastabend <john.fastabend@gmail.com>, Andrii Nakryiko <andrii@kernel.org>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= <bjorn@kernel.org>, linux-riscv@lists.infradead.org Subject: [PATCH bpf v2] riscv, bpf: fix patch_text implicit declaration Date: Sun, 26 Feb 2023 23:20:16 -0800 Message-Id: <20230227072016.14618-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758968019541689153?= X-GMAIL-MSGID: =?utf-8?q?1758968019541689153?= |
Series |
[bpf,v2] riscv, bpf: fix patch_text implicit declaration
|
|
Commit Message
Randy Dunlap
Feb. 27, 2023, 7:20 a.m. UTC
bpf_jit_comp64.c uses patch_text(), so add <asm/patch.h> to it
to prevent the build error:
../arch/riscv/net/bpf_jit_comp64.c: In function 'bpf_arch_text_poke':
../arch/riscv/net/bpf_jit_comp64.c:691:23: error: implicit declaration of function 'patch_text'; did you mean 'path_get'? [-Werror=implicit-function-declaration]
691 | ret = patch_text(ip, new_insns, ninsns);
| ^~~~~~~~~~
Fixes: 596f2e6f9cf4 ("riscv, bpf: Add bpf_arch_text_poke support for RV64")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/202302271000.Aj4nMXbZ-lkp@intel.com
Cc: Pu Lehui <pulehui@huawei.com>
Cc: Luke Nelson <luke.r.nels@gmail.com>
Cc: Xi Wang <xi.wang@gmail.com>
Cc: bpf@vger.kernel.org
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: John Fastabend <john.fastabend@gmail.com>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: "Björn Töpel" <bjorn@kernel.org>
Cc: linux-riscv@lists.infradead.org
---
v2: add header file directly to bpf_jit_comp64.c (Pu Lehui)
change patch target to bpf (for fixes)
arch/riscv/net/bpf_jit_comp64.c | 1 +
1 file changed, 1 insertion(+)
Comments
Randy Dunlap <rdunlap@infradead.org> writes: > bpf_jit_comp64.c uses patch_text(), so add <asm/patch.h> to it > to prevent the build error: > > ../arch/riscv/net/bpf_jit_comp64.c: In function 'bpf_arch_text_poke': > ../arch/riscv/net/bpf_jit_comp64.c:691:23: error: implicit declaration of function 'patch_text'; did you mean 'path_get'? [-Werror=implicit-function-declaration] > 691 | ret = patch_text(ip, new_insns, ninsns); > | ^~~~~~~~~~ > > Fixes: 596f2e6f9cf4 ("riscv, bpf: Add bpf_arch_text_poke support for RV64") > Signed-off-by: Randy Dunlap <rdunlap@infradead.org> > Reported-by: kernel test robot <lkp@intel.com> > Link: https://lore.kernel.org/r/202302271000.Aj4nMXbZ-lkp@intel.com > Cc: Pu Lehui <pulehui@huawei.com> > Cc: Luke Nelson <luke.r.nels@gmail.com> > Cc: Xi Wang <xi.wang@gmail.com> > Cc: bpf@vger.kernel.org > Cc: Alexei Starovoitov <ast@kernel.org> > Cc: Daniel Borkmann <daniel@iogearbox.net> > Cc: John Fastabend <john.fastabend@gmail.com> > Cc: Andrii Nakryiko <andrii@kernel.org> > Cc: Paul Walmsley <paul.walmsley@sifive.com> > Cc: Palmer Dabbelt <palmer@dabbelt.com> > Cc: Albert Ou <aou@eecs.berkeley.edu> > Cc: "Björn Töpel" <bjorn@kernel.org> > Cc: linux-riscv@lists.infradead.org > --- > v2: add header file directly to bpf_jit_comp64.c (Pu Lehui) > change patch target to bpf (for fixes) Thanks, Randy! For the curious; The asm/patch.h file was picked via UPROBES (via PERF_EVENTS=y). For PERF_EVENTS=n, you get the build error. Acked-by: Björn Töpel <bjorn@rivosinc.com>
diff -- a/arch/riscv/net/bpf_jit_comp64.c b/arch/riscv/net/bpf_jit_comp64.c --- a/arch/riscv/net/bpf_jit_comp64.c +++ b/arch/riscv/net/bpf_jit_comp64.c @@ -10,6 +10,7 @@ #include <linux/filter.h> #include <linux/memory.h> #include <linux/stop_machine.h> +#include <asm/patch.h> #include "bpf_jit.h" #define RV_REG_TCC RV_REG_A6