Searched refs:old_caps (Results 1 – 7 of 7) sorted by relevance
/linux-6.12.1/tools/testing/selftests/bpf/prog_tests/ |
D | deny_namespace.c | 52 __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()
|
D | bind_perm.c | 54 __u64 old_caps = 0; in test_bind_perm() local 76 ASSERT_OK(cap_disable_effective(net_bind_svc_cap, &old_caps), in test_bind_perm() 85 if (old_caps & net_bind_svc_cap) in test_bind_perm()
|
D | token.c | 57 static int drop_priv_caps(__u64 *old_caps) in drop_priv_caps() argument 62 (1ULL << CAP_SYS_ADMIN), old_caps); in drop_priv_caps() 65 static int restore_priv_caps(__u64 old_caps) in restore_priv_caps() argument 67 return cap_enable_effective(old_caps, NULL); in restore_priv_caps() 502 __u64 old_caps = 0; in userns_map_create() local 515 err = drop_priv_caps(&old_caps); in userns_map_create() 538 err = restore_priv_caps(old_caps); in userns_map_create() 573 __u64 old_caps = 0; in userns_btf_load() local 586 err = drop_priv_caps(&old_caps); in userns_btf_load() 616 err = restore_priv_caps(old_caps); in userns_btf_load() [all …]
|
D | verifier.c | 114 __u64 old_caps; in run_tests_aux() local 118 err = cap_disable_effective(1ULL << CAP_SYS_ADMIN, &old_caps); in run_tests_aux() 128 err = cap_enable_effective(old_caps, NULL); in run_tests_aux()
|
/linux-6.12.1/tools/testing/selftests/bpf/ |
D | cap_helpers.c | 10 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()
|
D | cap_helpers.h | 16 int cap_enable_effective(__u64 caps, __u64 *old_caps); 17 int cap_disable_effective(__u64 caps, __u64 *old_caps);
|
D | test_loader.c | 725 __u64 old_caps; member 735 err = cap_disable_effective(caps_to_drop, &caps->old_caps); in drop_capabilities() 752 err = cap_enable_effective(caps->old_caps, NULL); in restore_capabilities()
|