| /linux/tools/testing/selftests/bpf/prog_tests/ |
| H A D | sockopt.c | 30 enum bpf_attach_type expected_attach_type; member 50 .descr = "getsockopt: no expected_attach_type", 58 .expected_attach_type = 0, 62 .descr = "getsockopt: wrong expected_attach_type", 70 .expected_attach_type = BPF_CGROUP_SETSOCKOPT, 81 .expected_attach_type = BPF_CGROUP_GETSOCKOPT, 102 .expected_attach_type = BPF_CGROUP_GETSOCKOPT, 126 .expected_attach_type = BPF_CGROUP_GETSOCKOPT, 152 .expected_attach_type = BPF_CGROUP_GETSOCKOPT, 168 .expected_attach_type 988 load_prog(const struct bpf_insn * insns,enum bpf_prog_type prog_type,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 210 enum bpf_attach_type expected_attach_type; in test_prog_type_by_name() local 215 &expected_attach_type); in test_prog_type_by_name() 227 CHECK(expected_attach_type != test->expected_load.expected_attach_type, in test_prog_type_by_name() 229 expected_attach_type, test->sec_name); in test_prog_type_by_name()
|
| H A D | ctx_rewrite.c | 35 enum bpf_attach_type expected_attach_type; member 167 .expected_attach_type = BPF_CGROUP_GETSOCKOPT, 173 .expected_attach_type = BPF_CGROUP_SETSOCKOPT, 179 .expected_attach_type = BPF_CGROUP_SETSOCKOPT, 185 .expected_attach_type = BPF_CGROUP_SETSOCKOPT, 197 .expected_attach_type = BPF_CGROUP_GETSOCKOPT, 202 .expected_attach_type = BPF_CGROUP_GETSOCKOPT, 207 .expected_attach_type = BPF_CGROUP_GETSOCKOPT, 636 enum bpf_attach_type expected_attach_type; 665 opts.expected_attach_type in match_program() 637 enum bpf_attach_type expected_attach_type; global() member [all...] |
| H A D | fexit_stress.c | 26 .expected_attach_type = BPF_TRACE_FEXIT, in serial_test_fexit_stress() 32 trace_opts.expected_attach_type); in serial_test_fexit_stress()
|
| H A D | module_fentry_shadow.c | 71 .expected_attach_type = BPF_TRACE_FENTRY, in test_module_fentry_shadow()
|
| /linux/tools/testing/selftests/bpf/verifier/ |
| H A D | sleepable.c | 8 .expected_attach_type = BPF_TRACE_FENTRY, 21 .expected_attach_type = BPF_TRACE_FENTRY, 34 .expected_attach_type = BPF_MODIFY_RETURN, 47 .expected_attach_type = BPF_TRACE_ITER, 61 .expected_attach_type = BPF_LSM_MAC, 85 .expected_attach_type = BPF_TRACE_RAW_TP, 98 .expected_attach_type = BPF_TRACE_RAW_TP,
|
| H A D | ctx_sk_lookup.c | 259 .expected_attach_type = BPF_SK_LOOKUP, 274 .expected_attach_type = BPF_SK_LOOKUP, 287 .expected_attach_type = BPF_SK_LOOKUP, 301 .expected_attach_type = BPF_SK_LOOKUP, 314 .expected_attach_type = BPF_SK_LOOKUP, 328 .expected_attach_type = BPF_SK_LOOKUP, 342 .expected_attach_type = BPF_SK_LOOKUP, 355 .expected_attach_type = BPF_SK_LOOKUP, 369 .expected_attach_type = BPF_SK_LOOKUP, 383 .expected_attach_type = BPF_SK_LOOKUP, [all …]
|
| H A D | bpf_st_mem.c | 13 .expected_attach_type = BPF_SK_LOOKUP, 35 .expected_attach_type = BPF_SK_LOOKUP, 65 .expected_attach_type = BPF_SK_LOOKUP, 93 .expected_attach_type = BPF_SK_LOOKUP,
|
| 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,
|
| H A D | atomic_fetch_add.c | 102 .expected_attach_type = BPF_TRACE_FENTRY,
|
| /linux/tools/lib/bpf/ |
| H A D | libbpf_probes.c | 121 opts.expected_attach_type = BPF_CGROUP_INET4_CONNECT; in probe_prog_load() 124 opts.expected_attach_type = BPF_CGROUP_GETSOCKOPT; in probe_prog_load() 127 opts.expected_attach_type = BPF_SK_LOOKUP; in probe_prog_load() 133 opts.expected_attach_type = BPF_LIRC_MODE2; in probe_prog_load() 141 opts.expected_attach_type = BPF_TRACE_FENTRY; in probe_prog_load() 143 opts.expected_attach_type = BPF_MODIFY_RETURN; in probe_prog_load() 188 opts.expected_attach_type = BPF_NETFILTER; in probe_prog_load()
|
| H A D | features.c | 302 .expected_attach_type = BPF_CGROUP_INET_SOCK_CREATE, 314 * to see if kernel supports expected_attach_type field for in probe_module_btf() 441 .expected_attach_type = BPF_TRACE_UPROBE_MULTI, in probe_kern_bpf_cookie() 761 "BPF_PROG_LOAD expected_attach_type attribute", in feat_supported()
|
| H A D | libbpf.c | 407 /* expected_attach_type is optional, if kernel doesn't support that */ 432 enum bpf_attach_type expected_attach_type; member 504 enum bpf_attach_type expected_attach_type; 1377 prog->expected_attach_type = kern_member_idx; in bpf_object__init_kern_struct_ops_maps() 1391 if (prog->expected_attach_type != kern_member_idx) { in bpf_object__init_kern_struct_ops_maps() 1392 pr_warn("struct_ops init_kern %s func ptr %s: invalid reuse of prog %s in sec %s with type %u: expected_attach_type %u != kern_member_idx %u\n", in bpf_object__init_kern_struct_ops_maps() 1394 prog->expected_attach_type, kern_member_idx); 8361 /* old kernels might not support specifying expected_attach_type */ in bpf_program_record_relos() 8363 opts->expected_attach_type = 0; in bpf_program_record_relos() 8367 /* for BPF_TRACE_UPROBE_MULTI, user might want to query expected_attach_type in bpf_program_record_relos() 502 enum bpf_attach_type expected_attach_type; global() member 10424 libbpf_prog_type_by_name(const char * name,enum bpf_prog_type * prog_type,enum bpf_attach_type * expected_attach_type) libbpf_prog_type_by_name() argument [all...] |
| /linux/kernel/bpf/ |
| H A D | syscall.c | 2732 * expected_attach_type. Later for some of them specifying expected_attach_type in bpf_prog_load_fixup_attach_type() 2735 * backward compatibility) expected_attach_type, should have the default attach in bpf_prog_load_fixup_attach_type() 2736 * type assigned to expected_attach_type for the latter case, so that it can be in bpf_prog_load_fixup_attach_type() 2739 * bpf_prog_load_fixup_attach_type() sets expected_attach_type in @attr if in bpf_prog_load_fixup_attach_type() 2750 if (!attr->expected_attach_type) in bpf_prog_load_check_attach() 2751 attr->expected_attach_type = in bpf_prog_load_check_attach() 2755 if (!attr->expected_attach_type) in bpf_prog_load_check_attach() 2756 attr->expected_attach_type = in bpf_prog_load_check_attach() 2764 enum bpf_attach_type expected_attach_type, in bpf_prog_load_check_attach() 2746 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,bool multi_func) bpf_prog_load_check_attach() argument [all...] |
| H A D | bpf_lsm.c | 252 if (prog->expected_attach_type == BPF_LSM_CGROUP) { in bpf_lsm_func_proto() 283 if (prog->expected_attach_type != BPF_LSM_CGROUP) in bpf_lsm_func_proto() 293 if (prog->expected_attach_type != BPF_LSM_CGROUP) in BTF_ID()
|
| H A D | cgroup.c | 1263 return prog->expected_attach_type == type; in cgroup_bpf_detach() 2849 if (prog->expected_attach_type == BPF_CGROUP_SETSOCKOPT) 2853 if (prog->expected_attach_type == BPF_CGROUP_SETSOCKOPT) 2886 return prog->expected_attach_type == 2893 return prog->expected_attach_type == 2921 return prog->expected_attach_type == BPF_CGROUP_GETSOCKOPT; 3321 switch (prog->expected_attach_type) { 3339 switch (prog->expected_attach_type) {
|
| H A D | trampoline.c | 179 enum bpf_attach_type eatype = prog->expected_attach_type; in bpf_prog_has_trampoline() 830 switch (prog->expected_attach_type) { in bpf_trampoline_update() 1149 p->expected_attach_type = BPF_LSM_MAC; in cgroup_shim_alloc() 1509 prog->expected_attach_type == BPF_LSM_CGROUP) in bpf_trampoline_enter() 1524 prog->expected_attach_type == BPF_LSM_CGROUP) in bpf_trampoline_exit() 1756 if (prog->expected_attach_type == BPF_TRACE_FSESSION_MULTI) { in bpf_trampoline_multi_attach()
|
| H A D | verifier.c | 7068 prog->expected_attach_type == BPF_LSM_MAC && in check_helper_mem_access() 10539 enum bpf_attach_type eatype = env->prog->expected_attach_type; in record_func_map() 12323 env->prog->expected_attach_type == BPF_CGROUP_GETSOCKOPT) 12331 env->prog->expected_attach_type == BPF_LSM_CGROUP) { 12885 env->prog->expected_attach_type == BPF_CGROUP_GETSOCKOPT) in check_kfunc_args() 12889 env->prog->expected_attach_type == BPF_LSM_CGROUP) { in check_kfunc_args() 14983 if (env->prog->expected_attach_type == BPF_TRACE_ITER) in scalar32_min_max_sdiv() 15620 (prog_type == BPF_PROG_TYPE_TRACING && env->prog->expected_attach_type != BPF_TRACE_ITER in adjust_scalar_min_max_vals() 19463 switch (env->prog->expected_attach_type) { in free_states() 19484 if (env->prog->expected_attach_type in free_states() [all...] |
| H A D | bpf_iter.c | 439 link->prog->expected_attach_type != new_prog->expected_attach_type || in bpf_iter_link_show_fdinfo()
|
| /linux/kernel/trace/ |
| H A D | bpf_trace.c | 990 prog->expected_attach_type == BPF_TRACE_ITER) 1002 return prog->expected_attach_type == BPF_TRACE_FENTRY; 1330 return prog->expected_attach_type == BPF_TRACE_KPROBE_MULTI || in is_uprobe_session() 1331 prog->expected_attach_type == BPF_TRACE_KPROBE_SESSION; in is_uprobe_session() 1337 prog->expected_attach_type == BPF_TRACE_KPROBE_SESSION; in is_trace_fsession() 1342 return prog->expected_attach_type == BPF_TRACE_UPROBE_MULTI || 1343 prog->expected_attach_type == BPF_TRACE_UPROBE_SESSION; in kprobe_prog_func_proto() 1349 prog->expected_attach_type == BPF_TRACE_UPROBE_SESSION; in kprobe_prog_func_proto() 1355 (prog->expected_attach_type == BPF_TRACE_FSESSION || in kprobe_prog_func_proto() 1356 prog->expected_attach_type in kprobe_prog_func_proto() [all...] |
| /linux/net/core/ |
| H A D | sock_reuseport.c | 467 * passes to it. expected_attach_type is set by user space and does not in reuseport_stop_listen_sock() 473 prog->expected_attach_type == BPF_SK_REUSEPORT_SELECT_OR_MIGRATE; in reuseport_stop_listen_sock()
|
| /linux/tools/testing/selftests/bpf/ |
| H A D | test_verifier.c | 159 enum bpf_attach_type expected_attach_type; member 1561 opts.expected_attach_type = test->expected_attach_type; in do_test_single() 1577 opts.expected_attach_type); in do_test_single()
|
| /linux/net/ipv4/ |
| H A D | bpf_tcp_ca.c | 144 midx = prog->expected_attach_type; in prog_ops_moff()
|
| /linux/net/bpf/ |
| H A D | test_run.c | 697 switch (prog->expected_attach_type) { in bpf_prog_test_run_tracing() 1356 if (prog->expected_attach_type == BPF_XDP_DEVMAP || in bpf_prog_test_run_xdp() 1357 prog->expected_attach_type == BPF_XDP_CPUMAP) in bpf_prog_test_run_xdp()
|