linux/tools/testing/selftests/bpf/verifier
Paul Chaignon 7ec899ac90 selftests/bpf: Negative test case for ref_obj_id in args
This patch adds a test case, as shown below, for the verifier error
"more than one arg with ref_obj_id".

    0: (b7) r2 = 20
    1: (b7) r3 = 0
    2: (18) r1 = 0xffff92cee3cbc600
    4: (85) call bpf_ringbuf_reserve#131
    5: (55) if r0 == 0x0 goto pc+3
    6: (bf) r1 = r0
    7: (bf) r2 = r0
    8: (85) call bpf_tcp_raw_gen_syncookie_ipv4#204
    9: (95) exit

This error is currently incorrectly reported as a verifier bug, with a
warning. The next patch in this series will address that.

Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
Link: https://lore.kernel.org/r/3ba78e6cda47ccafd6ea70dadbc718d020154664.1751463262.git.paul.chaignon@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
2025-07-02 10:43:34 -07:00
..
.gitignore
atomic_and.c
atomic_bounds.c
atomic_cmpxchg.c
atomic_fetch.c
atomic_fetch_add.c
atomic_invalid.c
atomic_or.c
atomic_xchg.c
atomic_xor.c
basic.c
basic_call.c
basic_instr.c
basic_stx_ldx.c
bpf_loop_inline.c
bpf_st_mem.c
calls.c selftests/bpf: Negative test case for ref_obj_id in args 2025-07-02 10:43:34 -07:00
ctx_sk_lookup.c
ctx_skb.c
dead_code.c bpf: Fall back to nospec for Spectre v1 2025-06-09 20:11:10 -07:00
direct_value_access.c
event_output.c
jit.c
jmp32.c bpf: Fall back to nospec for Spectre v1 2025-06-09 20:11:10 -07:00
jset.c bpf: Fall back to nospec for Spectre v1 2025-06-09 20:11:10 -07:00
jump.c
junk_insn.c
ld_abs.c
ld_dw.c
ld_imm64.c
map_kptr.c bpf: verifier: Support eliding map lookup nullness 2025-01-16 17:51:10 -08:00
perf_event_sample_period.c
precise.c bpf: Remove mark_precise_scalar_ids() 2024-07-29 12:53:14 -07:00
scale.c
sleepable.c
wide_access.c