Home
last modified time | relevance | path

Searched refs:key (Results 1 – 25 of 69) sorted by relevance

123

/security/keys/
A Dkey.c38 void __key_check(const struct key *key) in __key_check() argument
41 key, key->magic, KEY_DEBUG_MAGIC); in __key_check()
230 struct key *key; in key_alloc() local
647 void key_put(struct key *key) in key_put() argument
676 struct key *key; in key_lookup() local
782 ret = key->type->update(key, prep); in __key_update()
821 struct key *keyring, *key = NULL; in __key_create_or_update() local
1106 ret = key->type->update(key, &prep); in key_update()
1131 void key_revoke(struct key *key) in key_revoke() argument
1146 key->type->revoke(key); in key_revoke()
[all …]
A Drequest_key.c25 struct key *key = current->cached_requested_key; in check_cached_key() local
27 if (key && in check_cached_key()
36 static void cache_requested_key(struct key *key) in cache_requested_key() argument
62 struct key *key = rka->target_key; in complete_request_key() local
376 struct key *key; in construct_alloc_key() local
497 struct key *key; in construct_key_and_link() local
596 struct key *key; in request_key_and_link() local
613 if (key) in request_key_and_link()
711 struct key *key; in request_key_tag() local
753 struct key *key; in request_key_with_auxdata() local
[all …]
A Dgc.c72 void key_set_expiry(struct key *key, time64_t expiry) in key_set_expiry() argument
138 struct key *key = in key_gc_unused_keys() local
145 key_check(key); in key_gc_unused_keys()
148 remove_watch_list(key->watchers, key->serial); in key_gc_unused_keys()
154 key->type->destroy(key); in key_gc_unused_keys()
166 memzero_explicit(key, sizeof(*key)); in key_gc_unused_keys()
190 struct key *key; in key_garbage_collector() local
218 key = rb_entry(cursor, struct key, serial_node); in key_garbage_collector()
230 key->perm = 0; in key_garbage_collector()
244 key_serial(key), key->expiry - limit); in key_garbage_collector()
[all …]
A Dkeyring.c565 bool key_default_cmp(const struct key *key, in key_default_cmp() argument
675 struct key *key; in search_nested_keyrings() local
1104 struct key *keyring, *key; in find_key_to_update() local
1353 int __key_link_check_live_key(struct key *keyring, struct key *key) in __key_link_check_live_key() argument
1370 void __key_link(struct key *keyring, struct key *key, in __key_link() argument
1438 int key_link(struct key *keyring, struct key *key) in key_link() argument
1487 static int __key_unlink_begin(struct key *keyring, struct key *key, in __key_unlink_begin() argument
1509 static void __key_unlink(struct key *keyring, struct key *key, in __key_unlink() argument
1522 struct key *key, in __key_unlink_end()
1548 int key_unlink(struct key *keyring, struct key *key) in key_unlink() argument
[all …]
A Dinternal.h97 extern int __key_move_lock(struct key *l_keyring, struct key *u_keyring,
102 extern int __key_link_check_live_key(struct key *keyring, struct key *key);
103 extern void __key_link(struct key *keyring, struct key *key,
134 extern bool key_default_cmp(const struct key *key,
144 extern int look_up_user_keyrings(struct key **, struct key **);
159 extern bool lookup_user_key_possessed(const struct key *key,
170 void key_set_expiry(struct key *key, time64_t expiry);
179 static inline void notify_key(struct key *key, in notify_key() argument
206 extern struct key *request_key_auth_new(struct key *target,
365 static inline void key_check(const struct key *key) in key_check() argument
[all …]
A Dproc.c70 struct key *key = rb_entry(n, struct key, serial_node); in key_serial_next() local
85 struct key *key = rb_entry(n, struct key, serial_node); in find_ge_key() local
88 minkey = key; in find_ge_key()
93 minkey = key; in find_ge_key()
96 key = NULL; in find_ge_key()
116 struct key *key; in proc_keys_start() local
123 if (!key) in proc_keys_start()
131 struct key *key = rb_entry(n, struct key, serial_node); in key_node_serial() local
156 struct key *key = rb_entry(_p, struct key, serial_node); in proc_keys_show() local
237 key->perm, in proc_keys_show()
[all …]
A Drequest_key_auth.c54 static int request_key_auth_instantiate(struct key *key, in request_key_auth_instantiate() argument
64 static void request_key_auth_describe(const struct key *key, in request_key_auth_describe() argument
74 if (key_is_positive(key)) in request_key_auth_describe()
82 static long request_key_auth_read(const struct key *key, in request_key_auth_read() argument
134 static void request_key_auth_revoke(struct key *key) in request_key_auth_revoke() argument
138 kenter("{%d}", key->serial); in request_key_auth_revoke()
146 static void request_key_auth_destroy(struct key *key) in request_key_auth_destroy() argument
150 kenter("{%d}", key->serial); in request_key_auth_destroy()
161 struct key *request_key_auth_new(struct key *target, const char *op, in request_key_auth_new()
167 struct key *authkey = NULL; in request_key_auth_new()
[all …]
A Dpermission.c29 struct key *key; in key_task_permission() local
51 key = key_ref_to_ptr(key_ref); in key_task_permission()
54 if (uid_eq(key->uid, cred->fsuid)) { in key_task_permission()
55 kperm = key->perm >> 16; in key_task_permission()
61 if (gid_valid(key->gid) && key->perm & KEY_GRP_ALL) { in key_task_permission()
62 if (gid_eq(key->gid, cred->fsgid)) { in key_task_permission()
63 kperm = key->perm >> 8; in key_task_permission()
69 kperm = key->perm >> 8; in key_task_permission()
75 kperm = key->perm; in key_task_permission()
83 kperm |= key->perm >> 24; in key_task_permission()
[all …]
A Duser_defined.c101 int user_update(struct key *key, struct key_preparsed_payload *prep) in user_update() argument
112 key->expiry = prep->expiry; in user_update()
113 if (key_is_positive(key)) in user_update()
128 void user_revoke(struct key *key) in user_revoke() argument
133 key_payload_reserve(key, 0); in user_revoke()
136 rcu_assign_keypointer(key, NULL); in user_revoke()
146 void user_destroy(struct key *key) in user_destroy() argument
158 void user_describe(const struct key *key, struct seq_file *m) in user_describe() argument
160 seq_puts(m, key->description); in user_describe()
161 if (key_is_positive(key)) in user_describe()
[all …]
A Dkeyctl.c173 struct key *key; in SYSCALL_DEFINE4() local
382 struct key *key; in keyctl_revoke_key() local
423 struct key *key; in keyctl_invalidate_key() local
555 struct key *keyring, *key; in keyctl_keyring_unlink() local
648 struct key *key, *instkey; in keyctl_describe_key() local
827 struct key *key; in keyctl_read_key() local
952 struct key *key; in keyctl_chown_key() local
1075 struct key *key; in keyctl_setperm_key() local
1459 struct key *key, *instkey; in keyctl_set_timeout() local
1565 struct key *key, *instkey; in keyctl_get_security() local
[all …]
A Dbig_key.c165 void big_key_revoke(struct key *key) in big_key_revoke() argument
170 key_payload_reserve(key, 0); in big_key_revoke()
178 void big_key_destroy(struct key *key) in big_key_destroy() argument
194 int big_key_update(struct key *key, struct key_preparsed_payload *prep) in big_key_update() argument
202 if (key_is_positive(key)) in big_key_update()
203 big_key_destroy(key); in big_key_update()
205 return generic_key_instantiate(key, prep); in big_key_update()
211 void big_key_describe(const struct key *key, struct seq_file *m) in big_key_describe() argument
215 seq_puts(m, key->description); in big_key_describe()
217 if (key_is_positive(key)) in big_key_describe()
[all …]
A Dprocess_keys.c320 struct key *old; in install_session_keyring_to_cred()
587 bool lookup_user_key_possessed(const struct key *key, in lookup_user_key_possessed() argument
621 struct key *key, *user_session; in lookup_user_key() local
644 __key_get(key); in lookup_user_key()
662 __key_get(key); in lookup_user_key()
692 __key_get(key); in lookup_user_key()
717 if (!key) in lookup_user_key()
720 __key_get(key); in lookup_user_key()
732 key = NULL; in lookup_user_key()
739 if (!key) in lookup_user_key()
[all …]
A Ddh.c20 struct key *key; in dh_data_from_key() local
31 key = key_ref_to_ptr(key_ref); in dh_data_from_key()
34 if (key->type == &key_type_user) { in dh_data_from_key()
35 down_read(&key->sem); in dh_data_from_key()
36 status = key_validate(key); in dh_data_from_key()
41 payload = user_key_payload_locked(key); in dh_data_from_key()
52 up_read(&key->sem); in dh_data_from_key()
55 key_put(key); in dh_data_from_key()
62 kfree_sensitive(dh->key); in dh_free_data()
193 dlen = dh_data_from_key(pcopy.private, &dh_inputs.key); in __keyctl_dh_compute()
A Dkeyctl_pkey.c20 key_put(params->key); in keyctl_pkey_params_free()
101 params->key = key_ref_to_ptr(key_ref); in keyctl_pkey_params_get()
103 if (!params->key->type->asym_query) in keyctl_pkey_params_get()
132 ret = params->key->type->asym_query(params, &info); in keyctl_pkey_params_get_2()
181 ret = params.key->type->asym_query(&params, &res); in keyctl_pkey_query()
227 if (!params.key->type->asym_eds_op) in keyctl_pkey_e_d_s()
255 ret = params.key->type->asym_eds_op(&params, in, out); in keyctl_pkey_e_d_s()
303 if (!params.key->type->asym_verify_signature) in keyctl_pkey_verify()
319 ret = params.key->type->asym_verify_signature(&params, in, in2); in keyctl_pkey_verify()
/security/integrity/
A Ddigsig_asymmetric.c22 static struct key *request_asymmetric_key(struct key *keyring, uint32_t keyid) in request_asymmetric_key()
24 struct key *key; in request_asymmetric_key() local
32 if (key) { in request_asymmetric_key()
57 if (IS_ERR(key)) { in request_asymmetric_key()
61 PTR_ERR(key)); in request_asymmetric_key()
73 return key; in request_asymmetric_key()
79 return key; in request_asymmetric_key()
88 struct key *key; in asymmetric_verify() local
103 if (IS_ERR(key)) in asymmetric_verify()
104 return PTR_ERR(key); in asymmetric_verify()
[all …]
A Ddigsig.c22 static struct key *keyring[INTEGRITY_KEYRING_MAX];
42 static struct key *integrity_keyring_from_id(const unsigned int id) in integrity_keyring_from_id()
64 struct key *keyring; in integrity_digsig_verify()
89 struct key *keyring; in integrity_modsig_verify()
171 key_ref_t key; in integrity_add_key() local
177 key = key_create_or_update(make_key_ref(keyring[id], 1), "asymmetric", in integrity_add_key()
180 if (IS_ERR(key)) { in integrity_add_key()
181 rc = PTR_ERR(key); in integrity_add_key()
186 key_ref_to_ptr(key)->description); in integrity_add_key()
187 key_ref_put(key); in integrity_add_key()
/security/selinux/ss/
A Davtab.c77 newnode->key = *key; in avtab_insert_node()
133 cmp = avtab_node_cmp(key, &cur->key); in avtab_insert()
142 key, datum); in avtab_insert()
166 cmp = avtab_node_cmp(key, &cur->key); in avtab_insert_nonunique()
171 key, datum); in avtab_insert_nonunique()
189 cmp = avtab_node_cmp(key, &cur->key); in avtab_search_node()
207 tmp_key = node->key; in avtab_search_node_next()
347 struct avtab_key key; in avtab_read_item() local
376 key.source_type = (u16)val; in avtab_read_item()
382 key.target_type = (u16)val; in avtab_read_item()
[all …]
A Dhashtab.h22 u32 (*hash)(const void *key); /* hash func */
27 void *key; member
51 int __hashtab_insert(struct hashtab *h, struct hashtab_node **dst, void *key,
62 static inline int hashtab_insert(struct hashtab *h, void *key, void *datum, in hashtab_insert() argument
73 hvalue = key_params.hash(key) & (h->size - 1); in hashtab_insert()
77 int cmp = key_params.cmp(key, cur->key); in hashtab_insert()
87 return __hashtab_insert(h, prev ? &prev->next : &h->htable[hvalue], key, in hashtab_insert()
97 static inline void *hashtab_search(struct hashtab *h, const void *key, in hashtab_search() argument
106 hvalue = key_params.hash(key) & (h->size - 1); in hashtab_search()
109 int cmp = key_params.cmp(key, cur->key); in hashtab_search()
A Dconditional.c108 avnode->key.specified |= AVTAB_ENABLED; in evaluate_cond_node()
180 kfree(key); in cond_destroy_bool()
211 char *key = NULL; in cond_read_bool() local
238 rc = symtab_insert(s, key, booldatum); in cond_read_bool()
244 cond_destroy_bool(key, booldatum, NULL); in cond_read_bool()
447 char *key = vkey; in cond_write_bool() local
455 len = strlen(key); in cond_write_bool()
462 rc = put_entry(key, 1, len, fp); in cond_write_bool()
558 if (!ctab || !key || !xpermd) in cond_compute_xperms()
575 if (!ctab || !key || !avd) in cond_compute_av()
[all …]
A Dpolicydb.c191 kfree(key); in perm_destroy()
200 kfree(key); in common_destroy()
229 kfree(key); in cls_destroy()
269 kfree(key); in role_destroy()
281 kfree(key); in type_destroy()
290 kfree(key); in user_destroy()
404 if (!key) in roles_init()
458 return key->source_type + (key->target_type << 3) + in rangetr_hash()
495 return jhash_3words(key->role, key->type, in role_trans_hash()
496 (u32)key->tclass << 16 | key->tclass, 0); in role_trans_hash()
[all …]
A Dconditional.h67 int cond_destroy_bool(void *key, void *datum, void *p);
69 int cond_index_bool(void *key, void *datum, void *datap);
73 int cond_write_bool(void *key, void *datum, void *ptr);
76 void cond_compute_av(struct avtab *ctab, struct avtab_key *key,
78 void cond_compute_xperms(struct avtab *ctab, struct avtab_key *key,
/security/keys/trusted-keys/
A Dtrusted_core.c124 static struct trusted_key_payload *trusted_payload_alloc(struct key *key) in trusted_payload_alloc() argument
150 static int trusted_instantiate(struct key *key, in trusted_instantiate() argument
230 static int trusted_update(struct key *key, struct key_preparsed_payload *prep) in trusted_update() argument
238 if (key_is_negative(key)) in trusted_update()
240 p = key->payload.data[0]; in trusted_update()
250 new_p = trusted_payload_alloc(key); in trusted_update()
268 memcpy(new_p->key, p->key, p->key_len); in trusted_update()
279 rcu_assign_keypointer(key, new_p); in trusted_update()
290 static long trusted_read(const struct key *key, char *buffer, in trusted_read() argument
297 p = dereference_key_locked(key); in trusted_read()
[all …]
/security/keys/encrypted-keys/
A Dencrypted.c311 struct key *ukey; in request_user_key()
419 struct key *mkey = ERR_PTR(-EINVAL); in request_master_key()
601 static struct encrypted_key_payload *encrypted_key_alloc(struct key *key, in encrypted_key_alloc() argument
684 struct key *mkey; in encrypted_key_decrypt()
813 static int encrypted_instantiate(struct key *key, in encrypted_instantiate() argument
852 rcu_assign_keypointer(key, epayload); in encrypted_instantiate()
875 static int encrypted_update(struct key *key, struct key_preparsed_payload *prep) in encrypted_update() argument
885 if (key_is_negative(key)) in encrypted_update()
933 static long encrypted_read(const struct key *key, char *buffer, in encrypted_read() argument
937 struct key *mkey; in encrypted_read()
[all …]
/security/integrity/ima/
A Dima_asymmetric_keys.c29 void ima_post_key_create_or_update(struct key *keyring, struct key *key, in ima_post_key_create_or_update() argument
36 if (key->type != &key_type_asymmetric) in ima_post_key_create_or_update()
/security/landlock/
A Druleset.c130 WARN_ON_ONCE(!id.key.object); in create_rule()
131 landlock_get_object(id.key.object); in create_rule()
134 new_rule->key = id.key; in create_rule()
170 landlock_put_object(rule->key.object); in free_rule()
218 if (is_object_pointer(id.type) && WARN_ON_ONCE(!id.key.object)) in insert_rule()
230 if (this->key.data != id.key.data) { in insert_rule()
232 if (this->key.data < id.key.data) in insert_rule()
335 .key = walker_rule->key, in merge_tree()
417 .key = walker_rule->key, in inherit_tree()
598 if (this->key.data == id.key.data) in landlock_find_rule()
[all …]

Completed in 44 milliseconds

123