From: Eduard Zingerman <eddyz87@gmail.com>
To: Paul Chaignon <paul.chaignon@gmail.com>
Cc: syzbot ci <syzbot+ci59254af1cb47328a@syzkaller.appspotmail.com>,
andrii@kernel.org, ast@kernel.org, bpf@vger.kernel.org,
daniel@iogearbox.net, shung-hsi.yu@suse.com,
yonghong.song@linux.dev, syzbot@lists.linux.dev,
syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot ci] Re: bpf: Use tnums for JEQ/JNE is_branch_taken logic
Date: Mon, 08 Sep 2025 11:00:22 -0700 [thread overview]
Message-ID: <cf36f407713920055fcee1e30c007d23a117e712.camel@gmail.com> (raw)
In-Reply-To: <aL8XJI_gpHjjvX7o@Tunnel>
On Mon, 2025-09-08 at 19:49 +0200, Paul Chaignon wrote:
> On Wed, Aug 20, 2025 at 12:37:46PM -0700, Eduard Zingerman wrote:
> > On Wed, 2025-08-20 at 13:34 +0200, Paul Chaignon wrote:
> >
> > [...]
> >
> > > I have a patch to potentially fix this, but I'm still testing it and
> > > would prefer to send it separately as it doesn't really relate to my
> > > current patchset.
> >
> > I'd like to bring this point again: this is a cat-and-mouse game.
> > is_scalar_branch_taken() and regs_refine_cond_op() are essentially
> > same operation and should be treated as such: produce register states
> > for both branches and prune those that result in an impossible state.
> > There is nothing wrong with this logically and we haven't got a single
> > real bug from the invariant violations check if I remember correctly.
> >
> > Comparing the two functions, it looks like tricky cases are BPF_JE/JNE
> > and BPF_JSET/JSET|BPF_X. However, given that regs_refine_cond_op() is
> > called for a false branch with opcode reversed it looks like there is
> > no issues with these cases.
> >
> > I'll give this a try.
>
> Hi Eduard,
>
> Did you get a chance to look into this? syzkaller came back (finally)
> complaining about the remaining invariant violations:
> https://lore.kernel.org/bpf/68bacb3e.050a0220.192772.018d.GAE@google.com/
> If not, I can have a look at the end of the week.
>
> Paul
Hi Paul,
I have an unfinished branch here:
https://github.com/kernel-patches/bpf/commit/ef2e080a58206e23e3a521d2942f9b4d58a8627c
Don't like how it looks though. Planned on getting back to it this week.
Please ping me if you'd start working on a fix.
Thanks,
Eduard
prev parent reply other threads:[~2025-09-08 18:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-13 15:34 [PATCH bpf-next 1/2] bpf: Use tnums for JEQ/JNE is_branch_taken logic Paul Chaignon
2025-08-13 15:35 ` [PATCH bpf-next 2/2] selftests/bpf: Tests for is_scalar_branch_taken tnum logic Paul Chaignon
2025-08-13 18:34 ` Eduard Zingerman
2025-08-13 18:08 ` [PATCH bpf-next 1/2] bpf: Use tnums for JEQ/JNE is_branch_taken logic Eduard Zingerman
2025-08-14 12:55 ` Shung-Hsi Yu
2025-08-18 17:44 ` Paul Chaignon
2025-08-20 5:09 ` Shung-Hsi Yu
2025-08-21 9:40 ` Paul Chaignon
2025-08-15 8:24 ` [syzbot ci] " syzbot ci
2025-08-20 11:34 ` Paul Chaignon
2025-08-20 19:37 ` Eduard Zingerman
2025-08-21 10:04 ` Paul Chaignon
2025-09-08 17:49 ` Paul Chaignon
2025-09-08 18:00 ` Eduard Zingerman [this message]
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=cf36f407713920055fcee1e30c007d23a117e712.camel@gmail.com \
--to=eddyz87@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=paul.chaignon@gmail.com \
--cc=shung-hsi.yu@suse.com \
--cc=syzbot+ci59254af1cb47328a@syzkaller.appspotmail.com \
--cc=syzbot@lists.linux.dev \
--cc=syzkaller-bugs@googlegroups.com \
--cc=yonghong.song@linux.dev \
/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