Searched refs:key_ref (Results 1 - 17 of 17) sorted by last modified time

/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/security/smack/
H A Dsmack_lsm.c4502 * @key_ref: gets to the object
4509 static int smack_key_permission(key_ref_t key_ref, argument
4543 keyp = key_ref_to_ptr(key_ref);
/linux-master/security/selinux/
H A Dhooks.c6692 static int selinux_key_permission(key_ref_t key_ref, argument
6731 key = key_ref_to_ptr(key_ref);
/linux-master/security/
H A Dsecurity.c5275 * @key_ref: key reference
5283 int security_key_permission(key_ref_t key_ref, const struct cred *cred, argument
5286 return call_int_hook(key_permission, key_ref, cred, need_perm);
/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
1076 key_ref_t key_ref; local
1460 key_ref_t key_ref; local
1566 key_ref_t key_ref; local
1732 key_ref_t key_ref; local
1779 key_ref_t key_ref; local
[all...]
H A Dkey.c762 static inline key_ref_t __key_update(key_ref_t key_ref, argument
765 struct key *key = key_ref_to_ptr(key_ref);
769 ret = key_permission(key_ref, KEY_NEED_WRITE);
791 return key_ref;
795 key_ref = ERR_PTR(ret);
819 key_ref_t key_ref; local
827 key_ref = ERR_PTR(-ENODEV);
831 key_ref = ERR_PTR(-EINVAL);
843 key_ref = ERR_PTR(-ENOTDIR);
856 key_ref
1073 key_update(key_ref_t key_ref, const void *payload, size_t plen) argument
[all...]
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);
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 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 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 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);
/linux-master/kernel/trace/
H A Dbpf_trace.c1290 key_ref_t key_ref; local
1300 key_ref = lookup_user_key(serial, flags, KEY_DEFER_PERM_CHECK);
1301 if (IS_ERR(key_ref))
1306 key_put(key_ref_to_ptr(key_ref));
1310 bkey->key = key_ref_to_ptr(key_ref);
/linux-master/include/linux/
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.h406 LSM_HOOK(int, 0, key_permission, key_ref_t key_ref, const struct cred *cred,
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));

Completed in 372 milliseconds