/linux-6.12.1/tools/testing/selftests/bpf/prog_tests/ |
D | exceptions.c | 37 &(int){bpf_program__fd(skel->progs.exception_tail_call_target)}, BPF_ANY), in test_exceptions_success() 43 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs._prog), &ropts); \ in test_exceptions_success() 124 prog = eskel->progs.pfentry; in test_exceptions_success() 127 bpf_program__fd(skel->progs.exception_ext_mod_cb_runtime), in test_exceptions_success() 134 prog = eskel->progs.throwing_fentry; in test_exceptions_success() 137 bpf_program__fd(skel->progs.exception_ext_mod_cb_runtime), in test_exceptions_success() 144 prog = eskel->progs.pfexit; in test_exceptions_success() 147 bpf_program__fd(skel->progs.exception_ext_mod_cb_runtime), in test_exceptions_success() 154 prog = eskel->progs.throwing_fexit; in test_exceptions_success() 157 bpf_program__fd(skel->progs.exception_ext_mod_cb_runtime), in test_exceptions_success() [all …]
|
D | tc_links.c | 30 pid1 = id_from_prog_fd(bpf_program__fd(skel->progs.tc1)); in serial_test_tc_links_basic() 31 pid2 = id_from_prog_fd(bpf_program__fd(skel->progs.tc2)); in serial_test_tc_links_basic() 41 link = bpf_program__attach_tcx(skel->progs.tc1, loopback, &optl); in serial_test_tc_links_basic() 76 link = bpf_program__attach_tcx(skel->progs.tc2, loopback, &optl); in serial_test_tc_links_basic() 130 ASSERT_EQ(bpf_program__set_expected_attach_type(skel->progs.tc1, target), in test_tc_links_before_target() 132 ASSERT_EQ(bpf_program__set_expected_attach_type(skel->progs.tc2, target), in test_tc_links_before_target() 134 ASSERT_EQ(bpf_program__set_expected_attach_type(skel->progs.tc3, target), in test_tc_links_before_target() 136 ASSERT_EQ(bpf_program__set_expected_attach_type(skel->progs.tc4, target), in test_tc_links_before_target() 143 pid1 = id_from_prog_fd(bpf_program__fd(skel->progs.tc1)); in test_tc_links_before_target() 144 pid2 = id_from_prog_fd(bpf_program__fd(skel->progs.tc2)); in test_tc_links_before_target() [all …]
|
D | sk_lookup.c | 472 link[0] = attach_lookup_prog(skel->progs.lookup_pass); in query_lookup_prog() 475 link[1] = attach_lookup_prog(skel->progs.lookup_pass); in query_lookup_prog() 478 link[2] = attach_lookup_prog(skel->progs.lookup_drop); in query_lookup_prog() 611 .lookup_prog = skel->progs.redir_port, in test_redirect_lookup() 619 .lookup_prog = skel->progs.redir_ip4, in test_redirect_lookup() 627 .lookup_prog = skel->progs.select_sock_a, in test_redirect_lookup() 628 .reuseport_prog = skel->progs.select_sock_b, in test_redirect_lookup() 637 .lookup_prog = skel->progs.select_sock_a_no_reuseport, in test_redirect_lookup() 638 .reuseport_prog = skel->progs.select_sock_b, in test_redirect_lookup() 647 .lookup_prog = skel->progs.redir_port, in test_redirect_lookup() [all …]
|
D | attach_probe.c | 57 kprobe_link = bpf_program__attach_kprobe_opts(skel->progs.handle_kprobe, in test_attach_probe_manual() 65 kretprobe_link = bpf_program__attach_kprobe_opts(skel->progs.handle_kretprobe, in test_attach_probe_manual() 76 uprobe_link = bpf_program__attach_uprobe_opts(skel->progs.handle_uprobe, in test_attach_probe_manual() 86 uretprobe_link = bpf_program__attach_uprobe_opts(skel->progs.handle_uretprobe, in test_attach_probe_manual() 99 bpf_program__attach_uprobe_opts(skel->progs.handle_uprobe_byname, in test_attach_probe_manual() 130 skel->links.handle_kprobe_auto = bpf_program__attach(skel->progs.handle_kprobe_auto); in test_attach_probe_auto() 133 skel->links.handle_kretprobe_auto = bpf_program__attach(skel->progs.handle_kretprobe_auto); in test_attach_probe_auto() 137 uprobe_err_link = bpf_program__attach(skel->progs.handle_uprobe_byname); in test_attach_probe_auto() 144 bpf_program__attach(skel->progs.handle_uretprobe_byname); in test_attach_probe_auto() 170 bpf_program__attach_uprobe_opts(skel->progs.handle_uprobe_byname2, in test_uprobe_lib() [all …]
|
D | missed.c | 28 prog_fd = bpf_program__fd(skel->progs.trigger); in test_missed_perf_kprobe() 78 prog_fd = bpf_program__fd(skel->progs.trigger); in test_missed_kprobe_recursion() 83 ASSERT_EQ(get_missed_count(bpf_program__fd(skel->progs.test1)), 0, "test1_recursion_misses"); in test_missed_kprobe_recursion() 84 ASSERT_GE(get_missed_count(bpf_program__fd(skel->progs.test2)), 1, "test2_recursion_misses"); in test_missed_kprobe_recursion() 85 ASSERT_GE(get_missed_count(bpf_program__fd(skel->progs.test3)), 1, "test3_recursion_misses"); in test_missed_kprobe_recursion() 86 ASSERT_GE(get_missed_count(bpf_program__fd(skel->progs.test4)), 1, "test4_recursion_misses"); in test_missed_kprobe_recursion() 87 ASSERT_GE(get_missed_count(bpf_program__fd(skel->progs.test5)), 1, "test5_recursion_misses"); in test_missed_kprobe_recursion() 116 prog_fd = bpf_program__fd(skel->progs.trigger); in test_missed_tp_recursion() 121 ASSERT_EQ(get_missed_count(bpf_program__fd(skel->progs.test1)), 0, "test1_recursion_misses"); in test_missed_tp_recursion() 122 ASSERT_EQ(get_missed_count(bpf_program__fd(skel->progs.test2)), 1, "test2_recursion_misses"); in test_missed_tp_recursion() [all …]
|
D | btf_tag.c | 123 bpf_program__set_autoload(skel->progs.test_sys_getsockname, false); in test_btf_type_tag_mod_user() 125 bpf_program__set_autoload(skel->progs.test_user2, false); in test_btf_type_tag_mod_user() 127 bpf_program__set_autoload(skel->progs.test_user1, false); in test_btf_type_tag_mod_user() 152 bpf_program__set_autoload(skel->progs.test_user2, false); in test_btf_type_tag_vmlinux_user() 153 bpf_program__set_autoload(skel->progs.test_user1, false); in test_btf_type_tag_vmlinux_user() 177 bpf_program__set_autoload(skel->progs.test_percpu_load, false); in test_btf_type_tag_mod_percpu() 178 bpf_program__set_autoload(skel->progs.test_percpu_helper, false); in test_btf_type_tag_mod_percpu() 180 bpf_program__set_autoload(skel->progs.test_percpu2, false); in test_btf_type_tag_mod_percpu() 182 bpf_program__set_autoload(skel->progs.test_percpu1, false); in test_btf_type_tag_mod_percpu() 207 bpf_program__set_autoload(skel->progs.test_percpu2, false); in test_btf_type_tag_vmlinux_percpu() [all …]
|
D | rcu_read_lock.c | 26 bpf_program__set_autoload(skel->progs.get_cgroup_id, true); in test_success() 27 bpf_program__set_autoload(skel->progs.task_succ, true); in test_success() 28 bpf_program__set_autoload(skel->progs.two_regions, true); in test_success() 29 bpf_program__set_autoload(skel->progs.non_sleepable_1, true); in test_success() 30 bpf_program__set_autoload(skel->progs.non_sleepable_2, true); in test_success() 31 bpf_program__set_autoload(skel->progs.task_trusted_non_rcuptr, true); in test_success() 32 bpf_program__set_autoload(skel->progs.rcu_read_lock_subprog, true); in test_success() 33 bpf_program__set_autoload(skel->progs.rcu_read_lock_global_subprog, true); in test_success() 34 bpf_program__set_autoload(skel->progs.rcu_read_lock_subprog_lock, true); in test_success() 35 bpf_program__set_autoload(skel->progs.rcu_read_lock_subprog_unlock, true); in test_success() [all …]
|
D | map_kptr.c | 25 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.test_map_kptr_ref1), &opts); in test_map_kptr_success() 28 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.test_map_kptr_ref2), &opts); in test_map_kptr_success() 32 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.test_ls_map_kptr_ref1), &lopts); in test_map_kptr_success() 36 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.test_ls_map_kptr_ref2), &lopts); in test_map_kptr_success() 55 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.test_map_kptr_ref3), &opts); in test_map_kptr_success() 63 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.test_map_kptr_ref3), &opts); in test_map_kptr_success() 70 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.test_map_kptr_ref3), &opts); in test_map_kptr_success() 77 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.test_map_kptr_ref3), &opts); in test_map_kptr_success() 84 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.test_map_kptr_ref3), &opts); in test_map_kptr_success() 91 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.test_map_kptr_ref3), &opts); in test_map_kptr_success() [all …]
|
D | bpf_cookie.c | 31 link1 = bpf_program__attach_kprobe_opts(skel->progs.handle_kprobe, in kprobe_subtest() 38 link2 = bpf_program__attach_kprobe_opts(skel->progs.handle_kprobe, in kprobe_subtest() 46 retlink1 = bpf_program__attach_kprobe_opts(skel->progs.handle_kretprobe, in kprobe_subtest() 53 retlink2 = bpf_program__attach_kprobe_opts(skel->progs.handle_kretprobe, in kprobe_subtest() 76 prog_fd = bpf_program__fd(skel->progs.trigger); in kprobe_multi_test_run() 147 prog_fd = bpf_program__fd(skel->progs.test_kprobe); in kprobe_multi_link_api_subtest() 163 prog_fd = bpf_program__fd(skel->progs.test_kretprobe); in kprobe_multi_link_api_subtest() 215 link1 = bpf_program__attach_kprobe_multi_opts(skel->progs.test_kprobe, in kprobe_multi_attach_api_subtest() 231 link2 = bpf_program__attach_kprobe_multi_opts(skel->progs.test_kretprobe, in kprobe_multi_attach_api_subtest() 295 link1 = bpf_program__attach_uprobe_multi(skel->progs.uprobe, -1, in uprobe_multi_attach_api_subtest() [all …]
|
D | check_mtu.c | 53 prog = skel->progs.xdp_use_helper_basic; in test_check_mtu_xdp_attach() 121 test_check_mtu_run_xdp(skel, skel->progs.xdp_use_helper, mtu); in test_check_mtu_xdp() 122 test_check_mtu_run_xdp(skel, skel->progs.xdp_exceed_mtu, mtu); in test_check_mtu_xdp() 123 test_check_mtu_run_xdp(skel, skel->progs.xdp_minus_delta, mtu); in test_check_mtu_xdp() 124 test_check_mtu_run_xdp(skel, skel->progs.xdp_input_len, mtu); in test_check_mtu_xdp() 125 test_check_mtu_run_xdp(skel, skel->progs.xdp_input_len_exceed, mtu); in test_check_mtu_xdp() 174 test_check_mtu_run_tc(skel, skel->progs.tc_use_helper, mtu); in test_check_mtu_tc() 175 test_check_mtu_run_tc(skel, skel->progs.tc_exceed_mtu, mtu); in test_check_mtu_tc() 176 test_check_mtu_run_tc(skel, skel->progs.tc_exceed_mtu_da, mtu); in test_check_mtu_tc() 177 test_check_mtu_run_tc(skel, skel->progs.tc_minus_delta, mtu); in test_check_mtu_tc() [all …]
|
D | log_fixup.c | 24 bpf_program__set_autoload(skel->progs.bad_relo, true); in bad_core_relo() 26 bpf_program__set_log_buf(skel->progs.bad_relo, log_buf, log_buf_size ?: sizeof(log_buf)); in bad_core_relo() 27 bpf_program__set_log_level(skel->progs.bad_relo, 1 | 8); /* BPF_LOG_FIXED to force truncation */ in bad_core_relo() 82 bpf_program__set_autoload(skel->progs.bad_relo_subprog, true); in bad_core_relo_subprog() 83 bpf_program__set_log_buf(skel->progs.bad_relo_subprog, log_buf, sizeof(log_buf)); in bad_core_relo_subprog() 116 bpf_program__set_autoload(skel->progs.use_missing_map, true); in missing_map() 117 bpf_program__set_log_buf(skel->progs.use_missing_map, log_buf, sizeof(log_buf)); in missing_map() 148 bpf_program__set_autoload(skel->progs.use_missing_kfunc, true); in missing_kfunc() 149 bpf_program__set_log_buf(skel->progs.use_missing_kfunc, log_buf, sizeof(log_buf)); in missing_kfunc()
|
D | struct_ops_autocreate.c | 65 ASSERT_TRUE(bpf_program__autoload(skel->progs.test_1), "test_1 default autoload"); in can_load_partial_object() 66 ASSERT_TRUE(bpf_program__autoload(skel->progs.test_2), "test_2 default autoload"); in can_load_partial_object() 72 ASSERT_TRUE(bpf_program__autoload(skel->progs.test_1), "test_1 actual autoload"); in can_load_partial_object() 73 ASSERT_FALSE(bpf_program__autoload(skel->progs.test_2), "test_2 actual autoload"); in can_load_partial_object() 124 ASSERT_FALSE(bpf_program__autoload(skel->progs.foo), "foo default autoload"); in autoload_and_shadow_vars() 125 ASSERT_FALSE(bpf_program__autoload(skel->progs.bar), "bar default autoload"); in autoload_and_shadow_vars() 128 skel->struct_ops.testmod_1->test_1 = skel->progs.foo; in autoload_and_shadow_vars() 134 ASSERT_TRUE(bpf_program__autoload(skel->progs.foo), "foo actual autoload"); in autoload_and_shadow_vars() 135 ASSERT_FALSE(bpf_program__autoload(skel->progs.bar), "bar actual autoload"); in autoload_and_shadow_vars()
|
D | cgroup_getset_retval.c | 33 link_set_eunatch = bpf_program__attach_cgroup(obj->progs.set_eunatch, in test_setsockopt_set() 69 link_set_eunatch = bpf_program__attach_cgroup(obj->progs.set_eunatch, in test_setsockopt_set_and_get() 73 link_get_retval = bpf_program__attach_cgroup(obj->progs.get_retval, in test_setsockopt_set_and_get() 112 link_get_retval = bpf_program__attach_cgroup(obj->progs.get_retval, in test_setsockopt_default_zero() 149 link_get_retval = bpf_program__attach_cgroup(obj->progs.get_retval, in test_setsockopt_default_zero_and_set() 153 link_set_eunatch = bpf_program__attach_cgroup(obj->progs.set_eunatch, in test_setsockopt_default_zero_and_set() 194 link_set_eunatch = bpf_program__attach_cgroup(obj->progs.set_eunatch, in test_setsockopt_override() 198 link_set_eisconn = bpf_program__attach_cgroup(obj->progs.set_eisconn, in test_setsockopt_override() 202 link_get_retval = bpf_program__attach_cgroup(obj->progs.get_retval, in test_setsockopt_override() 244 link_legacy_eperm = bpf_program__attach_cgroup(obj->progs.legacy_eperm, in test_setsockopt_legacy_eperm() [all …]
|
D | percpu_alloc.c | 17 bpf_program__set_autoload(skel->progs.test_array_map_1, true); in test_array() 18 bpf_program__set_autoload(skel->progs.test_array_map_2, true); in test_array() 19 bpf_program__set_autoload(skel->progs.test_array_map_3, true); in test_array() 20 bpf_program__set_autoload(skel->progs.test_array_map_4, true); in test_array() 33 prog_fd = bpf_program__fd(skel->progs.test_array_map_1); in test_array() 53 bpf_program__set_autoload(skel->progs.test_array_map_10, true); in test_array_sleepable() 66 prog_fd = bpf_program__fd(skel->progs.test_array_map_10); in test_array_sleepable() 101 prog_fd = bpf_program__fd(skel->progs.test_cgrp_local_storage_1); in test_cgrp_local_storage()
|
D | local_kptr_stash.c | 23 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.stash_rb_nodes), &opts); in test_local_kptr_stash_simple() 44 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.stash_plain), &opts); in test_local_kptr_stash_plain() 65 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.stash_local_with_root), &opts); in test_local_kptr_stash_local_with_root() 86 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.stash_rb_nodes), &opts); in test_local_kptr_stash_unstash() 90 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.unstash_rb_node), &opts); in test_local_kptr_stash_unstash() 111 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.refcount_acquire_without_unstash), in test_refcount_acquire_without_unstash() 116 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.stash_refcounted_node), &opts); in test_refcount_acquire_without_unstash() 120 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.refcount_acquire_without_unstash), in test_refcount_acquire_without_unstash()
|
D | tc_netkit.c | 182 ASSERT_EQ(bpf_program__set_expected_attach_type(skel->progs.tc1, in serial_test_tc_netkit_basic() 184 ASSERT_EQ(bpf_program__set_expected_attach_type(skel->progs.tc2, in serial_test_tc_netkit_basic() 191 pid1 = id_from_prog_fd(bpf_program__fd(skel->progs.tc1)); in serial_test_tc_netkit_basic() 192 pid2 = id_from_prog_fd(bpf_program__fd(skel->progs.tc2)); in serial_test_tc_netkit_basic() 202 link = bpf_program__attach_netkit(skel->progs.tc1, ifindex, &optl); in serial_test_tc_netkit_basic() 237 link = bpf_program__attach_netkit(skel->progs.tc2, ifindex, &optl); in serial_test_tc_netkit_basic() 296 ASSERT_EQ(bpf_program__set_expected_attach_type(skel->progs.tc1, in serial_test_tc_netkit_multi_links_target() 298 ASSERT_EQ(bpf_program__set_expected_attach_type(skel->progs.tc2, in serial_test_tc_netkit_multi_links_target() 305 pid1 = id_from_prog_fd(bpf_program__fd(skel->progs.tc1)); in serial_test_tc_netkit_multi_links_target() 306 pid2 = id_from_prog_fd(bpf_program__fd(skel->progs.tc2)); in serial_test_tc_netkit_multi_links_target() [all …]
|
D | test_ldsx_insn.c | 22 bpf_program__set_autoload(skel->progs.rdonly_map_prog, true); in test_map_val_and_probed_memory() 23 bpf_program__set_autoload(skel->progs.map_val_prog, true); in test_map_val_and_probed_memory() 24 bpf_program__set_autoload(skel->progs.test_ptr_struct_arg, true); in test_map_val_and_probed_memory() 66 bpf_program__set_autoload(skel->progs._getsockopt, true); in test_ctx_member_sign_ext() 73 bpf_program__attach_cgroup(skel->progs._getsockopt, cgroup_fd); in test_ctx_member_sign_ext() 115 bpf_program__set_autoload(skel->progs._tc, true); in test_ctx_member_narrow_sign_ext() 121 prog_fd = bpf_program__fd(skel->progs._tc); in test_ctx_member_narrow_sign_ext()
|
D | custom_sec_handlers.c | 133 ASSERT_EQ(bpf_program__type(skel->progs.abc1), BPF_PROG_TYPE_RAW_TRACEPOINT, "abc1_type"); in test_custom_sec_handlers() 134 ASSERT_FALSE(bpf_program__autoload(skel->progs.abc1), "abc1_autoload"); in test_custom_sec_handlers() 136 ASSERT_EQ(bpf_program__type(skel->progs.abc2), BPF_PROG_TYPE_RAW_TRACEPOINT, "abc2_type"); in test_custom_sec_handlers() 137 ASSERT_EQ(bpf_program__type(skel->progs.custom1), BPF_PROG_TYPE_TRACEPOINT, "custom1_type"); in test_custom_sec_handlers() 138 ASSERT_EQ(bpf_program__type(skel->progs.custom2), BPF_PROG_TYPE_TRACEPOINT, "custom2_type"); in test_custom_sec_handlers() 139 ASSERT_EQ(bpf_program__type(skel->progs.kprobe1), BPF_PROG_TYPE_TRACEPOINT, "kprobe1_type"); in test_custom_sec_handlers() 140 ASSERT_EQ(bpf_program__type(skel->progs.xyz), BPF_PROG_TYPE_SYSCALL, "xyz_type"); in test_custom_sec_handlers() 154 skel->links.xyz = bpf_program__attach(skel->progs.kprobe1); in test_custom_sec_handlers()
|
D | global_func_dead_code.c | 20 bpf_program__set_autoload(tgt_skel->progs.chained_global_func_calls_success, true); in test_global_func_dead_code() 26 tgt_fd = bpf_program__fd(tgt_skel->progs.chained_global_func_calls_success); in test_global_func_dead_code() 33 err = bpf_program__set_attach_target(skel->progs.freplace_prog, tgt_fd, "global_good"); in test_global_func_dead_code() 47 bpf_program__set_log_buf(skel->progs.freplace_prog, log_buf, sizeof(log_buf)); in test_global_func_dead_code() 48 err = bpf_program__set_attach_target(skel->progs.freplace_prog, tgt_fd, "global_dead"); in test_global_func_dead_code()
|
D | cg_storage_multi.c | 107 parent_link = bpf_program__attach_cgroup(obj->progs.egress, in test_egress_only() 130 child_link = bpf_program__attach_cgroup(obj->progs.egress, in test_egress_only() 177 parent_egress1_link = bpf_program__attach_cgroup(obj->progs.egress1, in test_isolated() 181 parent_egress2_link = bpf_program__attach_cgroup(obj->progs.egress2, in test_isolated() 185 parent_ingress_link = bpf_program__attach_cgroup(obj->progs.ingress, in test_isolated() 219 child_egress1_link = bpf_program__attach_cgroup(obj->progs.egress1, in test_isolated() 223 child_egress2_link = bpf_program__attach_cgroup(obj->progs.egress2, in test_isolated() 227 child_ingress_link = bpf_program__attach_cgroup(obj->progs.ingress, in test_isolated() 290 parent_egress1_link = bpf_program__attach_cgroup(obj->progs.egress1, in test_shared() 294 parent_egress2_link = bpf_program__attach_cgroup(obj->progs.egress2, in test_shared() [all …]
|
D | xdp_link.c | 24 prog_fd1 = bpf_program__fd(skel1->progs.xdp_handler); in serial_test_xdp_link() 29 prog_fd2 = bpf_program__fd(skel2->progs.xdp_handler); in serial_test_xdp_link() 54 link = bpf_program__attach_xdp(skel1->progs.xdp_handler, IFINDEX_LO); in serial_test_xdp_link() 70 link = bpf_program__attach_xdp(skel1->progs.xdp_handler, IFINDEX_LO); in serial_test_xdp_link() 97 link = bpf_program__attach_xdp(skel2->progs.xdp_handler, IFINDEX_LO); in serial_test_xdp_link() 107 link = bpf_program__attach_xdp(skel2->progs.xdp_handler, IFINDEX_LO); in serial_test_xdp_link() 117 err = bpf_link__update_program(link, skel1->progs.xdp_handler); in serial_test_xdp_link() 132 err = bpf_link__update_program(link, skel1->progs.tc_handler); in serial_test_xdp_link()
|
D | cgroup1_hierarchy.c | 16 lsm_link = bpf_program__attach_lsm(skel->progs.lsm_run); in bpf_cgroup1() 21 fentry_link = bpf_program__attach_trace(skel->progs.fentry_run); in bpf_cgroup1() 34 lsm_link = bpf_program__attach_lsm(skel->progs.lsm_s_run); in bpf_cgroup1_sleepable() 39 fentry_link = bpf_program__attach_trace(skel->progs.fentry_run); in bpf_cgroup1_sleepable() 52 lsm_link = bpf_program__attach_lsm(skel->progs.lsm_run); in bpf_cgroup1_invalid_id() 57 fentry_link = bpf_program__attach_trace(skel->progs.fentry_run); in bpf_cgroup1_invalid_id() 81 err = bpf_program__set_attach_target(skel->progs.fentry_run, 0, "bpf_fentry_test1"); in test_cgroup1_hierarchy()
|
/linux-6.12.1/tools/testing/selftests/bpf/benchs/ |
D | bench_trigger.c | 118 int fd = ctx.driver_prog_fd ?: bpf_program__fd(ctx.skel->progs.trigger_driver); in trigger_producer_batch() 145 bpf_program__set_autoload(ctx.skel->progs.trigger_driver, true); in setup_ctx() 181 bpf_program__set_autoload(ctx.skel->progs.trigger_driver, false); in trigger_kernel_count_setup() 182 bpf_program__set_autoload(ctx.skel->progs.trigger_count, true); in trigger_kernel_count_setup() 185 ctx.driver_prog_fd = bpf_program__fd(ctx.skel->progs.trigger_count); in trigger_kernel_count_setup() 191 bpf_program__set_autoload(ctx.skel->progs.bench_trigger_kprobe, true); in trigger_kprobe_setup() 193 attach_bpf(ctx.skel->progs.bench_trigger_kprobe); in trigger_kprobe_setup() 199 bpf_program__set_autoload(ctx.skel->progs.bench_trigger_kretprobe, true); in trigger_kretprobe_setup() 201 attach_bpf(ctx.skel->progs.bench_trigger_kretprobe); in trigger_kretprobe_setup() 207 bpf_program__set_autoload(ctx.skel->progs.bench_trigger_kprobe_multi, true); in trigger_kprobe_multi_setup() [all …]
|
/linux-6.12.1/tools/testing/selftests/hid/ |
D | hid_bpf.c | 92 #define LOAD_PROGRAMS(progs) \ argument 93 load_programs(progs, ARRAY_SIZE(progs), _metadata, self, variant) 180 const struct test_program progs[] = { in TEST_F() local 186 LOAD_PROGRAMS(progs); in TEST_F() 231 const struct test_program progs[] = { in TEST_F() local 237 LOAD_PROGRAMS(progs); in TEST_F() 271 const struct test_program progs[] = { in TEST_F() local 276 LOAD_PROGRAMS(progs); in TEST_F() 287 const struct test_program progs[] = { in TEST_F() local 295 LOAD_PROGRAMS(progs); in TEST_F() [all …]
|
/linux-6.12.1/drivers/media/rc/ |
D | bpf-lirc.c | 157 old_array = lirc_rcu_dereference(raw->progs); in lirc_bpf_attach() 167 rcu_assign_pointer(raw->progs, new_array); in lirc_bpf_attach() 195 old_array = lirc_rcu_dereference(raw->progs); in lirc_bpf_detach() 205 rcu_assign_pointer(raw->progs, new_array); in lirc_bpf_detach() 219 if (raw->progs) { in lirc_bpf_run() 221 bpf_prog_run_array(rcu_dereference(raw->progs), in lirc_bpf_run() 238 array = lirc_rcu_dereference(rcdev->raw->progs); in lirc_bpf_free() 298 struct bpf_prog_array *progs; in lirc_prog_query() local 319 progs = lirc_rcu_dereference(rcdev->raw->progs); in lirc_prog_query() 320 cnt = progs ? bpf_prog_array_length(progs) : 0; in lirc_prog_query() [all …]
|