From: Marat Khalili <marat.khalili@huawei.com>
To: Jerin Jacob <jerinjacobk@gmail.com>
Cc: Konstantin Ananyev <konstantin.ananyev@huawei.com>,
Stephen Hemminger <stephen@networkplumber.org>,
"dev@dpdk.org" <dev@dpdk.org>
Subject: RE: [PATCH 1/3] bpf: fix signed shift overflows in ARM JIT
Date: Wed, 12 Nov 2025 10:16:45 +0000 [thread overview]
Message-ID: <0f7fdd71245e419491ea4047503a9bc6@huawei.com> (raw)
In-Reply-To: <CALBAE1MjtM+kVA31KEcge47F_J8qmUDH_q8eWzYjBZxqVppJiQ@mail.gmail.com>
> > > > That tests do trigger it.
> > > >
> > > > RTE>>bpf_autotest
> > > > ../../src/lib/bpf/bpf_jit_arm64.c:320:18: runtime error: left shift of 1 by 31 places cannot be
> > > represented in type 'int'
> > >
> > > This is when ASAN is enabled. Right?
> >
> > More likely UBSAN, but yes.
> >
> > > Is it really generating BAD
> > > opcode(i.e emiter generating bad OPcode) and test fails?
> >
> > If allowed to finish the test does not fail.
>
> Does that mean, it is a false positive? Right?
It depends on who you ask. Certain compilers with certain compilation options
tend to delete execution branches that cause UB, and the test may not be
detailed enough to notice this.
> Anyway, There is no harm in the new patch, Change the patch to use
> SHIFT macros from EAL.
Ok, will do. It is probably too late for the current release anyway.
next prev parent reply other threads:[~2025-11-12 10:16 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-10 15:30 [PATCH 0/3] bpf: simple tests and fixes Marat Khalili
2025-11-10 15:30 ` [PATCH 1/3] bpf: fix signed shift overflows in ARM JIT Marat Khalili
2025-11-11 6:25 ` Jerin Jacob
2025-11-11 7:53 ` Morten Brørup
2025-11-11 10:10 ` Marat Khalili
2025-11-11 16:29 ` Jerin Jacob
2025-11-11 16:31 ` Jerin Jacob
2025-11-11 16:39 ` Marat Khalili
2025-11-12 5:23 ` Jerin Jacob
2025-11-12 10:16 ` Marat Khalili [this message]
2025-11-10 15:30 ` [PATCH 2/3] bpf: disallow empty program Marat Khalili
2025-11-10 16:40 ` Stephen Hemminger
2025-11-10 16:46 ` Marat Khalili
2025-11-12 15:35 ` Konstantin Ananyev
2025-11-10 15:30 ` [PATCH 3/3] bpf: make add/subtract one program validate Marat Khalili
2025-11-12 15:37 ` Konstantin Ananyev
2025-12-16 18:20 ` [PATCH v2 0/5] bpf: simple tests and fixes Marat Khalili
2025-12-16 18:20 ` [PATCH v2 1/5] eal: variable first arguments of RTE_SHIFT_VALxx Marat Khalili
2025-12-17 9:25 ` Morten Brørup
2025-12-16 18:20 ` [PATCH v2 2/5] bpf: fix signed shift overflows in ARM JIT Marat Khalili
2025-12-17 9:49 ` Morten Brørup
2025-12-16 18:20 ` [PATCH v2 3/5] bpf: disallow empty program Marat Khalili
2025-12-18 0:54 ` Stephen Hemminger
2025-12-17 8:58 ` Marat Khalili
2025-12-16 18:20 ` [PATCH v2 4/5] bpf: make add/subtract one program validate Marat Khalili
2025-12-16 18:20 ` [PATCH v2 5/5] bpf: fix BPF validation w/ conditional jump first Marat Khalili
2025-12-17 18:01 ` [PATCH v3 0/6] bpf: simple tests and fixes Marat Khalili
2025-12-17 18:01 ` [PATCH v3 1/6] eal: variable first arguments of RTE_SHIFT_VALxx Marat Khalili
2025-12-19 13:06 ` Konstantin Ananyev
2025-12-17 18:01 ` [PATCH v3 2/6] bpf: fix signed shift overflows in ARM JIT Marat Khalili
2025-12-19 13:13 ` Konstantin Ananyev
2025-12-17 18:01 ` [PATCH v3 3/6] bpf: mark ARM opcodes with UINT32_C Marat Khalili
2025-12-19 13:14 ` Konstantin Ananyev
2025-12-17 18:01 ` [PATCH v3 4/6] bpf: disallow empty program Marat Khalili
2025-12-17 18:01 ` [PATCH v3 5/6] bpf: make add/subtract one program validate Marat Khalili
2025-12-17 18:01 ` [PATCH v3 6/6] bpf: fix BPF validation w/ conditional jump first Marat Khalili
2026-01-08 11:10 ` Konstantin Ananyev
2026-01-14 19:50 ` [PATCH v3 0/6] bpf: simple tests and fixes Stephen Hemminger
2026-01-23 5:22 ` Stephen Hemminger
2026-01-27 11:49 ` [PATCH v4 " Marat Khalili
2026-01-27 11:49 ` [PATCH v4 1/6] eal: variable first arguments of RTE_SHIFT_VALxx Marat Khalili
2026-01-28 0:41 ` fengchengwen
2026-01-27 11:49 ` [PATCH v4 2/6] bpf: fix signed shift overflows in ARM JIT Marat Khalili
2026-01-27 11:49 ` [PATCH v4 3/6] bpf: mark ARM opcodes with UINT32_C Marat Khalili
2026-01-27 11:49 ` [PATCH v4 4/6] bpf: disallow empty program Marat Khalili
2026-01-27 11:49 ` [PATCH v4 5/6] bpf: make add/subtract one program validate Marat Khalili
2026-01-27 11:49 ` [PATCH v4 6/6] bpf: fix validation when conditional jump is first instruction Marat Khalili
2026-01-27 14:02 ` [PATCH v4 0/6] bpf: simple tests and fixes Stephen Hemminger
2026-02-04 11:44 ` Thomas Monjalon
2026-02-04 13:33 ` Konstantin Ananyev
2026-02-04 16:58 ` Thomas Monjalon
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=0f7fdd71245e419491ea4047503a9bc6@huawei.com \
--to=marat.khalili@huawei.com \
--cc=dev@dpdk.org \
--cc=jerinjacobk@gmail.com \
--cc=konstantin.ananyev@huawei.com \
--cc=stephen@networkplumber.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.