From: Eric Dumazet <eric.dumazet@gmail.com>
To: syzbot <syzbot+8ce4113dadc4789fac74@syzkaller.appspotmail.com>,
andriin@fb.com, ast@kernel.org, bpf@vger.kernel.org,
corbet@lwn.net, daniel@iogearbox.net, davem@davemloft.net,
dsahern@gmail.com, hawk@kernel.org, john.fastabend@gmail.com,
kafai@fb.com, kuba@kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
songliubraving@fb.com, syzkaller-bugs@googlegroups.com,
yhs@fb.com
Subject: Re: WARNING in bpf_warn_invalid_xdp_action
Date: Wed, 22 Jan 2020 13:38:30 -0800 [thread overview]
Message-ID: <a10a25dd-fa53-0e7f-d394-d0123bc95df9@gmail.com> (raw)
In-Reply-To: <00000000000068843f059cc0d214@google.com>
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);
next prev parent reply other threads:[~2020-01-22 21:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 [this message]
2020-01-23 6:19 ` Dmitry Vyukov
2022-02-10 9:29 ` [syzbot] " syzbot
2022-02-16 15:33 ` Dmitry Vyukov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a10a25dd-fa53-0e7f-d394-d0123bc95df9@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=andriin@fb.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=corbet@lwn.net \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=hawk@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=songliubraving@fb.com \
--cc=syzbot+8ce4113dadc4789fac74@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=yhs@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).