linux-imx/tools/testing/selftests/bpf/progs
Yonghong Song 12852f8e0f selftests/bpf: Fix dynptr/test_dynptr_is_null
With latest llvm17, dynptr/test_dynptr_is_null subtest failed in my testing
VM. The failure log looks like below:

  All error logs:
  tester_init:PASS:tester_log_buf 0 nsec
  process_subtest:PASS:obj_open_mem 0 nsec
  process_subtest:PASS:Can't alloc specs array 0 nsec
  verify_success:PASS:dynptr_success__open 0 nsec
  verify_success:PASS:bpf_object__find_program_by_name 0 nsec
  verify_success:PASS:dynptr_success__load 0 nsec
  verify_success:PASS:bpf_program__attach 0 nsec
  verify_success:FAIL:err unexpected err: actual 4 != expected 0
  #65/9    dynptr/test_dynptr_is_null:FAIL

The error happens for bpf prog test_dynptr_is_null in dynptr_success.c:

        if (bpf_dynptr_is_null(&ptr2)) {
                err = 4;
                goto exit;
        }

The bpf_dynptr_is_null(&ptr) unexpectedly returned a non-zero value and
the control went to the error path. Digging further, I found the root cause
is due to function signature difference between kernel and user space.

In kernel, we have ...

  __bpf_kfunc bool bpf_dynptr_is_null(struct bpf_dynptr_kern *ptr)

... while in bpf_kfuncs.h we have:

  extern int bpf_dynptr_is_null(const struct bpf_dynptr *ptr) __ksym;

The kernel bpf_dynptr_is_null disasm code:

  ffffffff812f1a90 <bpf_dynptr_is_null>:
  ffffffff812f1a90: f3 0f 1e fa           endbr64
  ffffffff812f1a94: 0f 1f 44 00 00        nopl    (%rax,%rax)
  ffffffff812f1a99: 53                    pushq   %rbx
  ffffffff812f1a9a: 48 89 fb              movq    %rdi, %rbx
  ffffffff812f1a9d: e8 ae 29 17 00        callq   0xffffffff81464450 <__asan_load8_noabort>
  ffffffff812f1aa2: 48 83 3b 00           cmpq    $0x0, (%rbx)
  ffffffff812f1aa6: 0f 94 c0              sete    %al
  ffffffff812f1aa9: 5b                    popq    %rbx
  ffffffff812f1aaa: c3                    retq

Note that only 1-byte register %al is set and the other 7-bytes are not
touched. In bpf program, the asm code for the above bpf_dynptr_is_null(&ptr2):

       266:       85 10 00 00 ff ff ff ff call -0x1
       267:       b4 01 00 00 04 00 00 00 w1 = 0x4
       268:       16 00 03 00 00 00 00 00 if w0 == 0x0 goto +0x3 <LBB9_8>

Basically, 4-byte subregister is tested. This might cause error as the value
other than the lowest byte might not be 0.

This patch fixed the issue by using the identical func prototype across kernel
and selftest user space. The fixed bpf asm code:

       267:       85 10 00 00 ff ff ff ff call -0x1
       268:       54 00 00 00 01 00 00 00 w0 &= 0x1
       269:       b4 01 00 00 04 00 00 00 w1 = 0x4
       270:       16 00 03 00 00 00 00 00 if w0 == 0x0 goto +0x3 <LBB9_8>

Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20230517040404.4023912-1-yhs@fb.com
2023-05-17 16:52:26 +02:00
..
atomic_bounds.c
atomics.c
bench_local_storage_create.c selftests/bpf: Fix conflicts with built-in functions in bench_local_storage_create 2023-03-31 11:36:18 -07:00
bind_perm.c
bind4_prog.c
bind6_prog.c
bloom_filter_bench.c
bloom_filter_map.c
bpf_cubic.c
bpf_dctcp_release.c
bpf_dctcp.c
bpf_flow.c selftests/bpf: Fix BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL for empty flow label 2023-02-22 13:13:13 -08:00
bpf_hashmap_full_update_bench.c
bpf_hashmap_lookup.c selftest/bpf/benchs: Add benchmark for hashmap lookups 2023-02-15 16:29:31 -08:00
bpf_iter_bpf_array_map.c
bpf_iter_bpf_hash_map.c
bpf_iter_bpf_link.c
bpf_iter_bpf_map.c
bpf_iter_bpf_percpu_array_map.c
bpf_iter_bpf_percpu_hash_map.c
bpf_iter_bpf_sk_storage_helpers.c
bpf_iter_bpf_sk_storage_map.c
bpf_iter_ipv6_route.c
bpf_iter_ksym.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
bpf_iter_netlink.c
bpf_iter_setsockopt_unix.c
bpf_iter_setsockopt.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
bpf_iter_sockmap.c
bpf_iter_task_btf.c
bpf_iter_task_file.c
bpf_iter_task_stack.c
bpf_iter_task_vma.c
bpf_iter_task.c
bpf_iter_tcp4.c
bpf_iter_tcp6.c
bpf_iter_test_kern_common.h
bpf_iter_test_kern1.c
bpf_iter_test_kern2.c
bpf_iter_test_kern3.c
bpf_iter_test_kern4.c
bpf_iter_test_kern5.c
bpf_iter_test_kern6.c
bpf_iter_udp4.c
bpf_iter_udp6.c
bpf_iter_unix.c
bpf_iter_vma_offset.c
bpf_iter.h
bpf_loop_bench.c
bpf_loop.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
bpf_misc.h selftests/bpf: add precision propagation tests in the presence of subprogs 2023-05-04 22:35:35 -07:00
bpf_mod_race.c
bpf_syscall_macro.c
bpf_tcp_nogpl.c
bpf_tracing_net.h
bprm_opts.c
btf__core_reloc_arrays___diff_arr_dim.c
btf__core_reloc_arrays___diff_arr_val_sz.c
btf__core_reloc_arrays___equiv_zero_sz_arr.c
btf__core_reloc_arrays___err_bad_zero_sz_arr.c
btf__core_reloc_arrays___err_non_array.c
btf__core_reloc_arrays___err_too_shallow.c
btf__core_reloc_arrays___err_too_small.c
btf__core_reloc_arrays___err_wrong_val_type.c
btf__core_reloc_arrays___fixed_arr.c
btf__core_reloc_arrays.c
btf__core_reloc_bitfields___bit_sz_change.c
btf__core_reloc_bitfields___bitfield_vs_int.c
btf__core_reloc_bitfields___err_too_big_bitfield.c
btf__core_reloc_bitfields___just_big_enough.c
btf__core_reloc_bitfields.c
btf__core_reloc_enum64val___diff.c
btf__core_reloc_enum64val___err_missing.c
btf__core_reloc_enum64val___val3_missing.c
btf__core_reloc_enum64val.c
btf__core_reloc_enumval___diff.c
btf__core_reloc_enumval___err_missing.c
btf__core_reloc_enumval___val3_missing.c
btf__core_reloc_enumval.c
btf__core_reloc_existence___minimal.c
btf__core_reloc_existence___wrong_field_defs.c
btf__core_reloc_existence.c
btf__core_reloc_flavors__err_wrong_name.c
btf__core_reloc_flavors.c
btf__core_reloc_ints___bool.c
btf__core_reloc_ints___reverse_sign.c
btf__core_reloc_ints.c
btf__core_reloc_misc.c
btf__core_reloc_mods___mod_swap.c
btf__core_reloc_mods___typedefs.c
btf__core_reloc_mods.c
btf__core_reloc_nesting___anon_embed.c
btf__core_reloc_nesting___dup_compat_types.c
btf__core_reloc_nesting___err_array_container.c
btf__core_reloc_nesting___err_array_field.c
btf__core_reloc_nesting___err_dup_incompat_types.c
btf__core_reloc_nesting___err_missing_container.c
btf__core_reloc_nesting___err_missing_field.c
btf__core_reloc_nesting___err_nonstruct_container.c
btf__core_reloc_nesting___err_partial_match_dups.c
btf__core_reloc_nesting___err_too_deep.c
btf__core_reloc_nesting___extra_nesting.c
btf__core_reloc_nesting___struct_union_mixup.c
btf__core_reloc_nesting.c
btf__core_reloc_primitives___diff_enum_def.c
btf__core_reloc_primitives___diff_func_proto.c
btf__core_reloc_primitives___diff_ptr_type.c
btf__core_reloc_primitives___err_non_enum.c
btf__core_reloc_primitives___err_non_int.c
btf__core_reloc_primitives___err_non_ptr.c
btf__core_reloc_primitives.c
btf__core_reloc_ptr_as_arr___diff_sz.c
btf__core_reloc_ptr_as_arr.c
btf__core_reloc_size___diff_offs.c
btf__core_reloc_size___diff_sz.c
btf__core_reloc_size___err_ambiguous.c
btf__core_reloc_size.c
btf__core_reloc_type_based___all_missing.c
btf__core_reloc_type_based___diff_sz.c
btf__core_reloc_type_based___diff.c
btf__core_reloc_type_based___fn_wrong_args.c
btf__core_reloc_type_based___incompat.c
btf__core_reloc_type_based.c
btf__core_reloc_type_id___missing_targets.c
btf__core_reloc_type_id.c
btf_data.c
btf_dump_test_case_bitfields.c
btf_dump_test_case_multidim.c
btf_dump_test_case_namespacing.c
btf_dump_test_case_ordering.c
btf_dump_test_case_packing.c
btf_dump_test_case_padding.c
btf_dump_test_case_syntax.c Fix typos in selftest/bpf files 2023-02-16 16:56:17 -08:00
btf_ptr.h
btf_type_tag_percpu.c
btf_type_tag_user.c
btf_type_tag.c
cb_refs.c selftests/bpf: Move kfunc exports to bpf_testmod/bpf_testmod_kfunc.h 2023-05-16 22:09:23 -07:00
cg_storage_multi_egress_only.c
cg_storage_multi_isolated.c
cg_storage_multi_shared.c
cg_storage_multi.h
cgroup_getset_retval_getsockopt.c selftests/bpf: Correctly handle optlen > 4096 2023-05-13 16:55:46 -07:00
cgroup_getset_retval_hooks.c
cgroup_getset_retval_setsockopt.c selftests/bpf: Correctly handle optlen > 4096 2023-05-13 16:55:46 -07:00
cgroup_hierarchical_stats.c
cgroup_iter.c
cgroup_skb_sk_lookup_kern.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
cgrp_kfunc_common.h bpf: Remove bpf_cgroup_kptr_get() kfunc 2023-04-12 12:57:54 -07:00
cgrp_kfunc_failure.c bpf: Remove bpf_cgroup_kptr_get() kfunc 2023-04-12 12:57:54 -07:00
cgrp_kfunc_success.c bpf: Remove bpf_cgroup_kptr_get() kfunc 2023-04-12 12:57:54 -07:00
cgrp_ls_attach_cgroup.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
cgrp_ls_negative.c
cgrp_ls_recursion.c
cgrp_ls_sleepable.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
cgrp_ls_tp_btf.c
connect_force_port4.c
connect_force_port6.c
connect_ping.c
connect4_dropper.c
connect4_prog.c selftests/bpf: Workaround verification failure for fexit_bpf2bpf/func_replace_return_code 2023-03-09 18:59:54 -08:00
connect6_prog.c
core_kern_overflow.c
core_kern.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
core_reloc_types.h
cpumask_common.h bpf: Remove bpf_cpumask_kptr_get() kfunc 2023-03-16 12:28:30 -07:00
cpumask_failure.c selftests/bpf: Add testcases for ptr_*_or_null_ in bpf_kptr_xchg 2023-03-30 14:12:22 -07:00
cpumask_success.c bpf: Remove bpf_cpumask_kptr_get() kfunc 2023-03-16 12:28:30 -07:00
decap_sanity.c
dev_cgroup.c
dummy_st_ops_fail.c
dummy_st_ops_success.c
dynptr_fail.c selftests/bpf: Fix dynptr/test_dynptr_is_null 2023-05-17 16:52:26 +02:00
dynptr_success.c selftests/bpf: Fix dynptr/test_dynptr_is_null 2023-05-17 16:52:26 +02:00
empty_skb.c
err.h selftests/bpf: Add err.h header 2023-03-31 09:40:16 -07:00
exhandler_kern.c
fentry_test.c
fexit_bpf2bpf_simple.c
fexit_bpf2bpf.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
fexit_sleep.c
fexit_test.c
fib_lookup.c selftests/bpf: Add bpf_fib_lookup test 2023-02-17 22:12:04 +01:00
find_vma_fail1.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-03-24 10:10:20 -07:00
find_vma_fail2.c
find_vma.c
fmod_ret_freplace.c
for_each_array_map_elem.c
for_each_hash_map_elem.c
for_each_map_elem_write_key.c
freplace_attach_probe.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
freplace_cls_redirect.c
freplace_connect_v4_prog.c
freplace_connect4.c
freplace_get_constant.c
freplace_global_func.c
freplace_progmap.c
get_branch_snapshot.c
get_cgroup_id_kern.c
get_func_args_test.c
get_func_ip_test.c
htab_reuse.c selftests/bpf: Add test case for element reuse in htab map 2023-02-15 15:40:06 -08:00
htab_update.c
ima.c
iters_looping.c selftests/bpf: add iterators tests 2023-03-08 16:19:51 -08:00
iters_num.c selftests/bpf: add number iterator tests 2023-03-08 16:19:51 -08:00
iters_state_safety.c selftests/bpf: add iterators tests 2023-03-08 16:19:51 -08:00
iters_testmod_seq.c selftests/bpf: implement and test custom testmod_seq iterator 2023-03-08 16:19:51 -08:00
iters.c selftests/bpf: revert iter test subprog precision workaround 2023-05-04 22:35:35 -07:00
jeq_infer_not_null_fail.c
jit_probe_mem.c selftests/bpf: Move kfunc exports to bpf_testmod/bpf_testmod_kfunc.h 2023-05-16 22:09:23 -07:00
kfree_skb.c
kfunc_call_destructive.c selftests/bpf: Move kfunc exports to bpf_testmod/bpf_testmod_kfunc.h 2023-05-16 22:09:23 -07:00
kfunc_call_fail.c selftests/bpf: Move kfunc exports to bpf_testmod/bpf_testmod_kfunc.h 2023-05-16 22:09:23 -07:00
kfunc_call_race.c selftests/bpf: Move kfunc exports to bpf_testmod/bpf_testmod_kfunc.h 2023-05-16 22:09:23 -07:00
kfunc_call_test_subprog.c selftests/bpf: Move kfunc exports to bpf_testmod/bpf_testmod_kfunc.h 2023-05-16 22:09:23 -07:00
kfunc_call_test.c selftests/bpf: Move kfunc exports to bpf_testmod/bpf_testmod_kfunc.h 2023-05-16 22:09:23 -07:00
kprobe_multi_empty.c
kprobe_multi.c
ksym_race.c
linked_funcs1.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
linked_funcs2.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
linked_list_fail.c selftests/bpf: Modify linked_list tests to work with macro-ified inserts 2023-04-15 17:36:50 -07:00
linked_list.c selftests/bpf: Modify linked_list tests to work with macro-ified inserts 2023-04-15 17:36:50 -07:00
linked_list.h selftests/bpf: Modify linked_list tests to work with macro-ified inserts 2023-04-15 17:36:50 -07:00
linked_maps1.c
linked_maps2.c
linked_vars1.c
linked_vars2.c
load_bytes_relative.c
local_kptr_stash.c selftests/bpf: Move kfunc exports to bpf_testmod/bpf_testmod_kfunc.h 2023-05-16 22:09:23 -07:00
local_storage_bench.c
local_storage_rcu_tasks_trace_bench.c
local_storage.c selftests/bpf: Test task storage when local_storage->smap is NULL 2023-03-25 19:52:52 -07:00
loop1.c
loop2.c
loop3.c
loop4.c
loop5.c
loop6.c selftests/bpf: Fix trace_virtqueue_add_sgs test issue with LLVM 17. 2023-03-14 15:28:11 -07:00
lru_bug.c bpf: Rename __kptr_ref -> __kptr and __kptr -> __kptr_untrusted. 2023-03-03 17:42:20 +01:00
lsm_cgroup_nonvoid.c
lsm_cgroup.c
lsm.c selftests/bpf: add bpf_for_each(), bpf_for(), and bpf_repeat() macros 2023-03-08 16:19:51 -08:00
map_kptr_fail.c selftests/bpf: Move kfunc exports to bpf_testmod/bpf_testmod_kfunc.h 2023-05-16 22:09:23 -07:00
map_kptr.c selftests/bpf: Move kfunc exports to bpf_testmod/bpf_testmod_kfunc.h 2023-05-16 22:09:23 -07:00
map_ptr_kern.c
metadata_unused.c
metadata_used.c
modify_return.c
mptcp_sock.c
nested_trust_common.h
nested_trust_failure.c bpf: Refactor RCU enforcement in the verifier. 2023-03-03 17:42:20 +01:00
nested_trust_success.c
netcnt_prog.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
netif_receive_skb.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
netns_cookie_prog.c
perf_event_stackmap.c
perfbuf_bench.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
profiler.h
profiler.inc.h selftests/bpf: Add err.h header 2023-03-31 09:40:16 -07:00
profiler1.c
profiler2.c
profiler3.c
pyperf_global.c
pyperf_subprogs.c
pyperf.h selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
pyperf50.c
pyperf100.c
pyperf180.c
pyperf600_bpf_loop.c
pyperf600_iter.c selftests/bpf: add bpf_for_each(), bpf_for(), and bpf_repeat() macros 2023-03-08 16:19:51 -08:00
pyperf600_nounroll.c selftests/bpf: add bpf_for_each(), bpf_for(), and bpf_repeat() macros 2023-03-08 16:19:51 -08:00
pyperf600.c
rbtree_btf_fail__add_wrong_type.c
rbtree_btf_fail__wrong_node_type.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
rbtree_fail.c bpf: Migrate bpf_rbtree_remove to possibly fail 2023-04-15 17:36:50 -07:00
rbtree.c bpf: Migrate bpf_rbtree_remove to possibly fail 2023-04-15 17:36:50 -07:00
rcu_read_lock.c bpf: Remove now-defunct task kfuncs 2023-04-01 09:07:20 -07:00
rcu_tasks_trace_gp.c selftests/bpf: Add more tests for kptrs in maps 2023-03-01 10:24:33 -08:00
read_bpf_task_storage_busy.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
recursion.c
recvmsg4_prog.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
recvmsg6_prog.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
refcounted_kptr_fail.c selftests/bpf: Add refcounted_kptr tests 2023-04-15 17:36:50 -07:00
refcounted_kptr.c bpf: Fix bpf_refcount_acquire's refcount_t address calculation 2023-04-21 16:31:37 +02:00
ringbuf_bench.c
sample_map_ret0.c
sample_ret0.c
sendmsg4_prog.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
sendmsg6_prog.c
setget_sockopt.c
skb_load_bytes.c
skb_pkt_end.c
socket_cookie_prog.c
sockmap_parse_prog.c
sockmap_tcp_msg_prog.c
sockmap_verdict_prog.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
sockopt_inherit.c selftests/bpf: Correctly handle optlen > 4096 2023-05-13 16:55:46 -07:00
sockopt_multi.c selftests/bpf: Correctly handle optlen > 4096 2023-05-13 16:55:46 -07:00
sockopt_qos_to_cc.c selftests/bpf: Correctly handle optlen > 4096 2023-05-13 16:55:46 -07:00
sockopt_sk.c selftests/bpf: Correctly handle optlen > 4096 2023-05-13 16:55:46 -07:00
stacktrace_map_skip.c
strncmp_bench.c
strncmp_test.c
strobemeta_bpf_loop.c
strobemeta_nounroll1.c
strobemeta_nounroll2.c
strobemeta_subprogs.c
strobemeta.c
strobemeta.h selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
syscall.c
tailcall_bpf2bpf1.c
tailcall_bpf2bpf2.c
tailcall_bpf2bpf3.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
tailcall_bpf2bpf4.c
tailcall_bpf2bpf6.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
tailcall1.c
tailcall2.c
tailcall3.c
tailcall4.c
tailcall5.c
tailcall6.c
task_kfunc_common.h bpf: Remove now-defunct task kfuncs 2023-04-01 09:07:20 -07:00
task_kfunc_failure.c bpf: Remove now-defunct task kfuncs 2023-04-01 09:07:20 -07:00
task_kfunc_success.c bpf: Remove now-defunct task kfuncs 2023-04-01 09:07:20 -07:00
task_local_storage_exit_creds.c
task_local_storage.c
task_ls_recursion.c
task_storage_nodeadlock.c
tcp_ca_incompl_cong_ops.c
tcp_ca_unsupp_cong_op.c
tcp_ca_update.c selftests/bpf: Test switching TCP Congestion Control algorithms. 2023-03-22 22:53:25 -07:00
tcp_ca_write_sk_pacing.c selftests/bpf: test a BPF CC writing app_limited 2023-03-29 13:10:56 -07:00
tcp_rtt.c
test_access_variable_array.c selftests/bpf: Add test to access integer type of variable array 2023-04-19 21:29:39 -07:00
test_attach_kprobe_sleepable.c selftests/bpf: Split test_attach_probe into multi subtests 2023-03-06 09:38:08 -08:00
test_attach_probe_manual.c selftests/bpf: Add test for legacy/perf kprobe/uprobe attach mode 2023-03-06 09:38:08 -08:00
test_attach_probe.c selftests/bpf: Add test for legacy/perf kprobe/uprobe attach mode 2023-03-06 09:38:08 -08:00
test_autoattach.c
test_autoload.c
test_bpf_cookie.c
test_bpf_nf_fail.c
test_bpf_nf.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
test_btf_decl_tag.c
test_btf_map_in_map.c
test_btf_newkv.c
test_btf_nokv.c
test_btf_skc_cls_ingress.c
test_cgroup_link.c
test_check_mtu.c
test_cls_redirect_dynptr.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
test_cls_redirect_subprogs.c
test_cls_redirect.c Fix typos in selftest/bpf files 2023-02-16 16:56:17 -08:00
test_cls_redirect.h
test_core_autosize.c
test_core_extern.c
test_core_read_macros.c
test_core_reloc_arrays.c
test_core_reloc_bitfields_direct.c
test_core_reloc_bitfields_probed.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
test_core_reloc_enum64val.c
test_core_reloc_enumval.c
test_core_reloc_existence.c
test_core_reloc_flavors.c
test_core_reloc_ints.c
test_core_reloc_kernel.c
test_core_reloc_misc.c
test_core_reloc_mods.c
test_core_reloc_module.c
test_core_reloc_nesting.c
test_core_reloc_primitives.c
test_core_reloc_ptr_as_arr.c
test_core_reloc_size.c
test_core_reloc_type_based.c
test_core_reloc_type_id.c
test_core_retro.c
test_custom_sec_handlers.c
test_d_path_check_rdonly_mem.c
test_d_path_check_types.c
test_d_path.c
test_deny_namespace.c selftests/bpf: Fix progs/test_deny_namespace.c issues. 2023-03-10 12:54:12 -08:00
test_enable_stats.c
test_endian.c
test_get_stack_rawtp_err.c
test_get_stack_rawtp.c
test_global_data.c
test_global_func_args.c
test_global_func_ctx_args.c selftests/bpf: Add global subprog context passing tests 2023-02-17 21:21:50 +01:00
test_global_func1.c selftests/bpf: Fix selftest test_global_funcs/global_func1 failure with latest clang 2023-04-27 14:47:16 -07:00
test_global_func2.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
test_global_func3.c selftests/bpf: Convert test_global_funcs test to test_loader framework 2023-02-17 21:20:44 +01:00
test_global_func4.c selftests/bpf: Convert test_global_funcs test to test_loader framework 2023-02-17 21:20:44 +01:00
test_global_func5.c selftests/bpf: Convert test_global_funcs test to test_loader framework 2023-02-17 21:20:44 +01:00
test_global_func6.c selftests/bpf: Convert test_global_funcs test to test_loader framework 2023-02-17 21:20:44 +01:00
test_global_func7.c selftests/bpf: Convert test_global_funcs test to test_loader framework 2023-02-17 21:20:44 +01:00
test_global_func8.c selftests/bpf: Convert test_global_funcs test to test_loader framework 2023-02-17 21:20:44 +01:00
test_global_func9.c selftests/bpf: Convert test_global_funcs test to test_loader framework 2023-02-17 21:20:44 +01:00
test_global_func10.c bpf: Allow reads from uninit stack 2023-02-22 12:34:50 -08:00
test_global_func11.c selftests/bpf: Convert test_global_funcs test to test_loader framework 2023-02-17 21:20:44 +01:00
test_global_func12.c selftests/bpf: Convert test_global_funcs test to test_loader framework 2023-02-17 21:20:44 +01:00
test_global_func13.c selftests/bpf: Convert test_global_funcs test to test_loader framework 2023-02-17 21:20:44 +01:00
test_global_func14.c selftests/bpf: Convert test_global_funcs test to test_loader framework 2023-02-17 21:20:44 +01:00
test_global_func15.c selftests/bpf: Convert test_global_funcs test to test_loader framework 2023-02-17 21:20:44 +01:00
test_global_func16.c selftests/bpf: Convert test_global_funcs test to test_loader framework 2023-02-17 21:20:44 +01:00
test_global_func17.c selftests/bpf: Convert test_global_funcs test to test_loader framework 2023-02-17 21:20:44 +01:00
test_hash_large_key.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
test_helper_restricted.c
test_jhash.h
test_kfunc_dynptr_param.c selftests/bpf: Add -Wuninitialized flag to bpf prog flags 2023-03-02 22:38:50 -08:00
test_ksyms_btf_null_check.c
test_ksyms_btf_write_check.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
test_ksyms_btf.c
test_ksyms_module.c
test_ksyms_weak.c selftests/bpf: Add light skeleton test for kfunc detection. 2023-03-22 09:31:05 -07:00
test_ksyms.c
test_l4lb_noinline_dynptr.c selftests/bpf: tests for using dynptrs to parse skb and xdp buffers 2023-03-01 10:05:19 -08:00
test_l4lb_noinline.c
test_l4lb.c
test_legacy_printk.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
test_libbpf_get_fd_by_id_opts.c
test_link_pinning.c
test_lirc_mode2_kern.c
test_log_buf.c
test_log_fixup.c selftests/bpf: add missing __weak kfunc log fixup test 2023-04-18 12:45:10 -07:00
test_lookup_and_delete.c
test_lookup_key.c
test_lwt_ip_encap.c
test_lwt_seg6local.c
test_map_in_map_invalid.c
test_map_in_map.c
test_map_init.c
test_map_lock.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
test_map_lookup_percpu_elem.c
test_map_ops.c bpf/selftests: coverage for bpf_map_ops errors 2023-03-22 15:11:06 -07:00
test_migrate_reuseport.c
test_misc_tcp_hdr_options.c
test_mmap.c
test_module_attach.c
test_ns_current_pid_tgid.c
test_obj_id.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
test_overhead.c
test_parse_tcp_hdr_opt_dynptr.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
test_parse_tcp_hdr_opt.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
test_pe_preserve_elems.c
test_perf_branches.c
test_perf_buffer.c
test_perf_link.c
test_pinning_invalid.c
test_pinning.c
test_pkt_access.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
test_pkt_md_access.c
test_probe_read_user_str.c
test_probe_user.c
test_prog_array_init.c
test_queue_map.c
test_queue_stack_map.h
test_raw_tp_test_run.c
test_rdonly_maps.c
test_ringbuf_map_key.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
test_ringbuf_multi.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
test_ringbuf.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
test_seg6_loop.c
test_select_reuseport_kern.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
test_send_signal_kern.c
test_sk_assign_libbpf.c
test_sk_assign.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
test_sk_lookup_kern.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
test_sk_lookup.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
test_sk_storage_trace_itself.c
test_sk_storage_tracing.c selftests/bpf: Add tracing tests for walking skb and req. 2023-04-04 16:57:27 -07:00
test_skb_cgroup_id_kern.c
test_skb_ctx.c
test_skb_helpers.c
test_skc_to_unix_sock.c
test_skeleton.c
test_skmsg_load_helpers.c
test_snprintf_single.c
test_snprintf.c
test_sock_fields.c selftests/bpf: Fix s390 sock_field test failure 2023-05-16 20:57:16 -07:00
test_sockhash_kern.c
test_sockmap_invalid_update.c
test_sockmap_kern.c
test_sockmap_kern.h selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
test_sockmap_listen.c
test_sockmap_progs_query.c
test_sockmap_skb_verdict_attach.c
test_sockmap_update.c
test_spin_lock_fail.c
test_spin_lock.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
test_stack_map.c
test_stack_var_off.c
test_stacktrace_build_id.c
test_stacktrace_map.c selftests/bpf: use canonical ftrace path 2023-03-13 21:51:30 -07:00
test_static_linked1.c
test_static_linked2.c
test_subprogs_unused.c
test_subprogs.c Fix typos in selftest/bpf files 2023-02-16 16:56:17 -08:00
test_subskeleton_lib.c
test_subskeleton_lib2.c
test_subskeleton.c
test_sysctl_loop1.c
test_sysctl_loop2.c
test_sysctl_prog.c
test_task_pt_regs.c
test_task_under_cgroup.c selftests/bpf: Add testcase for bpf_task_under_cgroup 2023-05-06 13:56:38 -07:00
test_tc_bpf.c
test_tc_dtime.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
test_tc_edt.c
test_tc_neigh_fib.c
test_tc_neigh.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
test_tc_peer.c
test_tc_tunnel.c
test_tcp_check_syncookie_kern.c
test_tcp_estats.c
test_tcp_hdr_options.c
test_tcpbpf_kern.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
test_tcpnotify_kern.c
test_time_tai.c
test_trace_ext_tracing.c
test_trace_ext.c
test_tracepoint.c selftests/bpf: use canonical ftrace path 2023-03-13 21:51:30 -07:00
test_trampoline_count.c
test_tunnel_kern.c selftests/bpf: Test FOU kfuncs for externally controlled ipip devices 2023-04-12 16:40:39 -07:00
test_unpriv_bpf_disabled.c
test_uprobe_autoattach.c
test_urandom_usdt.c
test_usdt_multispec.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
test_usdt.c
test_user_ringbuf.h
test_varlen.c
test_verif_scale1.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
test_verif_scale2.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
test_verif_scale3.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
test_verify_pkcs7_sig.c
test_vmlinux.c
test_xdp_adjust_tail_grow.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
test_xdp_adjust_tail_shrink.c
test_xdp_bpf2bpf.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
test_xdp_context_test_run.c
test_xdp_devmap_helpers.c
test_xdp_do_redirect.c selftests/bpf: fix "metadata marker" getting overwritten by the netstack 2023-03-16 22:20:09 -07:00
test_xdp_dynptr.c selftests/bpf: Fix dynptr/test_dynptr_is_null 2023-05-17 16:52:26 +02:00
test_xdp_link.c
test_xdp_loop.c
test_xdp_meta.c
test_xdp_noinline.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
test_xdp_redirect.c
test_xdp_update_frags.c
test_xdp_vlan.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
test_xdp_with_cpumap_frags_helpers.c
test_xdp_with_cpumap_helpers.c
test_xdp_with_devmap_frags_helpers.c
test_xdp_with_devmap_helpers.c
test_xdp.c
timer_crash.c
timer_mim_reject.c
timer_mim.c
timer.c selftests/bpf: Add absolute timer test 2023-03-02 22:41:32 -08:00
trace_dummy_st_ops.c
trace_printk.c
trace_vprintk.c
tracing_struct.c selftests/bpf: Add test to access integer type of variable array 2023-04-19 21:29:39 -07:00
trigger_bench.c
twfw.c
type_cast.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
udp_limit.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
uninit_stack.c selftests/bpf: Tests for uninitialized stack reads 2023-02-22 12:34:50 -08:00
user_ringbuf_fail.c selftests/bpf: Clean up user_ringbuf, cgrp_kfunc, kfunc_dynptr_param tests 2023-02-13 21:42:29 -08:00
user_ringbuf_success.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
verifier_and.c selftests/bpf: verifier/and.c converted to inline assembly 2023-03-25 17:02:02 -07:00
verifier_array_access.c selftests/bpf: populate map_array_ro map for verifier_array_access test 2023-04-20 16:49:16 -07:00
verifier_basic_stack.c selftests/bpf: verifier/basic_stack.c converted to inline assembly 2023-03-25 17:02:02 -07:00
verifier_bounds_deduction_non_const.c selftests/bpf: Add verifier tests for code pattern '<const> <cond_op> <non_const>' 2023-04-06 15:26:08 -07:00
verifier_bounds_deduction.c selftests/bpf: verifier/bounds_deduction.c converted to inline assembly 2023-03-25 17:02:03 -07:00
verifier_bounds_mix_sign_unsign.c bpf: Improve handling of pattern '<const> <cond_op> <non_const>' in verifier 2023-04-06 15:26:08 -07:00
verifier_bounds.c selftests/bpf: verifier/bounds converted to inline assembly 2023-04-21 12:17:14 -07:00
verifier_bpf_get_stack.c selftests/bpf: verifier/bpf_get_stack converted to inline assembly 2023-04-21 12:17:39 -07:00
verifier_btf_ctx_access.c selftests/bpf: verifier/btf_ctx_access converted to inline assembly 2023-04-21 12:17:51 -07:00
verifier_cfg.c selftests/bpf: verifier/cfg.c converted to inline assembly 2023-03-25 17:02:03 -07:00
verifier_cgroup_inv_retcode.c selftests/bpf: verifier/cgroup_inv_retcode.c converted to inline assembly 2023-03-25 17:02:03 -07:00
verifier_cgroup_skb.c selftests/bpf: verifier/cgroup_skb.c converted to inline assembly 2023-03-25 17:02:03 -07:00
verifier_cgroup_storage.c selftests/bpf: verifier/cgroup_storage.c converted to inline assembly 2023-03-25 17:02:03 -07:00
verifier_const_or.c selftests/bpf: verifier/const_or.c converted to inline assembly 2023-03-25 17:02:03 -07:00
verifier_ctx_sk_msg.c selftests/bpf: verifier/ctx_sk_msg.c converted to inline assembly 2023-03-25 17:02:03 -07:00
verifier_ctx.c selftests/bpf: verifier/ctx converted to inline assembly 2023-04-21 12:18:03 -07:00
verifier_d_path.c selftests/bpf: verifier/d_path converted to inline assembly 2023-04-21 12:18:16 -07:00
verifier_direct_packet_access.c selftests/bpf: verifier/direct_packet_access converted to inline assembly 2023-04-21 12:18:44 -07:00
verifier_direct_stack_access_wraparound.c selftests/bpf: verifier/direct_stack_access_wraparound.c converted to inline assembly 2023-03-25 17:02:03 -07:00
verifier_div_overflow.c selftests/bpf: verifier/div_overflow.c converted to inline assembly 2023-03-25 17:02:04 -07:00
verifier_div0.c selftests/bpf: verifier/div0.c converted to inline assembly 2023-03-25 17:02:04 -07:00
verifier_helper_access_var_len.c selftests/bpf: verifier/helper_access_var_len.c converted to inline assembly 2023-03-25 17:02:04 -07:00
verifier_helper_packet_access.c selftests/bpf: verifier/helper_packet_access.c converted to inline assembly 2023-03-25 17:02:04 -07:00
verifier_helper_restricted.c selftests/bpf: verifier/helper_restricted.c converted to inline assembly 2023-03-25 17:02:04 -07:00
verifier_helper_value_access.c selftests/bpf: verifier/helper_value_access.c converted to inline assembly 2023-03-25 17:02:04 -07:00
verifier_int_ptr.c selftests/bpf: verifier/int_ptr.c converted to inline assembly 2023-03-25 17:02:04 -07:00
verifier_jeq_infer_not_null.c selftests/bpf: verifier/jeq_infer_not_null converted to inline assembly 2023-04-21 12:18:55 -07:00
verifier_ld_ind.c selftests/bpf: verifier/ld_ind.c converted to inline assembly 2023-03-25 17:02:04 -07:00
verifier_leak_ptr.c selftests/bpf: verifier/leak_ptr.c converted to inline assembly 2023-03-25 17:02:04 -07:00
verifier_loops1.c selftests/bpf: verifier/loops1 converted to inline assembly 2023-04-21 12:19:07 -07:00
verifier_lwt.c selftests/bpf: verifier/lwt converted to inline assembly 2023-04-21 12:19:20 -07:00
verifier_map_in_map.c selftests/bpf: verifier/map_in_map converted to inline assembly 2023-04-21 12:20:26 -07:00
verifier_map_ptr_mixing.c selftests/bpf: verifier/map_ptr_mixing converted to inline assembly 2023-04-21 12:20:38 -07:00
verifier_map_ptr.c selftests/bpf: verifier/map_ptr.c converted to inline assembly 2023-03-25 17:02:04 -07:00
verifier_map_ret_val.c selftests/bpf: verifier/map_ret_val.c converted to inline assembly 2023-03-25 17:02:05 -07:00
verifier_masking.c selftests/bpf: verifier/masking.c converted to inline assembly 2023-03-25 17:02:05 -07:00
verifier_meta_access.c selftests/bpf: verifier/meta_access.c converted to inline assembly 2023-03-25 17:02:05 -07:00
verifier_netfilter_ctx.c selftests/bpf: add missing netfilter return value and ctx access tests 2023-04-21 11:34:50 -07:00
verifier_netfilter_retcode.c selftests/bpf: add missing netfilter return value and ctx access tests 2023-04-21 11:34:50 -07:00
verifier_prevent_map_lookup.c selftests/bpf: verifier/prevent_map_lookup converted to inline assembly 2023-04-22 08:26:58 -07:00
verifier_raw_stack.c selftests/bpf: verifier/raw_stack.c converted to inline assembly 2023-03-25 17:02:05 -07:00
verifier_raw_tp_writable.c selftests/bpf: verifier/raw_tp_writable.c converted to inline assembly 2023-03-25 17:02:05 -07:00
verifier_ref_tracking.c selftests/bpf: verifier/ref_tracking converted to inline assembly 2023-04-21 12:23:13 -07:00
verifier_reg_equal.c selftests/bpf: Add a selftest for checking subreg equality 2023-04-17 15:50:02 -07:00
verifier_regalloc.c selftests/bpf: verifier/regalloc converted to inline assembly 2023-04-21 12:23:40 -07:00
verifier_ringbuf.c selftests/bpf: verifier/ringbuf.c converted to inline assembly 2023-03-25 17:02:05 -07:00
verifier_runtime_jit.c selftests/bpf: verifier/runtime_jit converted to inline assembly 2023-04-21 12:24:41 -07:00
verifier_search_pruning.c selftests/bpf: verifier/search_pruning converted to inline assembly 2023-04-21 12:25:07 -07:00
verifier_sock.c selftests/bpf: verifier/sock converted to inline assembly 2023-04-21 12:25:19 -07:00
verifier_spill_fill.c selftests/bpf: verifier/spill_fill.c converted to inline assembly 2023-03-25 17:02:05 -07:00
verifier_spin_lock.c selftests/bpf: verifier/spin_lock converted to inline assembly 2023-04-21 12:25:31 -07:00
verifier_stack_ptr.c selftests/bpf: verifier/stack_ptr.c converted to inline assembly 2023-03-25 17:02:05 -07:00
verifier_subprog_precision.c selftests/bpf: add precision propagation tests in the presence of subprogs 2023-05-04 22:35:35 -07:00
verifier_subreg.c selftests/bpf: verifier/subreg converted to inline assembly 2023-04-21 12:25:45 -07:00
verifier_uninit.c selftests/bpf: verifier/uninit.c converted to inline assembly 2023-03-25 17:02:05 -07:00
verifier_unpriv_perf.c selftests/bpf: verifier/unpriv converted to inline assembly 2023-04-21 12:26:52 -07:00
verifier_unpriv.c selftests/bpf: verifier/unpriv converted to inline assembly 2023-04-21 12:26:52 -07:00
verifier_value_adj_spill.c selftests/bpf: verifier/value_adj_spill.c converted to inline assembly 2023-03-25 17:02:06 -07:00
verifier_value_illegal_alu.c selftests/bpf: verifier/value_illegal_alu converted to inline assembly 2023-04-21 12:27:07 -07:00
verifier_value_or_null.c selftests/bpf: verifier/value_or_null.c converted to inline assembly 2023-03-25 17:02:06 -07:00
verifier_value_ptr_arith.c selftests/bpf: verifier/value_ptr_arith converted to inline assembly 2023-04-21 12:27:19 -07:00
verifier_value.c selftests/bpf: verifier/value.c converted to inline assembly 2023-03-25 17:02:06 -07:00
verifier_var_off.c selftests/bpf: verifier/var_off.c converted to inline assembly 2023-03-25 17:02:06 -07:00
verifier_xadd.c selftests/bpf: verifier/xadd.c converted to inline assembly 2023-03-25 17:02:06 -07:00
verifier_xdp_direct_packet_access.c selftests/bpf: Verifier/xdp_direct_packet_access.c converted to inline assembly 2023-03-28 14:48:27 -07:00
verifier_xdp.c selftests/bpf: verifier/xdp.c converted to inline assembly 2023-03-25 17:02:06 -07:00
xdp_dummy.c
xdp_features.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
xdp_hw_metadata.c selftests/bpf: xdp_hw_metadata track more timestamps 2023-04-27 18:42:30 +02:00
xdp_metadata.c selftests/bpf: Adjust bpf_xdp_metadata_rx_hash for new arg 2023-04-13 11:15:11 -07:00
xdp_metadata2.c selftests/bpf: Adjust bpf_xdp_metadata_rx_hash for new arg 2023-04-13 11:15:11 -07:00
xdp_redirect_map.c
xdp_redirect_multi_kern.c
xdp_synproxy_kern.c
xdp_tx.c
xdping_kern.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
xdpwall.c selftests/bpf: fix lots of silly mistakes pointed out by compiler 2023-03-10 08:14:08 -08:00
xfrm_info.c
xsk_xdp_progs.c selftests/xsk: add xdp populate metadata test 2023-03-22 09:14:07 -07:00