Re: [PATCH bpf v2] riscv, bpf: fix patch_text implicit declaration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Randy Dunlap <rdunlap@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxx>
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Link: https://lore.kernel.org/r/202302271000.Aj4nMXbZ-lkp@xxxxxxxxx
> Cc: Pu Lehui <pulehui@xxxxxxxxxx>
> Cc: Luke Nelson <luke.r.nels@xxxxxxxxx>
> Cc: Xi Wang <xi.wang@xxxxxxxxx>
> Cc: bpf@xxxxxxxxxxxxxxx
> Cc: Alexei Starovoitov <ast@xxxxxxxxxx>
> Cc: Daniel Borkmann <daniel@xxxxxxxxxxxxx>
> Cc: John Fastabend <john.fastabend@xxxxxxxxx>
> Cc: Andrii Nakryiko <andrii@xxxxxxxxxx>
> Cc: Paul Walmsley <paul.walmsley@xxxxxxxxxx>
> Cc: Palmer Dabbelt <palmer@xxxxxxxxxxx>
> Cc: Albert Ou <aou@xxxxxxxxxxxxxxxxx>
> Cc: "Björn Töpel" <bjorn@xxxxxxxxxx>
> Cc: linux-riscv@xxxxxxxxxxxxxxxxxxx
> ---
> 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@xxxxxxxxxxxx>




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux