/linux-6.3-rc2/security/keys/ |
A D | keyctl.c | 260 key_ref_t key_ref; in keyctl_get_keyring_ID() local 329 key_ref_t key_ref; in keyctl_update_key() local 381 key_ref_t key_ref; in keyctl_revoke_key() local 422 key_ref_t key_ref; in keyctl_invalidate_key() local 649 key_ref_t key_ref; in keyctl_describe_key() local 828 key_ref_t key_ref; in keyctl_read_key() local 953 key_ref_t key_ref; in keyctl_chown_key() local 1070 key_ref_t key_ref; in keyctl_setperm_key() local 1455 key_ref_t key_ref; in keyctl_set_timeout() local 1561 key_ref_t key_ref; in keyctl_get_security() local [all …]
|
A D | process_keys.c | 435 key_ref = NULL; in search_cred_keyrings_rcu() 449 ret = key_ref; in search_cred_keyrings_rcu() 452 err = key_ref; in search_cred_keyrings_rcu() 470 ret = key_ref; in search_cred_keyrings_rcu() 473 err = key_ref; in search_cred_keyrings_rcu() 526 return key_ref; in search_cred_keyrings_rcu() 547 err = key_ref; in search_process_keyrings_rcu() 577 key_ref = ret; in search_process_keyrings_rcu() 579 key_ref = err; in search_process_keyrings_rcu() 582 return key_ref; in search_process_keyrings_rcu() [all …]
|
A D | key.c | 783 return key_ref; in __key_update() 787 key_ref = ERR_PTR(ret); in __key_update() 811 key_ref_t key_ref; in __key_create_or_update() local 862 key_ref = ERR_PTR(ret); in __key_create_or_update() 896 if (key_ref) in __key_create_or_update() 901 if (key_ref) { in __key_create_or_update() 902 key_ref_put(key_ref); in __key_create_or_update() 950 return key_ref; in __key_create_or_update() 962 key_ref_put(key_ref); in __key_create_or_update() 968 key_ref = __key_update(key_ref, &prep); in __key_create_or_update() [all …]
|
A D | request_key.c | 375 key_ref_t key_ref; in construct_alloc_key() local 417 if (!IS_ERR(key_ref)) in construct_alloc_key() 436 key = key_ref_to_ptr(key_ref); in construct_alloc_key() 581 key_ref_t key_ref; in request_key_and_link() local 605 if (!IS_ERR(key_ref)) { in request_key_and_link() 610 key_ref_put(key_ref); in request_key_and_link() 616 key = key_ref_to_ptr(key_ref); in request_key_and_link() 629 key = ERR_CAST(key_ref); in request_key_and_link() 783 key_ref_t key_ref; in request_key_rcu() local 793 if (IS_ERR(key_ref)) { in request_key_rcu() [all …]
|
A D | permission.c | 26 int key_task_permission(const key_ref_t key_ref, const struct cred *cred, in key_task_permission() argument 51 key = key_ref_to_ptr(key_ref); in key_task_permission() 82 if (is_key_possessed(key_ref)) in key_task_permission() 90 return security_key_permission(key_ref, cred, need_perm); in key_task_permission()
|
A D | keyctl_pkey.c | 82 key_ref_t key_ref; in keyctl_pkey_params_get() local 98 key_ref = lookup_user_key(id, 0, KEY_NEED_SEARCH); in keyctl_pkey_params_get() 99 if (IS_ERR(key_ref)) in keyctl_pkey_params_get() 100 return PTR_ERR(key_ref); in keyctl_pkey_params_get() 101 params->key = key_ref_to_ptr(key_ref); in keyctl_pkey_params_get()
|
A D | dh.c | 21 key_ref_t key_ref; in dh_data_from_key() local 25 key_ref = lookup_user_key(keyid, 0, KEY_NEED_READ); in dh_data_from_key() 26 if (IS_ERR(key_ref)) { in dh_data_from_key() 31 key = key_ref_to_ptr(key_ref); in dh_data_from_key()
|
A D | proc.c | 158 key_ref_t key_ref, skey_ref; in proc_keys_show() local 175 key_ref = make_key_ref(key, 0); in proc_keys_show() 186 key_ref = make_key_ref(key, 1); in proc_keys_show() 191 rc = key_task_permission(key_ref, ctx.cred, KEY_NEED_VIEW); in proc_keys_show()
|
A D | internal.h | 181 extern int key_task_permission(const key_ref_t key_ref, 205 static inline int key_permission(const key_ref_t key_ref, in key_permission() argument 208 return key_task_permission(key_ref, current_cred(), need_perm); in key_permission()
|
/linux-6.3-rc2/include/linux/ |
A D | key.h | 161 static inline struct key *key_ref_to_ptr(const key_ref_t key_ref) in key_ref_to_ptr() argument 163 return (struct key *) ((unsigned long) key_ref & ~1UL); in key_ref_to_ptr() 166 static inline bool is_key_possessed(const key_ref_t key_ref) in is_key_possessed() argument 168 return (unsigned long) key_ref & 1UL; in is_key_possessed() 317 static inline void key_ref_put(key_ref_t key_ref) in key_ref_put() argument 319 key_put(key_ref_to_ptr(key_ref)); in key_ref_put()
|
A D | security.h | 1910 int security_key_permission(key_ref_t key_ref, const struct cred *cred, 1927 static inline int security_key_permission(key_ref_t key_ref, in security_key_permission() argument
|
A D | lsm_hook_defs.h | 382 LSM_HOOK(int, 0, key_permission, key_ref_t key_ref, const struct cred *cred,
|
/linux-6.3-rc2/crypto/ |
A D | af_alg.c | 277 key_ref_t key_ref; in lookup_key() local 279 key_ref = lookup_user_key(serial, 0, KEY_NEED_SEARCH); in lookup_key() 280 if (IS_ERR(key_ref)) in lookup_key() 281 return ERR_CAST(key_ref); in lookup_key() 283 return key_ref_to_ptr(key_ref); in lookup_key()
|
/linux-6.3-rc2/kernel/trace/ |
A D | bpf_trace.c | 1240 key_ref_t key_ref; in bpf_lookup_user_key() local 1250 key_ref = lookup_user_key(serial, flags, KEY_DEFER_PERM_CHECK); in bpf_lookup_user_key() 1251 if (IS_ERR(key_ref)) in bpf_lookup_user_key() 1256 key_put(key_ref_to_ptr(key_ref)); in bpf_lookup_user_key() 1260 bkey->key = key_ref_to_ptr(key_ref); in bpf_lookup_user_key()
|
/linux-6.3-rc2/security/ |
A D | security.c | 2635 int security_key_permission(key_ref_t key_ref, const struct cred *cred, in security_key_permission() argument 2638 return call_int_hook(key_permission, 0, key_ref, cred, need_perm); in security_key_permission()
|
/linux-6.3-rc2/security/smack/ |
A D | smack_lsm.c | 4348 static int smack_key_permission(key_ref_t key_ref, in smack_key_permission() argument 4382 keyp = key_ref_to_ptr(key_ref); in smack_key_permission()
|
/linux-6.3-rc2/Documentation/security/keys/ |
A D | core.rst | 1130 struct key *key_ref_to_ptr(const key_ref_t key_ref); 1132 bool is_key_possessed(const key_ref_t key_ref); 1211 void key_ref_put(key_ref_t key_ref);
|
/linux-6.3-rc2/security/selinux/ |
A D | hooks.c | 6635 static int selinux_key_permission(key_ref_t key_ref, in selinux_key_permission() argument 6674 key = key_ref_to_ptr(key_ref); in selinux_key_permission()
|