From: Nicholas Dudar <main.kalliope@gmail.com>
To: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
eddyz87@gmail.com, memxor@gmail.com, udknight@gmail.com,
tglx@kernel.org, mingo@redhat.com, bp@alien8.de,
dave.hansen@linux.intel.com, x86@kernel.org
Cc: martin.lau@linux.dev, song@kernel.org, yonghong.song@linux.dev,
jolsa@kernel.org, emil@etsalapatis.com, ihor.solodrai@linux.dev,
hpa@zytor.com, bpf@vger.kernel.org, linux-kernel@vger.kernel.org,
visitorckw@gmail.com
Subject: [PATCH bpf-next 0/5] bpf, x86: Extend CPUv4 instruction support in the i386 JIT
Date: Mon, 14 Sep 2026 22:13:33 -0400 [thread overview]
Message-ID: <20260915021338.1520964-1-main.kalliope@gmail.com> (raw)
Add MOVSX, MEMSX, 32-bit-offset unconditional jumps and unconditional
byte swaps to the i386 JIT. MOVSX currently produces ordinary moves;
the other instructions are rejected by the backend.
The load-emitter extraction is separate from MEMSX so the code movement
and signed-load handling can be reviewed independently. MOVSX comes first
because context-access conversion can lower signed loads into ordinary
loads followed by MOVSX.
The separately posted i386 SDIV/SMOD work is independent of this series:
https://lore.kernel.org/bpf/20260731002950.179573-1-main.kalliope@gmail.com/
Tested on QEMU i386 with CONFIG_BPF_JIT_ALWAYS_ON=y. The full test_bpf
suite improves from 845/216 to 862/199 pass/fail: the 17 newly passing
cases cover these instructions, with no other result changes. Additional
verifier-loaded programs check full-width results and ordinary controls.
Of the remaining 199 failures, 8 are ALU32 SDIV/SMOD result mismatches.
The other 191 fail during program creation or runtime selection: 149
atomic cases, 37 ALU64 division/modulo cases (including a mixed ALU test),
4 long conditional jumps and 1 jump/gap stress case.
All five intermediate JIT objects build. A standalone emission harness
checks ordinary-load byte equivalence across the extraction and compares
MOVSX staging with the earlier emitter, accounting for the removed
self-moves. No physical hardware was tested.
Nicholas Dudar (5):
bpf, x86: Add support for BPF_MOVSX in the i386 JIT
bpf, x86: Extract the i386 JIT load emitter
bpf, x86: Add BPF_MEMSX support to the i386 JIT
bpf, x86: Add BPF_JMP32 | BPF_JA support to the i386 JIT
bpf, x86: Add unconditional byte swap to the i386 JIT
arch/x86/net/bpf_jit_comp32.c | 227 ++++++++++++++++++++++++----------
1 file changed, 161 insertions(+), 66 deletions(-)
base-commit: 29fcf9ce4bbdf4cc339def776860e1c0095bca98
next reply other threads:[~2026-09-15 2:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-15 2:13 Nicholas Dudar [this message]
2026-09-15 2:13 ` [PATCH bpf-next 1/5] bpf, x86: Add support for BPF_MOVSX " Nicholas Dudar
2026-09-15 3:12 ` bot+bpf-ci
2026-09-15 2:13 ` [PATCH bpf-next 2/5] bpf, x86: Extract the i386 JIT load emitter Nicholas Dudar
2026-09-15 3:12 ` bot+bpf-ci
2026-09-15 2:13 ` [PATCH bpf-next 3/5] bpf, x86: Add BPF_MEMSX support to the i386 JIT Nicholas Dudar
2026-09-15 2:13 ` [PATCH bpf-next 4/5] bpf, x86: Add BPF_JMP32 | BPF_JA " Nicholas Dudar
2026-09-15 3:12 ` bot+bpf-ci
2026-09-15 2:13 ` [PATCH bpf-next 5/5] bpf, x86: Add unconditional byte swap " Nicholas Dudar
2026-09-15 3:12 ` bot+bpf-ci
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=20260915021338.1520964-1-main.kalliope@gmail.com \
--to=main.kalliope@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bp@alien8.de \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=dave.hansen@linux.intel.com \
--cc=eddyz87@gmail.com \
--cc=emil@etsalapatis.com \
--cc=hpa@zytor.com \
--cc=ihor.solodrai@linux.dev \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=memxor@gmail.com \
--cc=mingo@redhat.com \
--cc=song@kernel.org \
--cc=tglx@kernel.org \
--cc=udknight@gmail.com \
--cc=visitorckw@gmail.com \
--cc=x86@kernel.org \
--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
all inboxes | Powered by JetHome®