[PATCH bpf-next] bpf: Fix bpf_prog_test_run_tracing for !CONFIG_NET

KP Singh kpsingh at chromium.org
Thu Mar 5 23:22:06 UTC 2020


On Fri, Mar 6, 2020 at 12:16 AM Alexei Starovoitov
<alexei.starovoitov at gmail.com> wrote:
>
> On Thu, Mar 5, 2020 at 3:12 PM Randy Dunlap <rdunlap at infradead.org> wrote:
> >
> > On 3/5/20 2:01 PM, KP Singh wrote:
> > > From: KP Singh <kpsingh at google.com>
> > >
> > > test_run.o is not built when CONFIG_NET is not set and
> > > bpf_prog_test_run_tracing being referenced in bpf_trace.o causes the
> > > linker error:
> > >
> > > ld: kernel/trace/bpf_trace.o:(.rodata+0x38): undefined reference to
> > >  `bpf_prog_test_run_tracing'
> > >
> > > Add a __weak function in bpf_trace.c to handle this.
> > >
> > > Fixes: da00d2f117a0 ("bpf: Add test ops for BPF_PROG_TYPE_TRACING")
> > > Signed-off-by: KP Singh <kpsingh at google.com>
> >
> > Reported-by: Randy Dunlap <rdunlap at infradead.org>

Thanks!

Apologies, I should have added the "Reported-by:" tag.

- KP

> > Acked-by: Randy Dunlap <rdunlap at infradead.org> # build-tested
>
> Since it was at the top of the tree I amended the commit
> with your tags.
> Thanks for reporting and testing.



More information about the Linux-security-module-archive mailing list