Home
last modified time | relevance | path

Searched refs:bpf_token_capable (Results 1 – 12 of 12) sorted by relevance

/linux/kernel/bpf/
H A Dtoken.c17 bool bpf_token_capable(const struct bpf_token *token, int cap) in bpf_token_capable() function
H A Dsyscall.c1275 if (!bpf_token_capable(token, CAP_BPF)) { in map_check_btf()
1455 if (sysctl_unprivileged_bpf_disabled && !bpf_token_capable(token, CAP_BPF)) in map_create()
1491 if (!bpf_token_capable(token, CAP_BPF)) in map_create()
1499 if (!bpf_token_capable(token, CAP_NET_ADMIN)) in map_create()
2913 bpf_cap = bpf_token_capable(token, CAP_BPF); in bpf_prog_load()
2941 if (is_net_admin_prog_type(type) && !bpf_token_capable(token, CAP_NET_ADMIN)) in bpf_prog_load()
2943 if (is_perfmon_prog_type(type) && !bpf_token_capable(token, CAP_PERFMON)) in bpf_prog_load()
4404 if (!bpf_token_capable(prog->aux->token, CAP_NET_ADMIN)) in bpf_prog_attach_check_attach_type()
5472 if (!bpf_token_capable(token, CAP_BPF)) { in bpf_btf_load()
5504 if (!bpf_token_capable(token, CAP_SYS_ADMIN)) { in bpf_btf_get_fd_by_id()
[all …]
H A Dhelpers.c2109 if (!bpf_token_capable(prog->aux->token, CAP_BPF)) in bpf_base_func_proto()
2177 if (!bpf_token_capable(prog->aux->token, CAP_PERFMON)) in bpf_base_func_proto()
H A Dcore.c672 !bpf_token_capable(fp->aux->token, CAP_BPF)) in bpf_prog_kallsyms_add()
H A Dverifier.c25951 env->bpf_capable = is_priv = bpf_token_capable(env->prog->aux->token, CAP_BPF); in bpf_check()
/linux/drivers/media/rc/
H A Dbpf-lirc.c113 if (bpf_token_capable(prog->aux->token, CAP_PERFMON)) in lirc_mode2_func_proto()
/linux/include/linux/
H A Dbpf.h2728 bool bpf_token_capable(const struct bpf_token *token, int cap);
2732 return bpf_token_capable(token, CAP_PERFMON); in bpf_allow_ptr_leaks()
2737 return bpf_token_capable(token, CAP_PERFMON); in bpf_allow_uninit_stack()
2744 bpf_token_capable(token, CAP_PERFMON); in bpf_bypass_spec_v1()
2751 bpf_token_capable(token, CAP_PERFMON); in bpf_bypass_spec_v4()
3161 static inline bool bpf_token_capable(const struct bpf_token *token, int cap) in bpf_token_capable() function
H A Dlsm_hook_defs.h444 LSM_HOOK(int, 0, bpf_token_capable, const struct bpf_token *token, int cap)
/linux/security/
H A Dsecurity.c5318 return call_int_hook(bpf_token_capable, token, cap); in security_bpf_token_capable()
/linux/kernel/trace/
H A Dbpf_trace.c1269 if (!bpf_token_capable(prog->aux->token, CAP_SYS_ADMIN)) in bpf_tracing_func_proto()
/linux/net/core/
H A Dfilter.c8890 if (!bpf_token_capable(prog->aux->token, CAP_BPF)) in cg_skb_is_valid_access()
8902 if (!bpf_token_capable(prog->aux->token, CAP_BPF)) in cg_skb_is_valid_access()
12113 if (!bpf_token_capable(prog->aux->token, CAP_PERFMON)) in bpf_sk_base_func_proto()
/linux/security/selinux/
H A Dhooks.c7707 LSM_HOOK_INIT(bpf_token_capable, selinux_bpf_token_capable),