/kernel/linux/linux-6.6/tools/testing/selftests/bpf/prog_tests/ |
H A D | sockopt.c | 27 enum bpf_attach_type expected_attach_type; member 46 .descr = "getsockopt: no expected_attach_type", 54 .expected_attach_type = 0, 58 .descr = "getsockopt: wrong expected_attach_type", 66 .expected_attach_type = BPF_CGROUP_SETSOCKOPT, 77 .expected_attach_type = BPF_CGROUP_GETSOCKOPT, 98 .expected_attach_type = BPF_CGROUP_GETSOCKOPT, 122 .expected_attach_type = BPF_CGROUP_GETSOCKOPT, 148 .expected_attach_type = BPF_CGROUP_GETSOCKOPT, 164 .expected_attach_type 919 load_prog(const struct bpf_insn *insns, enum bpf_attach_type expected_attach_type) load_prog() argument [all...] |
H A D | section_names.c | 12 enum bpf_attach_type expected_attach_type; member 165 enum bpf_attach_type expected_attach_type; in test_prog_type_by_name() local 170 &expected_attach_type); in test_prog_type_by_name() 182 CHECK(expected_attach_type != test->expected_load.expected_attach_type, in test_prog_type_by_name() 183 "check_attach_type", "prog: unexpected expected_attach_type=%d for %s\n", in test_prog_type_by_name() 184 expected_attach_type, test->sec_name); in test_prog_type_by_name()
|
H A D | ctx_rewrite.c | 34 enum bpf_attach_type expected_attach_type; member 164 .expected_attach_type = BPF_CGROUP_GETSOCKOPT, 170 .expected_attach_type = BPF_CGROUP_SETSOCKOPT, 176 .expected_attach_type = BPF_CGROUP_SETSOCKOPT, 182 .expected_attach_type = BPF_CGROUP_SETSOCKOPT, 194 .expected_attach_type = BPF_CGROUP_GETSOCKOPT, 199 .expected_attach_type = BPF_CGROUP_GETSOCKOPT, 204 .expected_attach_type = BPF_CGROUP_GETSOCKOPT, 733 enum bpf_attach_type expected_attach_type; member 761 opts.expected_attach_type in match_program() [all...] |
H A D | fexit_stress.c | 25 .expected_attach_type = BPF_TRACE_FEXIT, in serial_test_fexit_stress() 31 trace_opts.expected_attach_type); in serial_test_fexit_stress()
|
H A D | module_fentry_shadow.c | 70 .expected_attach_type = BPF_TRACE_FENTRY, in test_module_fentry_shadow()
|
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/prog_tests/ |
H A D | sockopt.c | 22 enum bpf_attach_type expected_attach_type; member 41 .descr = "getsockopt: no expected_attach_type", 49 .expected_attach_type = 0, 53 .descr = "getsockopt: wrong expected_attach_type", 61 .expected_attach_type = BPF_CGROUP_SETSOCKOPT, 72 .expected_attach_type = BPF_CGROUP_GETSOCKOPT, 93 .expected_attach_type = BPF_CGROUP_GETSOCKOPT, 117 .expected_attach_type = BPF_CGROUP_GETSOCKOPT, 143 .expected_attach_type = BPF_CGROUP_GETSOCKOPT, 159 .expected_attach_type 852 load_prog(const struct bpf_insn *insns, enum bpf_attach_type expected_attach_type) load_prog() argument [all...] |
H A D | section_names.c | 12 enum bpf_attach_type expected_attach_type; member 165 enum bpf_attach_type expected_attach_type; in test_prog_type_by_name() local 170 &expected_attach_type); in test_prog_type_by_name() 182 CHECK(expected_attach_type != test->expected_load.expected_attach_type, in test_prog_type_by_name() 183 "check_attach_type", "prog: unexpected expected_attach_type=%d for %s\n", in test_prog_type_by_name() 184 expected_attach_type, test->sec_name); in test_prog_type_by_name()
|
H A D | fexit_stress.c | 28 .expected_attach_type = BPF_TRACE_FEXIT, in test_fexit_stress() 44 load_attr.expected_attach_type); in test_fexit_stress()
|
H A D | tcp_rtt.c | 97 .expected_attach_type = BPF_CGROUP_SOCK_OPS, in run_test()
|
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/ |
H A D | test_sock.c | 29 enum bpf_attach_type expected_attach_type; member 59 .expected_attach_type = BPF_CGROUP_INET4_POST_BIND, 72 .expected_attach_type = BPF_CGROUP_INET4_POST_BIND, 85 .expected_attach_type = BPF_CGROUP_INET6_POST_BIND, 98 .expected_attach_type = BPF_CGROUP_INET_SOCK_CREATE, 103 .descr = "sock_create load w/o expected_attach_type (compat mode)", 108 .expected_attach_type = 0, 117 .descr = "sock_create load w/ expected_attach_type", 122 .expected_attach_type = BPF_CGROUP_INET_SOCK_CREATE, 136 .expected_attach_type [all...] |
H A D | test_sock_addr.c | 67 enum bpf_attach_type expected_attach_type; member 650 opts.expected_attach_type = test->expected_attach_type; in load_insns() 681 bpf_program__set_expected_attach_type(prog, test->expected_attach_type); in load_path()
|
/kernel/linux/linux-6.6/tools/lib/bpf/ |
H A D | libbpf_probes.c | 118 opts.expected_attach_type = BPF_CGROUP_INET4_CONNECT; in probe_prog_load() 121 opts.expected_attach_type = BPF_CGROUP_GETSOCKOPT; in probe_prog_load() 124 opts.expected_attach_type = BPF_SK_LOOKUP; in probe_prog_load() 130 opts.expected_attach_type = BPF_LIRC_MODE2; in probe_prog_load() 138 opts.expected_attach_type = BPF_TRACE_FENTRY; in probe_prog_load() 140 opts.expected_attach_type = BPF_MODIFY_RETURN; in probe_prog_load() 185 opts.expected_attach_type = BPF_NETFILTER; in probe_prog_load()
|
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/ |
H A D | test_stub.c | 18 attr.expected_attach_type = 0; in bpf_prog_test_load() 34 load_attr.expected_attach_type = 0; in bpf_test_load_program()
|
H A D | test_sock.c | 30 enum bpf_attach_type expected_attach_type; member 117 "sock_create load w/o expected_attach_type (compat mode)", 131 "sock_create load w/ expected_attach_type", 336 attr.expected_attach_type = attach_type; in load_sock_prog() 405 progfd = load_sock_prog(test->insns, test->expected_attach_type); in run_test_case()
|
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/verifier/ |
H A D | wide_access.c | 12 .expected_attach_type = BPF_CGROUP_UDP6_SENDMSG, \ 49 .expected_attach_type = BPF_CGROUP_UDP6_SENDMSG, \
|
H A D | event_output.c | 115 .expected_attach_type = BPF_CGROUP_SETSOCKOPT,
|
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/verifier/ |
H A D | wide_access.c | 12 .expected_attach_type = BPF_CGROUP_UDP6_SENDMSG, \ 54 .expected_attach_type = BPF_CGROUP_UDP6_SENDMSG, \
|
H A D | event_output.c | 115 .expected_attach_type = BPF_CGROUP_SETSOCKOPT,
|
/kernel/linux/linux-5.10/tools/lib/bpf/ |
H A D | libbpf_probes.c | 76 xattr.expected_attach_type = BPF_CGROUP_INET4_CONNECT; in probe_load() 79 xattr.expected_attach_type = BPF_CGROUP_GETSOCKOPT; in probe_load() 82 xattr.expected_attach_type = BPF_SK_LOOKUP; in probe_load()
|
/kernel/linux/linux-6.6/kernel/bpf/ |
H A D | bpf_lsm.c | 201 if (prog->expected_attach_type == BPF_LSM_CGROUP) { in bpf_lsm_func_proto() 232 if (prog->expected_attach_type != BPF_LSM_CGROUP) in bpf_lsm_func_proto() 242 if (prog->expected_attach_type != BPF_LSM_CGROUP) in bpf_lsm_func_proto()
|
H A D | syscall.c | 2399 * expected_attach_type. Later for some of them specifying expected_attach_type 2402 * backward compatibility) expected_attach_type, should have the default attach 2403 * type assigned to expected_attach_type for the latter case, so that it can be 2406 * bpf_prog_load_fixup_attach_type() sets expected_attach_type in @attr if 2417 if (!attr->expected_attach_type) in bpf_prog_load_fixup_attach_type() 2418 attr->expected_attach_type = in bpf_prog_load_fixup_attach_type() 2422 if (!attr->expected_attach_type) in bpf_prog_load_fixup_attach_type() 2423 attr->expected_attach_type = in bpf_prog_load_fixup_attach_type() 2431 enum bpf_attach_type expected_attach_type, in bpf_prog_load_check_attach() 2430 bpf_prog_load_check_attach(enum bpf_prog_type prog_type, enum bpf_attach_type expected_attach_type, struct btf *attach_btf, u32 btf_id, struct bpf_prog *dst_prog) bpf_prog_load_check_attach() argument [all...] |
H A D | trampoline.c | 109 enum bpf_attach_type eatype = prog->expected_attach_type; in bpf_prog_has_trampoline() 493 switch (prog->expected_attach_type) { in bpf_attach_type_to_tramp() 652 p->expected_attach_type = BPF_LSM_MAC; in cgroup_shim_alloc() 1013 prog->expected_attach_type == BPF_LSM_CGROUP) in bpf_trampoline_enter() 1028 prog->expected_attach_type == BPF_LSM_CGROUP) in bpf_trampoline_exit()
|
H A D | cgroup.c | 295 if (pl->prog->expected_attach_type == BPF_LSM_CGROUP) in cgroup_bpf_release() 300 if (pl->link->link.prog->expected_attach_type == BPF_LSM_CGROUP) in cgroup_bpf_release() 2332 if (prog->expected_attach_type == BPF_CGROUP_SETSOCKOPT) in cg_sockopt_func_proto() 2336 if (prog->expected_attach_type == BPF_CGROUP_SETSOCKOPT) in cg_sockopt_func_proto() 2369 return prog->expected_attach_type == in cg_sockopt_is_valid_access() 2376 return prog->expected_attach_type == in cg_sockopt_is_valid_access() 2404 return prog->expected_attach_type == BPF_CGROUP_GETSOCKOPT; in cg_sockopt_is_valid_access() 2530 switch (prog->expected_attach_type) { in cgroup_common_func_proto() 2545 switch (prog->expected_attach_type) { in cgroup_common_func_proto()
|
/kernel/linux/linux-5.10/kernel/bpf/ |
H A D | syscall.c | 1967 * expected_attach_type. Later for some of them specifying expected_attach_type 1970 * backward compatibility) expected_attach_type, should have the default attach 1971 * type assigned to expected_attach_type for the latter case, so that it can be 1974 * bpf_prog_load_fixup_attach_type() sets expected_attach_type in @attr if 1985 if (!attr->expected_attach_type) in bpf_prog_load_fixup_attach_type() 1986 attr->expected_attach_type = in bpf_prog_load_fixup_attach_type() 1994 enum bpf_attach_type expected_attach_type, in bpf_prog_load_check_attach() 2018 switch (expected_attach_type) { in bpf_prog_load_check_attach() 2028 switch (expected_attach_type) { in bpf_prog_load_check_attach() 1993 bpf_prog_load_check_attach(enum bpf_prog_type prog_type, enum bpf_attach_type expected_attach_type, u32 btf_id, u32 prog_fd) bpf_prog_load_check_attach() argument [all...] |
/kernel/linux/linux-6.6/kernel/trace/ |
H A D | bpf_trace.c | 952 prog->expected_attach_type == BPF_TRACE_ITER) in bpf_d_path_allowed() 1579 if (prog->expected_attach_type == BPF_TRACE_KPROBE_MULTI) in kprobe_prog_func_proto() 1581 if (prog->expected_attach_type == BPF_TRACE_UPROBE_MULTI) in kprobe_prog_func_proto() 1585 if (prog->expected_attach_type == BPF_TRACE_KPROBE_MULTI) in kprobe_prog_func_proto() 1587 if (prog->expected_attach_type == BPF_TRACE_UPROBE_MULTI) in kprobe_prog_func_proto() 1981 return prog->expected_attach_type == BPF_TRACE_ITER ? in tracing_prog_func_proto() 1985 return prog->expected_attach_type == BPF_TRACE_ITER ? in tracing_prog_func_proto() 1989 return prog->expected_attach_type == BPF_TRACE_ITER ? in tracing_prog_func_proto() 2004 if (!fn && prog->expected_attach_type == BPF_TRACE_ITER) in tracing_prog_func_proto() 2886 if (prog->expected_attach_type ! in bpf_kprobe_multi_link_attach() [all...] |