]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/bpf: use host CPU features in JIT disassembler
authorVarun R Mallya <varunrmallya@gmail.com>
Tue, 2 Jun 2026 20:58:46 +0000 (02:28 +0530)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 5 Jun 2026 22:26:18 +0000 (15:26 -0700)
commit557d0cc3f2520feba45360beeafb93203b3230e0
tree4369cded9381a48947d7a4400f4f4ee9f19c4358
parenta1f1acf6a1491394d57e9635e47ccfcf8381f265
selftests/bpf: use host CPU features in JIT disassembler

Pass the host CPU name and feature string to
LLVMCreateDisasmCPUFeatures() instead of using LLVMCreateDisasm(), so
the disassembler correctly decodes CPU-specific instructions and
extensions such as RISC-V compressed and vector instructions.

Signed-off-by: Varun R Mallya <varunrmallya@gmail.com>
Reviewed-by: Björn Töpel <bjorn@kernel.org>
Link: https://lore.kernel.org/r/20260602205847.102825-2-varunrmallya@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/jit_disasm_helpers.c