* Re: WARNING in bpf_warn_invalid_xdp_action [not found] <000000000000a16ad7059cbcbe43@google.com> @ 2020-01-22 21:01 ` syzbot 2020-01-22 21:38 ` Eric Dumazet 2022-02-10 9:29 ` [syzbot] " syzbot 1 sibling, 1 reply; 5+ messages in thread From: syzbot @ 2020-01-22 21:01 UTC (permalink / raw) To: andriin, ast, bpf, corbet, daniel, davem, dsahern, hawk, john.fastabend, kafai, kuba, linux-doc, linux-kernel, netdev, songliubraving, syzkaller-bugs, yhs syzbot has bisected this bug to: commit 58956317c8de52009d1a38a721474c24aef74fe7 Author: David Ahern <dsahern@gmail.com> Date: Fri Dec 7 20:24:57 2018 +0000 neighbor: Improve garbage collection bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=124a5985e00000 start commit: d0f41851 net, ip_tunnel: fix namespaces move git tree: net final crash: https://syzkaller.appspot.com/x/report.txt?x=114a5985e00000 console output: https://syzkaller.appspot.com/x/log.txt?x=164a5985e00000 kernel config: https://syzkaller.appspot.com/x/.config?x=d9290aeb7e6cf1c4 dashboard link: https://syzkaller.appspot.com/bug?extid=8ce4113dadc4789fac74 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11f99369e00000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13d85601e00000 Reported-by: syzbot+8ce4113dadc4789fac74@syzkaller.appspotmail.com Fixes: 58956317c8de ("neighbor: Improve garbage collection") For information about bisection process see: https://goo.gl/tpsmEJ#bisection ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: WARNING in bpf_warn_invalid_xdp_action 2020-01-22 21:01 ` WARNING in bpf_warn_invalid_xdp_action syzbot @ 2020-01-22 21:38 ` Eric Dumazet 2020-01-23 6:19 ` Dmitry Vyukov 0 siblings, 1 reply; 5+ messages in thread From: Eric Dumazet @ 2020-01-22 21:38 UTC (permalink / raw) To: syzbot, andriin, ast, bpf, corbet, daniel, davem, dsahern, hawk, john.fastabend, kafai, kuba, linux-doc, linux-kernel, netdev, songliubraving, syzkaller-bugs, yhs On 1/22/20 1:01 PM, syzbot wrote: > syzbot has bisected this bug to: > > commit 58956317c8de52009d1a38a721474c24aef74fe7 > Author: David Ahern <dsahern@gmail.com> > Date: Fri Dec 7 20:24:57 2018 +0000 > > neighbor: Improve garbage collection > > bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=124a5985e00000 > start commit: d0f41851 net, ip_tunnel: fix namespaces move > git tree: net > final crash: https://syzkaller.appspot.com/x/report.txt?x=114a5985e00000 > console output: https://syzkaller.appspot.com/x/log.txt?x=164a5985e00000 > kernel config: https://syzkaller.appspot.com/x/.config?x=d9290aeb7e6cf1c4 > dashboard link: https://syzkaller.appspot.com/bug?extid=8ce4113dadc4789fac74 > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11f99369e00000 > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13d85601e00000 > > Reported-by: syzbot+8ce4113dadc4789fac74@syzkaller.appspotmail.com > Fixes: 58956317c8de ("neighbor: Improve garbage collection") > > For information about bisection process see: https://goo.gl/tpsmEJ#bisection > bisection looks bogus... It would be nice to have alternative helpers to conveniently replace some WARN_ON/WARN_ONCE/... and not having to hand-code stuff like : diff --git a/net/core/filter.c b/net/core/filter.c index 538f6a735a19f017df8e10149cb578107ddc8cbb..633988f7c81b3b4f015d827ccb485e8b227ad20b 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -6913,11 +6913,15 @@ static bool xdp_is_valid_access(int off, int size, void bpf_warn_invalid_xdp_action(u32 act) { + static bool __section(.data.once) warned; const u32 act_max = XDP_REDIRECT; - WARN_ONCE(1, "%s XDP return value %u, expect packet loss!\n", - act > act_max ? "Illegal" : "Driver unsupported", - act); + if (!warned) { + warned = true; + pr_err("%s XDP return value %u, expect packet loss!\n", + act > act_max ? "Illegal" : "Driver unsupported", act); + dump_stack(); + } } EXPORT_SYMBOL_GPL(bpf_warn_invalid_xdp_action); ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: WARNING in bpf_warn_invalid_xdp_action 2020-01-22 21:38 ` Eric Dumazet @ 2020-01-23 6:19 ` Dmitry Vyukov 0 siblings, 0 replies; 5+ messages in thread From: Dmitry Vyukov @ 2020-01-23 6:19 UTC (permalink / raw) To: Eric Dumazet Cc: syzbot, Andrii Nakryiko, Alexei Starovoitov, bpf, Jonathan Corbet, Daniel Borkmann, David Miller, David Ahern, hawk, John Fastabend, Martin KaFai Lau, kuba, open list:DOCUMENTATION, LKML, netdev, Song Liu, syzkaller-bugs, Yonghong Song On Wed, Jan 22, 2020 at 10:38 PM Eric Dumazet <eric.dumazet@gmail.com> wrote: > > > > On 1/22/20 1:01 PM, syzbot wrote: > > syzbot has bisected this bug to: > > > > commit 58956317c8de52009d1a38a721474c24aef74fe7 > > Author: David Ahern <dsahern@gmail.com> > > Date: Fri Dec 7 20:24:57 2018 +0000 > > > > neighbor: Improve garbage collection > > > > bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=124a5985e00000 > > start commit: d0f41851 net, ip_tunnel: fix namespaces move > > git tree: net > > final crash: https://syzkaller.appspot.com/x/report.txt?x=114a5985e00000 > > console output: https://syzkaller.appspot.com/x/log.txt?x=164a5985e00000 > > kernel config: https://syzkaller.appspot.com/x/.config?x=d9290aeb7e6cf1c4 > > dashboard link: https://syzkaller.appspot.com/bug?extid=8ce4113dadc4789fac74 > > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11f99369e00000 > > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13d85601e00000 > > > > Reported-by: syzbot+8ce4113dadc4789fac74@syzkaller.appspotmail.com > > Fixes: 58956317c8de ("neighbor: Improve garbage collection") > > > > For information about bisection process see: https://goo.gl/tpsmEJ#bisection > > > > bisection looks bogus... > > It would be nice to have alternative helpers to conveniently replace some WARN_ON/WARN_ONCE/... > and not having to hand-code stuff like : > > diff --git a/net/core/filter.c b/net/core/filter.c > index 538f6a735a19f017df8e10149cb578107ddc8cbb..633988f7c81b3b4f015d827ccb485e8b227ad20b 100644 > --- a/net/core/filter.c > +++ b/net/core/filter.c > @@ -6913,11 +6913,15 @@ static bool xdp_is_valid_access(int off, int size, > > void bpf_warn_invalid_xdp_action(u32 act) > { > + static bool __section(.data.once) warned; > const u32 act_max = XDP_REDIRECT; > > - WARN_ONCE(1, "%s XDP return value %u, expect packet loss!\n", > - act > act_max ? "Illegal" : "Driver unsupported", > - act); > + if (!warned) { > + warned = true; > + pr_err("%s XDP return value %u, expect packet loss!\n", > + act > act_max ? "Illegal" : "Driver unsupported", act); > + dump_stack(); > + } > } > EXPORT_SYMBOL_GPL(bpf_warn_invalid_xdp_action); If a single caller of this function would be enough (or maybe grand caller with a macro), then we could use pr_err_once/ratelimited and print 1 line with error and caller function. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [syzbot] WARNING in bpf_warn_invalid_xdp_action [not found] <000000000000a16ad7059cbcbe43@google.com> 2020-01-22 21:01 ` WARNING in bpf_warn_invalid_xdp_action syzbot @ 2022-02-10 9:29 ` syzbot 2022-02-16 15:33 ` Dmitry Vyukov 1 sibling, 1 reply; 5+ messages in thread From: syzbot @ 2022-02-10 9:29 UTC (permalink / raw) To: andrii, andriin, ast, bpf, corbet, daniel, davem, dsahern, dvyukov, eric.dumazet, hawk, john.fastabend, kafai, kpsingh, kuba, linux-doc, linux-kernel, netdev, pabeni, songliubraving, syzkaller-bugs, toke, yhs syzbot suspects this issue was fixed by commit: commit 2cbad989033bff0256675c38f96f5faab852af4b Author: Paolo Abeni <pabeni@redhat.com> Date: Tue Nov 30 10:08:06 2021 +0000 bpf: Do not WARN in bpf_warn_invalid_xdp_action() bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=10d50baa700000 start commit: b3c8e0de473e Merge branch '40GbE' of git://git.kernel.org/.. git tree: net kernel config: https://syzkaller.appspot.com/x/.config?x=1a86c22260afac2f dashboard link: https://syzkaller.appspot.com/bug?extid=8ce4113dadc4789fac74 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=113c8a3bb00000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16eb4307b00000 If the result looks correct, please mark the issue as fixed by replying with: #syz fix: bpf: Do not WARN in bpf_warn_invalid_xdp_action() For information about bisection process see: https://goo.gl/tpsmEJ#bisection ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [syzbot] WARNING in bpf_warn_invalid_xdp_action 2022-02-10 9:29 ` [syzbot] " syzbot @ 2022-02-16 15:33 ` Dmitry Vyukov 0 siblings, 0 replies; 5+ messages in thread From: Dmitry Vyukov @ 2022-02-16 15:33 UTC (permalink / raw) To: syzbot Cc: andrii, andriin, ast, bpf, corbet, daniel, davem, dsahern, eric.dumazet, hawk, john.fastabend, kafai, kpsingh, kuba, linux-doc, linux-kernel, netdev, pabeni, songliubraving, syzkaller-bugs, toke, yhs On Thu, 10 Feb 2022 at 10:29, syzbot <syzbot+8ce4113dadc4789fac74@syzkaller.appspotmail.com> wrote: > > syzbot suspects this issue was fixed by commit: > > commit 2cbad989033bff0256675c38f96f5faab852af4b > Author: Paolo Abeni <pabeni@redhat.com> > Date: Tue Nov 30 10:08:06 2021 +0000 > > bpf: Do not WARN in bpf_warn_invalid_xdp_action() > > bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=10d50baa700000 > start commit: b3c8e0de473e Merge branch '40GbE' of git://git.kernel.org/.. > git tree: net > kernel config: https://syzkaller.appspot.com/x/.config?x=1a86c22260afac2f > dashboard link: https://syzkaller.appspot.com/bug?extid=8ce4113dadc4789fac74 > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=113c8a3bb00000 > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16eb4307b00000 > > If the result looks correct, please mark the issue as fixed by replying with: > > #syz fix: bpf: Do not WARN in bpf_warn_invalid_xdp_action() Looks legit: #syz fix: bpf: Do not WARN in bpf_warn_invalid_xdp_action() ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-02-16 15:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <000000000000a16ad7059cbcbe43@google.com>
2020-01-22 21:01 ` WARNING in bpf_warn_invalid_xdp_action syzbot
2020-01-22 21:38 ` Eric Dumazet
2020-01-23 6:19 ` Dmitry Vyukov
2022-02-10 9:29 ` [syzbot] " syzbot
2022-02-16 15:33 ` Dmitry Vyukov
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).