linux-yocto/tools/testing/selftests/bpf/verifier
Maxim Mikityanskiy bee109b7b3 bpf: Fix error message on kfunc arg type mismatch
When "arg#%d expected pointer to ctx, but got %s" error is printed, both
template parts actually point to the type of the argument, therefore, it
will also say "but got PTR", regardless of what was the actual register
type.

Fix the message to print the register type in the second part of the
template, change the existing test to adapt to the new format, and add a
new test to test the case when arg is a pointer to context, but reg is a
scalar.

Fixes: 00b85860fe ("bpf: Rewrite kfunc argument handling")
Signed-off-by: Maxim Mikityanskiy <maxim@isovalent.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/bpf/20240909133909.1315460-1-maxim@isovalent.com
2024-09-09 15:58:17 -07:00
..
.gitignore
atomic_and.c
atomic_bounds.c
atomic_cmpxchg.c bpf: Fix accesses to uninit stack slots 2023-12-08 14:19:00 -08:00
atomic_fetch_add.c
atomic_fetch.c
atomic_invalid.c
atomic_or.c
atomic_xchg.c
atomic_xor.c
basic_call.c
basic_instr.c selftests/bpf: Fix a test_verifier failure 2023-07-27 18:54:16 -07:00
basic_stx_ldx.c
basic.c
bpf_loop_inline.c selftests/bpf: Skip callback tests if jit is disabled in test_verifier 2024-01-23 20:27:41 -08:00
bpf_st_mem.c selftests/bpf: Add test for immediate spilled to stack 2023-11-01 22:30:27 -07:00
calls.c bpf: Fix error message on kfunc arg type mismatch 2024-09-09 15:58:17 -07:00
ctx_sk_lookup.c
ctx_skb.c selftests/bpf: Add F_NEEDS_EFFICIENT_UNALIGNED_ACCESS to some tests 2023-07-05 14:34:23 +02:00
dead_code.c
direct_value_access.c
event_output.c
jit.c
jmp32.c selftests/bpf: Add F_NEEDS_EFFICIENT_UNALIGNED_ACCESS to some tests 2023-07-05 14:34:23 +02:00
jset.c
jump.c
junk_insn.c
ld_abs.c
ld_dw.c
ld_imm64.c bpf: handle ldimm64 properly in check_cfg() 2023-11-09 20:11:20 -08:00
map_kptr.c selftests/bpf: fix some typos in selftests 2024-09-05 13:07:47 -07: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 bpf: Allow BPF_PROG_TYPE_STRUCT_OPS programs to be sleepable 2023-01-25 10:25:57 -08:00
wide_access.c