* [PATCH bpf v2] riscv, bpf: fix patch_text implicit declaration
@ 2023-02-27 7:20 Randy Dunlap
2023-02-27 7:30 ` Pu Lehui
2023-02-27 7:31 ` Björn Töpel
0 siblings, 2 replies; 3+ messages in thread
From: Randy Dunlap @ 2023-02-27 7:20 UTC (permalink / raw)
To: linux-kernel
Cc: Randy Dunlap, kernel test robot, Pu Lehui, Luke Nelson, Xi Wang,
bpf, Alexei Starovoitov, Daniel Borkmann, John Fastabend,
Andrii Nakryiko, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Björn Töpel, linux-riscv
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(+)
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH bpf v2] riscv, bpf: fix patch_text implicit declaration
2023-02-27 7:20 [PATCH bpf v2] riscv, bpf: fix patch_text implicit declaration Randy Dunlap
@ 2023-02-27 7:30 ` Pu Lehui
2023-02-27 7:31 ` Björn Töpel
1 sibling, 0 replies; 3+ messages in thread
From: Pu Lehui @ 2023-02-27 7:30 UTC (permalink / raw)
To: Randy Dunlap, linux-kernel
Cc: kernel test robot, Luke Nelson, Xi Wang, bpf, Alexei Starovoitov,
Daniel Borkmann, John Fastabend, Andrii Nakryiko, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Björn Töpel, linux-riscv
On 2023/2/27 15:20, Randy Dunlap wrote:
> 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(+)
>
> 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
Acked-by: Pu Lehui <pulehui@huawei.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH bpf v2] riscv, bpf: fix patch_text implicit declaration
2023-02-27 7:20 [PATCH bpf v2] riscv, bpf: fix patch_text implicit declaration Randy Dunlap
2023-02-27 7:30 ` Pu Lehui
@ 2023-02-27 7:31 ` Björn Töpel
1 sibling, 0 replies; 3+ messages in thread
From: Björn Töpel @ 2023-02-27 7:31 UTC (permalink / raw)
To: Randy Dunlap, linux-kernel
Cc: Randy Dunlap, kernel test robot, Pu Lehui, Luke Nelson, Xi Wang,
bpf, Alexei Starovoitov, Daniel Borkmann, John Fastabend,
Andrii Nakryiko, Paul Walmsley, Palmer Dabbelt, Albert Ou,
linux-riscv
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-27 7:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-27 7:20 [PATCH bpf v2] riscv, bpf: fix patch_text implicit declaration Randy Dunlap
2023-02-27 7:30 ` Pu Lehui
2023-02-27 7:31 ` Björn Töpel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®