]> git.ipfire.org Git - thirdparty/linux.git/commit
selftests/bpf: Add tests for loading insn array values with offsets
authorAnton Protopopov <a.s.protopopov@gmail.com>
Sun, 11 Jan 2026 15:30:47 +0000 (15:30 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 14 Jan 2026 03:36:47 +0000 (19:36 -0800)
commitc656807675e09604af09a4b9f3ea466af91b7b7a
tree190beda62990f3fe6f593ff1143f43e015d16792
parent7e525860e7250355bcb01ae9779154512b5e5e88
selftests/bpf: Add tests for loading insn array values with offsets

The ldimm64 instruction for map value supports an offset.
For insn array maps it wasn't tested before, as normally
such instructions aren't generated. However, this is still
possible to pass such instructions, so add a few tests to
check that correct offsets work properly and incorrect
offsets are rejected.

Signed-off-by: Anton Protopopov <a.s.protopopov@gmail.com>
Link: https://lore.kernel.org/r/20260111153047.8388-4-a.s.protopopov@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/bpf_gotox.c