Lines Matching refs:prog

73 void bpf_lsm_find_cgroup_shim(const struct bpf_prog *prog,  in BTF_SET_END()
78 if (btf_type_vlen(prog->aux->attach_func_proto) < 1 || in BTF_SET_END()
80 prog->aux->attach_btf_id)) { in BTF_SET_END()
86 args = btf_params(prog->aux->attach_func_proto); in BTF_SET_END()
99 const struct bpf_prog *prog) in bpf_lsm_verify_prog() argument
101 if (!prog->gpl_compatible) { in bpf_lsm_verify_prog()
107 if (!btf_id_set_contains(&bpf_lsm_hooks, prog->aux->attach_btf_id)) { in bpf_lsm_verify_prog()
109 prog->aux->attach_btf_id, prog->aux->attach_func_name); in bpf_lsm_verify_prog()
144 static bool bpf_ima_inode_hash_allowed(const struct bpf_prog *prog) in bpf_ima_inode_hash_allowed() argument
146 return bpf_lsm_is_sleepable_hook(prog->aux->attach_btf_id); in bpf_ima_inode_hash_allowed()
196 bpf_lsm_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in bpf_lsm_func_proto() argument
200 if (prog->expected_attach_type == BPF_LSM_CGROUP) { in bpf_lsm_func_proto()
201 func_proto = cgroup_common_func_proto(func_id, prog); in bpf_lsm_func_proto()
224 return prog->aux->sleepable ? &bpf_ima_inode_hash_proto : NULL; in bpf_lsm_func_proto()
226 return prog->aux->sleepable ? &bpf_ima_file_hash_proto : NULL; in bpf_lsm_func_proto()
228 return bpf_prog_has_trampoline(prog) ? &bpf_get_attach_cookie_proto : NULL; in bpf_lsm_func_proto()
231 if (prog->expected_attach_type != BPF_LSM_CGROUP) in bpf_lsm_func_proto()
234 prog->aux->attach_btf_id)) in bpf_lsm_func_proto()
237 prog->aux->attach_btf_id)) in bpf_lsm_func_proto()
241 if (prog->expected_attach_type != BPF_LSM_CGROUP) in bpf_lsm_func_proto()
244 prog->aux->attach_btf_id)) in bpf_lsm_func_proto()
247 prog->aux->attach_btf_id)) in bpf_lsm_func_proto()
252 return tracing_prog_func_proto(func_id, prog); in bpf_lsm_func_proto()