Home
last modified time | relevance | path

Searched refs:CAP_BPF (Results 1 – 19 of 19) 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)) in check_bpf_filter_capable()
644 pr_err("Error: BPF filter only works for users with the CAP_BPF capability!\n" 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.c1019 1ULL << CAP_PERFMON | 1ULL << CAP_BPF); in drop_capabilities()
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.c1278 __caps_unpriv(CAP_BPF) in __caps_unpriv() argument
1296 __caps_unpriv(CAP_BPF) in __caps_unpriv() argument
H A Dbpf_misc.h175 #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.c1285 if (!bpf_token_capable(token, CAP_BPF)) { in map_check_btf()
1481 if (sysctl_unprivileged_bpf_disabled && !bpf_token_capable(token, CAP_BPF)) in map_create_alloc()
1518 if (!bpf_token_capable(token, CAP_BPF)) in map_create_alloc()
2960 bpf_cap = bpf_token_capable(token, CAP_BPF); in BTF_ID_LIST_GLOBAL_SINGLE()
5584 if (!bpf_token_capable(token, CAP_BPF)) { in bpf_btf_load()
H A Dcore.c673 !bpf_token_capable(fp->aux->token, CAP_BPF)) in bpf_prog_kallsyms_add()
H A Dhelpers.c2124 if (!bpf_token_capable(prog->aux->token, CAP_BPF)) in bpf_base_func_proto()
H A Dverifier.c21005 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/include/linux/
H A Dfilter.h1465 if (bpf_jit_harden == 1 && bpf_token_capable(prog->aux->token, CAP_BPF)) in bpf_jit_blinding_enabled()
/linux/Documentation/bpf/
H A Dsigning.rst26 privileges (``CAP_BPF`` and any program-type-specific capability, subject to
/linux/net/core/
H A Dfilter.c9168 if (!bpf_token_capable(prog->aux->token, CAP_BPF)) in cg_skb_is_valid_access()
9180 if (!bpf_token_capable(prog->aux->token, CAP_BPF)) in cg_skb_is_valid_access()