/linux-master/security/keys/ |
H A D | keyctl.c | 80 key_ref_t keyring_ref, key_ref; local 134 key_ref = key_create_or_update(keyring_ref, type, description, 137 if (!IS_ERR(key_ref)) { 138 ret = key_ref_to_ptr(key_ref)->serial; 139 key_ref_put(key_ref); 142 ret = PTR_ERR(key_ref); 260 key_ref_t key_ref; local 265 key_ref = lookup_user_key(id, lflags, KEY_NEED_SEARCH); 266 if (IS_ERR(key_ref)) { 267 ret = PTR_ERR(key_ref); 329 key_ref_t key_ref; local 381 key_ref_t key_ref; local 422 key_ref_t key_ref; local 517 key_ref_t keyring_ref, key_ref; local 554 key_ref_t keyring_ref, key_ref; local 598 key_ref_t key_ref, from_ref, to_ref; local 649 key_ref_t key_ref; local 722 key_ref_t keyring_ref, key_ref, dest_ref; local 828 key_ref_t key_ref; local 953 key_ref_t key_ref; local 1075 key_ref_t key_ref; local 1459 key_ref_t key_ref; local 1565 key_ref_t key_ref; local 1731 key_ref_t key_ref; local 1778 key_ref_t key_ref; local [all...] |
H A D | process_keys.c | 425 key_ref_t key_ref, ret, err; local 435 key_ref = NULL; 441 key_ref = keyring_search_rcu( 443 if (!IS_ERR(key_ref)) 446 switch (PTR_ERR(key_ref)) { 449 ret = key_ref; 452 err = key_ref; 459 key_ref = keyring_search_rcu( 461 if (!IS_ERR(key_ref)) 464 switch (PTR_ERR(key_ref)) { 542 key_ref_t key_ref, ret = ERR_PTR(-EACCES), err; local 622 key_ref_t key_ref, skey_ref; local [all...] |
H A D | permission.c | 14 * @key_ref: The key to check. 26 int key_task_permission(const key_ref_t key_ref, const struct cred *cred, argument 51 key = key_ref_to_ptr(key_ref); 82 if (is_key_possessed(key_ref)) 90 return security_key_permission(key_ref, cred, need_perm);
|
H A D | key.c | 749 static inline key_ref_t __key_update(key_ref_t key_ref, argument 752 struct key *key = key_ref_to_ptr(key_ref); 756 ret = key_permission(key_ref, KEY_NEED_WRITE); 778 return key_ref; 782 key_ref = ERR_PTR(ret); 806 key_ref_t key_ref; local 814 key_ref = ERR_PTR(-ENODEV); 818 key_ref = ERR_PTR(-EINVAL); 830 key_ref = ERR_PTR(-ENOTDIR); 843 key_ref 1060 key_update(key_ref_t key_ref, const void *payload, size_t plen) argument [all...] |
H A D | request_key.c | 378 key_ref_t key_ref; local 422 key_ref = search_process_keyrings_rcu(ctx); 424 if (!IS_ERR(key_ref)) 447 key = key_ref_to_ptr(key_ref); 597 key_ref_t key_ref; local 618 key_ref = search_process_keyrings_rcu(&ctx); 621 if (!IS_ERR(key_ref)) { 623 ret = key_task_permission(key_ref, current_cred(), 626 key_ref_put(key_ref); 632 key = key_ref_to_ptr(key_ref); 799 key_ref_t key_ref; local [all...] |
H A D | keyctl_pkey.c | 82 key_ref_t key_ref; local 98 key_ref = lookup_user_key(id, 0, KEY_NEED_SEARCH); 99 if (IS_ERR(key_ref)) 100 return PTR_ERR(key_ref); 101 params->key = key_ref_to_ptr(key_ref);
|
H A D | dh.c | 21 key_ref_t key_ref; local 25 key_ref = lookup_user_key(keyid, 0, KEY_NEED_READ); 26 if (IS_ERR(key_ref)) { 31 key = key_ref_to_ptr(key_ref);
|
H A D | proc.c | 158 key_ref_t key_ref, skey_ref; local 175 key_ref = make_key_ref(key, 0); 186 key_ref = make_key_ref(key, 1); 191 rc = key_task_permission(key_ref, ctx.cred, KEY_NEED_VIEW);
|
H A D | internal.h | 175 extern int key_task_permission(const key_ref_t key_ref, 199 static inline int key_permission(const key_ref_t key_ref, argument 202 return key_task_permission(key_ref, current_cred(), need_perm);
|
/linux-master/include/linux/ |
H A D | key.h | 161 static inline struct key *key_ref_to_ptr(const key_ref_t key_ref) argument 163 return (struct key *) ((unsigned long) key_ref & ~1UL); 166 static inline bool is_key_possessed(const key_ref_t key_ref) argument 168 return (unsigned long) key_ref & 1UL; 317 static inline void key_ref_put(key_ref_t key_ref) argument 319 key_put(key_ref_to_ptr(key_ref));
|
H A D | security.h | 2005 int security_key_permission(key_ref_t key_ref, const struct cred *cred, 2025 static inline int security_key_permission(key_ref_t key_ref, argument
|
H A D | lsm_hook_defs.h | 405 LSM_HOOK(int, 0, key_permission, key_ref_t key_ref, const struct cred *cred,
|
/linux-master/crypto/ |
H A D | af_alg.c | 277 key_ref_t key_ref; local 279 key_ref = lookup_user_key(serial, 0, KEY_NEED_SEARCH); 280 if (IS_ERR(key_ref)) 281 return ERR_CAST(key_ref); 283 return key_ref_to_ptr(key_ref);
|
/linux-master/kernel/trace/ |
H A D | bpf_trace.c | 1288 key_ref_t key_ref; local 1298 key_ref = lookup_user_key(serial, flags, KEY_DEFER_PERM_CHECK); 1299 if (IS_ERR(key_ref)) 1304 key_put(key_ref_to_ptr(key_ref)); 1308 bkey->key = key_ref_to_ptr(key_ref);
|
/linux-master/security/ |
H A D | security.c | 5274 * @key_ref: key reference 5282 int security_key_permission(key_ref_t key_ref, const struct cred *cred, argument 5285 return call_int_hook(key_permission, key_ref, cred, need_perm);
|
/linux-master/security/smack/ |
H A D | smack_lsm.c | 4501 * @key_ref: gets to the object 4508 static int smack_key_permission(key_ref_t key_ref, argument 4542 keyp = key_ref_to_ptr(key_ref);
|
/linux-master/security/selinux/ |
H A D | hooks.c | 6702 static int selinux_key_permission(key_ref_t key_ref, argument 6741 key = key_ref_to_ptr(key_ref);
|