Home
last modified time | relevance | path

Searched refs:old_caps (Results 1 – 6 of 6) sorted by relevance

/Linux-v6.6/tools/testing/selftests/bpf/prog_tests/
Ddeny_namespace.c52 __u64 old_caps = 0; in test_userns_create_bpf() local
54 cap_enable_effective(cap_mask, &old_caps); in test_userns_create_bpf()
58 cap_disable_effective(cap_mask, &old_caps); in test_userns_create_bpf()
62 if (cap_mask & old_caps) in test_userns_create_bpf()
69 __u64 old_caps = 0; in test_unpriv_userns_create_no_bpf() local
71 cap_disable_effective(cap_mask, &old_caps); in test_unpriv_userns_create_no_bpf()
75 if (cap_mask & old_caps) in test_unpriv_userns_create_no_bpf()
Dbind_perm.c56 __u64 old_caps = 0; in test_bind_perm() local
78 ASSERT_OK(cap_disable_effective(net_bind_svc_cap, &old_caps), in test_bind_perm()
87 if (old_caps & net_bind_svc_cap) in test_bind_perm()
Dverifier.c93 __u64 old_caps; in run_tests_aux() local
97 err = cap_disable_effective(1ULL << CAP_SYS_ADMIN, &old_caps); in run_tests_aux()
107 err = cap_enable_effective(old_caps, NULL); in run_tests_aux()
/Linux-v6.6/tools/testing/selftests/bpf/
Dcap_helpers.c10 int cap_enable_effective(__u64 caps, __u64 *old_caps) in cap_enable_effective() argument
24 if (old_caps) in cap_enable_effective()
25 *old_caps = (__u64)(data[1].effective) << 32 | data[0].effective; in cap_enable_effective()
40 int cap_disable_effective(__u64 caps, __u64 *old_caps) in cap_disable_effective() argument
54 if (old_caps) in cap_disable_effective()
55 *old_caps = (__u64)(data[1].effective) << 32 | data[0].effective; in cap_disable_effective()
Dcap_helpers.h16 int cap_enable_effective(__u64 caps, __u64 *old_caps);
17 int cap_disable_effective(__u64 caps, __u64 *old_caps);
Dtest_loader.c409 __u64 old_caps; member
419 err = cap_disable_effective(caps_to_drop, &caps->old_caps); in drop_capabilities()
436 err = cap_enable_effective(caps->old_caps, NULL); in restore_capabilities()