Home
last modified time | relevance | path

Searched refs:CAP_BPF (Results 1 – 17 of 17) sorted by relevance

/linux/tools/perf/util/
H A Dcap.h17 #ifndef CAP_BPF
18 #define CAP_BPF 39 macro
H A Dbpf-filter.c634 if (perf_cap__capable(CAP_BPF, &used_root)) in check_bpf_filter_capable()
/linux/tools/testing/selftests/bpf/
H A Dcap_helpers.h13 #ifndef CAP_BPF macro
14 #define CAP_BPF 39
H A Dtest_loader.c974 1ULL << CAP_PERFMON | 1ULL << CAP_BPF); in run_subtest()
H A Dtest_verifier.c71 1ULL << CAP_BPF)
/linux/tools/testing/selftests/bpf/progs/
H A Dverifier_mtu.c10 __caps_unpriv(CAP_BPF|CAP_NET_ADMIN)
H A Dverifier_spill_fill.c1252 __caps_unpriv(CAP_BPF) in __caps_unpriv()
1270 __caps_unpriv(CAP_BPF) in __caps_unpriv()
1250 __caps_unpriv(CAP_BPF) __caps_unpriv() argument
1268 __caps_unpriv(CAP_BPF) __caps_unpriv() argument
H A Dbpf_misc.h173 #define CAP_BPF 39 macro
/linux/kernel/bpf/
H A Dtoken.c146 if (!ns_capable(userns, CAP_BPF)) in bpf_token_create()
H A Dsyscall.c1268 if (!bpf_token_capable(token, CAP_BPF)) { in map_check_btf()
1448 if (sysctl_unprivileged_bpf_disabled && !bpf_token_capable(token, CAP_BPF)) in map_create()
1484 if (!bpf_token_capable(token, CAP_BPF)) in map_create()
2906 bpf_cap = bpf_token_capable(token, CAP_BPF); in bpf_prog_load()
5492 if (!bpf_token_capable(token, CAP_BPF)) { in bpf_btf_load()
H A Dcore.c671 !bpf_token_capable(fp->aux->token, CAP_BPF)) in bpf_prog_kallsyms_add()
H A Dverifier.c19941 env->bpf_capable = is_priv = bpf_token_capable(env->prog->aux->token, CAP_BPF); in bpf_check()
/linux/tools/testing/selftests/bpf/prog_tests/
H A Dunpriv_bpf_disabled.c14 * an old /usr/include/linux/capability.h and be < CAP_BPF; as a result
15 * CAP_BPF would not be included in ALL_CAPS. Instead use CAP_BPF as
19 #define ALL_CAPS ((2ULL << CAP_BPF) - 1)
H A Dtc_bpf.c405 ret = cap_enable_effective(1ULL << CAP_BPF | 1ULL << CAP_NET_ADMIN, &caps); in tc_bpf_non_root()
H A Dtoken.c66 return cap_disable_effective((1ULL << CAP_BPF) | in restore_priv_caps()
520 * CAP_BPF inside current userns to create privileged map; let's test in userns_map_create()
521 * that neither BPF token alone nor namespaced CAP_BPF is sufficient in userns_map_create()
527 /* no token, no CAP_BPF -> fail */ in userns_map_create()
536 /* token without CAP_BPF -> fail */ in userns_map_create()
545 /* get back effective local CAP_BPF (and CAP_SYS_ADMIN) */ in userns_map_create()
550 /* CAP_BPF without token -> fail */ in userns_map_create()
559 /* finally, namespaced CAP_BPF + token -> success */ in userns_map_create()
591 * CAP_BPF inside current userns to create privileged map; let's test in userns_btf_load()
592 * that neither BPF token alone nor namespaced CAP_BPF i in userns_btf_load()
[all...]
/linux/Documentation/admin-guide/sysctl/
H A Dnet.rst108 CAP_BPF or CAP_SYS_ADMIN in the root user name space.
/linux/net/core/
H A Dfilter.c8922 if (!bpf_token_capable(prog->aux->token, CAP_BPF)) in cg_skb_is_valid_access()
8934 if (!bpf_token_capable(prog->aux->token, CAP_BPF)) in cg_skb_is_valid_access()