Searched refs:key_ref (Results 1 - 17 of 17) sorted by relevance

/linux-master/security/keys/
H A Dkeyctl.c80 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 Dprocess_keys.c425 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 Dpermission.c14 * @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 Dkey.c749 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 Drequest_key.c378 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 Dkeyctl_pkey.c82 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 Ddh.c21 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 Dproc.c158 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 Dinternal.h175 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 Dkey.h161 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 Dsecurity.h2005 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 Dlsm_hook_defs.h405 LSM_HOOK(int, 0, key_permission, key_ref_t key_ref, const struct cred *cred,
/linux-master/crypto/
H A Daf_alg.c277 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 Dbpf_trace.c1288 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 Dsecurity.c5274 * @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 Dsmack_lsm.c4501 * @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 Dhooks.c6702 static int selinux_key_permission(key_ref_t key_ref, argument
6741 key = key_ref_to_ptr(key_ref);

Completed in 271 milliseconds