* [PATCH bpf-next] bpf: Fix build error without CONFIG_NET
@ 2019-10-18 9:03 YueHaibing
2019-10-18 18:11 ` Yonghong Song
2019-10-18 19:10 ` Daniel Borkmann
0 siblings, 2 replies; 6+ messages in thread
From: YueHaibing @ 2019-10-18 9:03 UTC (permalink / raw)
To: rostedt, mingo, ast, daniel, kafai, songliubraving, yhs, andriin
Cc: netdev, bpf, linux-kernel, YueHaibing
If CONFIG_NET is n, building fails:
kernel/trace/bpf_trace.o: In function `raw_tp_prog_func_proto':
bpf_trace.c:(.text+0x1a34): undefined reference to `bpf_skb_output_proto'
Wrap it into a #ifdef to fix this.
Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: a7658e1a4164 ("bpf: Check types of arguments passed into helpers")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
kernel/trace/bpf_trace.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c
index 52f7e9d..c324089 100644
--- a/kernel/trace/bpf_trace.c
+++ b/kernel/trace/bpf_trace.c
@@ -1055,8 +1055,10 @@ raw_tp_prog_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog)
switch (func_id) {
case BPF_FUNC_perf_event_output:
return &bpf_perf_event_output_proto_raw_tp;
+#ifdef CONFIG_NET
case BPF_FUNC_skb_output:
return &bpf_skb_output_proto;
+#endif
case BPF_FUNC_get_stackid:
return &bpf_get_stackid_proto_raw_tp;
case BPF_FUNC_get_stack:
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH bpf-next] bpf: Fix build error without CONFIG_NET
2019-10-18 9:03 [PATCH bpf-next] bpf: Fix build error without CONFIG_NET YueHaibing
@ 2019-10-18 18:11 ` Yonghong Song
2019-10-18 18:20 ` Steven Rostedt
2019-10-18 19:10 ` Daniel Borkmann
1 sibling, 1 reply; 6+ messages in thread
From: Yonghong Song @ 2019-10-18 18:11 UTC (permalink / raw)
To: YueHaibing, rostedt, mingo, ast, daniel, Martin Lau, Song Liu,
Andrii Nakryiko
Cc: netdev, bpf, linux-kernel
On 10/18/19 2:03 AM, YueHaibing wrote:
> If CONFIG_NET is n, building fails:
>
> kernel/trace/bpf_trace.o: In function `raw_tp_prog_func_proto':
> bpf_trace.c:(.text+0x1a34): undefined reference to `bpf_skb_output_proto'
>
> Wrap it into a #ifdef to fix this.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Fixes: a7658e1a4164 ("bpf: Check types of arguments passed into helpers")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Yonghong Song <yhs@fb.com>
> ---
> kernel/trace/bpf_trace.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c
> index 52f7e9d..c324089 100644
> --- a/kernel/trace/bpf_trace.c
> +++ b/kernel/trace/bpf_trace.c
> @@ -1055,8 +1055,10 @@ raw_tp_prog_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog)
> switch (func_id) {
> case BPF_FUNC_perf_event_output:
> return &bpf_perf_event_output_proto_raw_tp;
> +#ifdef CONFIG_NET
> case BPF_FUNC_skb_output:
> return &bpf_skb_output_proto;
> +#endif
> case BPF_FUNC_get_stackid:
> return &bpf_get_stackid_proto_raw_tp;
> case BPF_FUNC_get_stack:
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH bpf-next] bpf: Fix build error without CONFIG_NET
2019-10-18 18:11 ` Yonghong Song
@ 2019-10-18 18:20 ` Steven Rostedt
2019-10-18 18:46 ` Daniel Borkmann
0 siblings, 1 reply; 6+ messages in thread
From: Steven Rostedt @ 2019-10-18 18:20 UTC (permalink / raw)
To: Yonghong Song
Cc: YueHaibing, mingo, ast, daniel, Martin Lau, Song Liu,
Andrii Nakryiko, netdev, bpf, linux-kernel
On Fri, 18 Oct 2019 18:11:07 +0000
Yonghong Song <yhs@fb.com> wrote:
> On 10/18/19 2:03 AM, YueHaibing wrote:
> > If CONFIG_NET is n, building fails:
> >
> > kernel/trace/bpf_trace.o: In function `raw_tp_prog_func_proto':
> > bpf_trace.c:(.text+0x1a34): undefined reference to `bpf_skb_output_proto'
> >
> > Wrap it into a #ifdef to fix this.
> >
> > Reported-by: Hulk Robot <hulkci@huawei.com>
> > Fixes: a7658e1a4164 ("bpf: Check types of arguments passed into helpers")
> > Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>
> Acked-by: Yonghong Song <yhs@fb.com>
I'm getting ready for another push to Linus. Want me to pull this into
my tree?
-- Steve
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH bpf-next] bpf: Fix build error without CONFIG_NET
2019-10-18 18:20 ` Steven Rostedt
@ 2019-10-18 18:46 ` Daniel Borkmann
2019-10-18 18:49 ` Steven Rostedt
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Borkmann @ 2019-10-18 18:46 UTC (permalink / raw)
To: Steven Rostedt
Cc: Yonghong Song, YueHaibing, mingo, ast, Martin Lau, Song Liu,
Andrii Nakryiko, netdev, bpf, linux-kernel
On Fri, Oct 18, 2019 at 02:20:25PM -0400, Steven Rostedt wrote:
> On Fri, 18 Oct 2019 18:11:07 +0000
> Yonghong Song <yhs@fb.com> wrote:
> > On 10/18/19 2:03 AM, YueHaibing wrote:
> > > If CONFIG_NET is n, building fails:
> > >
> > > kernel/trace/bpf_trace.o: In function `raw_tp_prog_func_proto':
> > > bpf_trace.c:(.text+0x1a34): undefined reference to `bpf_skb_output_proto'
> > >
> > > Wrap it into a #ifdef to fix this.
> > >
> > > Reported-by: Hulk Robot <hulkci@huawei.com>
> > > Fixes: a7658e1a4164 ("bpf: Check types of arguments passed into helpers")
> > > Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> >
> > Acked-by: Yonghong Song <yhs@fb.com>
>
> I'm getting ready for another push to Linus. Want me to pull this into
> my tree?
It's related to bpf-next, so only bpf-next is appropriate here. We'll
take it.
Thanks,
Daniel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH bpf-next] bpf: Fix build error without CONFIG_NET
2019-10-18 18:46 ` Daniel Borkmann
@ 2019-10-18 18:49 ` Steven Rostedt
0 siblings, 0 replies; 6+ messages in thread
From: Steven Rostedt @ 2019-10-18 18:49 UTC (permalink / raw)
To: Daniel Borkmann
Cc: Yonghong Song, YueHaibing, mingo, ast, Martin Lau, Song Liu,
Andrii Nakryiko, netdev, bpf, linux-kernel
On Fri, 18 Oct 2019 20:46:29 +0200
Daniel Borkmann <daniel@iogearbox.net> wrote:
> It's related to bpf-next, so only bpf-next is appropriate here. We'll
> take it.
OK, thanks!
-- Steve
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH bpf-next] bpf: Fix build error without CONFIG_NET
2019-10-18 9:03 [PATCH bpf-next] bpf: Fix build error without CONFIG_NET YueHaibing
2019-10-18 18:11 ` Yonghong Song
@ 2019-10-18 19:10 ` Daniel Borkmann
1 sibling, 0 replies; 6+ messages in thread
From: Daniel Borkmann @ 2019-10-18 19:10 UTC (permalink / raw)
To: YueHaibing
Cc: rostedt, mingo, ast, kafai, songliubraving, yhs, andriin, netdev,
bpf, linux-kernel
On Fri, Oct 18, 2019 at 05:03:44PM +0800, YueHaibing wrote:
> If CONFIG_NET is n, building fails:
>
> kernel/trace/bpf_trace.o: In function `raw_tp_prog_func_proto':
> bpf_trace.c:(.text+0x1a34): undefined reference to `bpf_skb_output_proto'
>
> Wrap it into a #ifdef to fix this.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Fixes: a7658e1a4164 ("bpf: Check types of arguments passed into helpers")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Applied, thanks!
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-10-18 19:11 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-18 9:03 [PATCH bpf-next] bpf: Fix build error without CONFIG_NET YueHaibing
2019-10-18 18:11 ` Yonghong Song
2019-10-18 18:20 ` Steven Rostedt
2019-10-18 18:46 ` Daniel Borkmann
2019-10-18 18:49 ` Steven Rostedt
2019-10-18 19:10 ` Daniel Borkmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).