-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpftool: Probe for ISA v4 instruction set extension #4761
base: bpf-next_base
Are you sure you want to change the base?
bpftool: Probe for ISA v4 instruction set extension #4761
Conversation
Upstream branch: 442bc81 |
Upstream branch: 442bc81 |
ade95c5
to
6f881f1
Compare
Upstream branch: 442bc81 |
6f881f1
to
d515844
Compare
6f73df7
to
d7469c1
Compare
Upstream branch: 82c1f13 |
d515844
to
c96eacd
Compare
d7469c1
to
05fce66
Compare
Upstream branch: 4d33dc1 |
c96eacd
to
804c029
Compare
05fce66
to
e666082
Compare
Upstream branch: 6e8ba49 |
This patch introduces a new probe to check whether the kernel supports instruction set extensions v4. The v4 extension comprises several new instructions: BPF_{SDIV,SMOD} (signed div and mod), BPF_{LD,LDX,ST,STX,MOV} (sign-extended load/store/move), 32-bit BPF_JA (unconditional jump), target-independent BPF_ALU64 BSWAP (byte-swapping 16/32/64). These have been introduced in the following commits respectively: * ec0e2da ("bpf: Support new signed div/mod instructions.") * 1f9a1ea ("bpf: Support new sign-extension load insns") * 8100928 ("bpf: Support new sign-extension mov insns") * 4cd58e9 ("bpf: Support new 32bit offset jmp instruction") * 0845c3d ("bpf: Support new unconditional bswap instruction") Support in bpftool for previous ISA extensions were added in commit 0fd800b ("bpftool: Probe for instruction set extensions"). These probes are useful for userspace BPF projects that want to use newer instruction set extensions on newer kernels, to reduce the programs' sizes or their complexity. LLVM provides the mcpu=v4 option since commit "[BPF] support for BPF_ST instruction in codegen" (llvm/llvm-project@8f28e80). Changelog: - v2: - moved BPF_JMP32_A macro after BPF_JMP_A in filter.h for consistency with include/linux/filter.h, noted by Quentin Monnet <[email protected]> Signed-off-by: Simone Magnani <[email protected]> Reviewed-by: Quentin Monnet <[email protected]>
804c029
to
4eb2500
Compare
Pull request for series with
subject: bpftool: Probe for ISA v4 instruction set extension
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=915866