Home
last modified time | relevance | path

Searched refs:key (Results 1 – 200 of 1778) sorted by relevance

123456789

/linux-4.1.27/security/keys/
Dkey.c42 void __key_check(const struct key *key) in __key_check() argument
45 key, key->magic, KEY_DEBUG_MAGIC); in __key_check()
137 static inline void key_alloc_serial(struct key *key) in key_alloc_serial() argument
140 struct key *xkey; in key_alloc_serial()
145 get_random_bytes(&key->serial, sizeof(key->serial)); in key_alloc_serial()
147 key->serial >>= 1; /* negative numbers are not permitted */ in key_alloc_serial()
148 } while (key->serial < 3); in key_alloc_serial()
158 xkey = rb_entry(parent, struct key, serial_node); in key_alloc_serial()
160 if (key->serial < xkey->serial) in key_alloc_serial()
162 else if (key->serial > xkey->serial) in key_alloc_serial()
[all …]
Dgc.c130 struct key *key = in key_gc_unused_keys() local
131 list_entry(keys->next, struct key, graveyard_link); in key_gc_unused_keys()
132 list_del(&key->graveyard_link); in key_gc_unused_keys()
134 kdebug("- %u", key->serial); in key_gc_unused_keys()
135 key_check(key); in key_gc_unused_keys()
138 if (test_bit(KEY_FLAG_INSTANTIATED, &key->flags) && in key_gc_unused_keys()
139 !test_bit(KEY_FLAG_NEGATIVE, &key->flags) && in key_gc_unused_keys()
140 key->type->destroy) in key_gc_unused_keys()
141 key->type->destroy(key); in key_gc_unused_keys()
143 security_key_free(key); in key_gc_unused_keys()
[all …]
Drequest_key.c35 kenter("{%d,%d},%d", cons->key->serial, cons->authkey->serial, error); in complete_request_key()
38 key_negate_and_link(cons->key, key_negative_timeout, NULL, in complete_request_key()
43 key_put(cons->key); in complete_request_key()
58 struct key *keyring = info->data; in umh_keys_init()
68 struct key *keyring = info->data; in umh_keys_cleanup()
76 struct key *session_keyring, int wait) in call_usermodehelper_keys()
100 struct key *key = cons->key, *authkey = cons->authkey, *keyring, in call_sbin_request_key() local
107 kenter("{%d},{%d},%s", key->serial, authkey->serial, op); in call_sbin_request_key()
114 sprintf(desc, "_req.%u", key->serial); in call_sbin_request_key()
136 sprintf(key_str, "%d", key->serial); in call_sbin_request_key()
[all …]
Dproc.c91 struct key *key = rb_entry(n, struct key, serial_node); in key_serial_next() local
92 if (kuid_has_mapping(user_ns, key->user->uid)) in key_serial_next()
104 static struct key *find_ge_key(struct seq_file *p, key_serial_t id) in find_ge_key()
108 struct key *minkey = NULL; in find_ge_key()
111 struct key *key = rb_entry(n, struct key, serial_node); in find_ge_key() local
112 if (id < key->serial) { in find_ge_key()
113 if (!minkey || minkey->serial > key->serial) in find_ge_key()
114 minkey = key; in find_ge_key()
116 } else if (id > key->serial) { in find_ge_key()
119 minkey = key; in find_ge_key()
[all …]
Dinternal.h91 extern int __key_link_begin(struct key *keyring,
94 extern int __key_link_check_live_key(struct key *keyring, struct key *key);
95 extern void __key_link(struct key *key, struct assoc_array_edit **_edit);
96 extern void __key_link_end(struct key *keyring,
103 extern struct key *keyring_search_instkey(struct key *keyring,
106 extern int iterate_over_keyring(const struct key *keyring,
107 int (*func)(const struct key *key, void *data),
131 extern bool key_default_cmp(const struct key *key,
139 extern struct key *find_keyring_by_name(const char *name, bool skip_perm_check);
144 extern int install_session_keyring_to_cred(struct cred *, struct key *);
[all …]
Dpermission.c33 struct key *key; in key_task_permission() local
37 key = key_ref_to_ptr(key_ref); in key_task_permission()
40 if (uid_eq(key->uid, cred->fsuid)) { in key_task_permission()
41 kperm = key->perm >> 16; in key_task_permission()
47 if (gid_valid(key->gid) && key->perm & KEY_GRP_ALL) { in key_task_permission()
48 if (gid_eq(key->gid, cred->fsgid)) { in key_task_permission()
49 kperm = key->perm >> 8; in key_task_permission()
53 ret = groups_search(cred->group_info, key->gid); in key_task_permission()
55 kperm = key->perm >> 8; in key_task_permission()
61 kperm = key->perm; in key_task_permission()
[all …]
Dkeyring.c46 static inline struct key *keyring_ptr_to_key(const struct assoc_array_ptr *x) in keyring_ptr_to_key()
49 return (struct key *)((unsigned long)object & ~KEYRING_PTR_SUBTYPE); in keyring_ptr_to_key()
51 static inline void *keyring_key_to_ptr(struct key *key) in keyring_key_to_ptr() argument
53 if (key->type == &key_type_keyring) in keyring_key_to_ptr()
54 return (void *)((unsigned long)key | KEYRING_PTR_SUBTYPE); in keyring_key_to_ptr()
55 return key; in keyring_key_to_ptr()
78 static int keyring_instantiate(struct key *keyring,
80 static void keyring_revoke(struct key *keyring);
81 static void keyring_destroy(struct key *keyring);
82 static void keyring_describe(const struct key *keyring, struct seq_file *m);
[all …]
Drequest_key_auth.c25 static int request_key_auth_instantiate(struct key *,
27 static void request_key_auth_describe(const struct key *, struct seq_file *);
28 static void request_key_auth_revoke(struct key *);
29 static void request_key_auth_destroy(struct key *);
30 static long request_key_auth_read(const struct key *, char __user *, size_t);
59 static int request_key_auth_instantiate(struct key *key, in request_key_auth_instantiate() argument
62 key->payload.data = (struct request_key_auth *)prep->data; in request_key_auth_instantiate()
69 static void request_key_auth_describe(const struct key *key, in request_key_auth_describe() argument
72 struct request_key_auth *rka = key->payload.data; in request_key_auth_describe()
75 seq_puts(m, key->description); in request_key_auth_describe()
[all …]
Duser_defined.c97 int user_update(struct key *key, struct key_preparsed_payload *prep) in user_update() argument
119 ret = key_payload_reserve(key, datalen); in user_update()
123 if (!test_bit(KEY_FLAG_NEGATIVE, &key->flags)) in user_update()
124 zap = key->payload.data; in user_update()
127 rcu_assign_keypointer(key, upayload); in user_update()
128 key->expiry = 0; in user_update()
144 void user_revoke(struct key *key) in user_revoke() argument
146 struct user_key_payload *upayload = key->payload.data; in user_revoke()
149 key_payload_reserve(key, 0); in user_revoke()
152 rcu_assign_keypointer(key, NULL); in user_revoke()
[all …]
Dbig_key.c124 void big_key_revoke(struct key *key) in big_key_revoke() argument
126 struct path *path = (struct path *)&key->payload.data2; in big_key_revoke()
129 key_payload_reserve(key, 0); in big_key_revoke()
130 if (key_is_instantiated(key) && key->type_data.x[1] > BIG_KEY_FILE_THRESHOLD) in big_key_revoke()
137 void big_key_destroy(struct key *key) in big_key_destroy() argument
139 if (key->type_data.x[1] > BIG_KEY_FILE_THRESHOLD) { in big_key_destroy()
140 struct path *path = (struct path *)&key->payload.data2; in big_key_destroy()
145 kfree(key->payload.data); in big_key_destroy()
146 key->payload.data = NULL; in big_key_destroy()
153 void big_key_describe(const struct key *key, struct seq_file *m) in big_key_describe() argument
[all …]
Dprocess_keys.c47 struct key *uid_keyring, *session_keyring; in install_user_keyrings()
133 struct key *keyring; in install_thread_keyring_to_cred()
176 struct key *keyring; in install_process_keyring_to_cred()
219 int install_session_keyring_to_cred(struct cred *cred, struct key *keyring) in install_session_keyring_to_cred()
222 struct key *old; in install_session_keyring_to_cred()
255 static int install_session_keyring(struct key *keyring) in install_session_keyring()
492 bool lookup_user_key_possessed(const struct key *key, in lookup_user_key_possessed() argument
495 return key == match_data->raw_data; in lookup_user_key_possessed()
525 struct key *key; in lookup_user_key() local
547 key = ctx.cred->thread_keyring; in lookup_user_key()
[all …]
Dkeyctl.c170 struct key *key; in SYSCALL_DEFINE4() local
219 key = request_key_and_link(ktype, description, callout_info, in SYSCALL_DEFINE4()
222 if (IS_ERR(key)) { in SYSCALL_DEFINE4()
223 ret = PTR_ERR(key); in SYSCALL_DEFINE4()
228 ret = wait_for_key_construction(key, 1); in SYSCALL_DEFINE4()
232 ret = key->serial; in SYSCALL_DEFINE4()
235 key_put(key); in SYSCALL_DEFINE4()
565 struct key *key, *instkey; in keyctl_describe_key() local
592 key = key_ref_to_ptr(key_ref); in keyctl_describe_key()
593 desclen = strlen(key->description); in keyctl_describe_key()
[all …]
Dtrusted.c76 static int TSS_rawhmac(unsigned char *digest, const unsigned char *key, in TSS_rawhmac() argument
91 ret = crypto_shash_setkey(hmacalg, key, keylen); in TSS_rawhmac()
123 static int TSS_authhmac(unsigned char *digest, const unsigned char *key, in TSS_authhmac() argument
163 ret = TSS_rawhmac(digest, key, keylen, SHA1_DIGEST_SIZE, in TSS_authhmac()
177 const unsigned char *key, in TSS_checkhmac1() argument
239 ret = TSS_rawhmac(testhmac, key, keylen, SHA1_DIGEST_SIZE, paramdigest, in TSS_checkhmac1()
394 const unsigned char *key, uint16_t type, uint32_t handle) in osap() argument
421 return TSS_rawhmac(s->secret, key, SHA1_DIGEST_SIZE, TPM_NONCE_SIZE, in osap()
672 p->key[p->key_len] = p->migratable; in key_seal()
675 p->key, p->key_len + 1, p->blob, &p->blob_len, in key_seal()
[all …]
/linux-4.1.27/crypto/
Dtestmgr.h40 char *key; member
50 char *key; member
65 char *key; member
84 char *key; member
1830 .key = "\xdf\xa6\xbf\x4d\xed\x81\xdb\x03"
1839 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1849 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1860 .key = "\xda\x53\xeb\x0a\xd2\xc5\x5b\xb6"
1871 .key = "\x95\x2b\x2a\x56\xa5\x60\x04a\xc0"
1890 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
[all …]
Dcast6_generic.c101 static inline void W(u32 *key, unsigned int i) in W() argument
104 key[6] ^= F1(key[7], Tr[i % 4][0], Tm[i][0]); in W()
105 key[5] ^= F2(key[6], Tr[i % 4][1], Tm[i][1]); in W()
106 key[4] ^= F3(key[5], Tr[i % 4][2], Tm[i][2]); in W()
107 key[3] ^= F1(key[4], Tr[i % 4][3], Tm[i][3]); in W()
108 key[2] ^= F2(key[3], Tr[i % 4][4], Tm[i][4]); in W()
109 key[1] ^= F3(key[2], Tr[i % 4][5], Tm[i][5]); in W()
110 key[0] ^= F1(key[1], Tr[i % 4][6], Tm[i][6]); in W()
111 key[7] ^= F2(key[0], Tr[i % 4][7], Tm[i][7]); in W()
118 u32 key[8]; in __cast6_setkey() local
[all …]
Dtwofish_common.c483 if (key[i]) { \
484 tmp = poly_to_exp[key[i] - 1]; \
544 mds[0][q0[a ^ key[(j) + 8]] ^ key[j]] \
545 ^ mds[1][q0[b ^ key[(j) + 9]] ^ key[(j) + 1]] \
546 ^ mds[2][q1[c ^ key[(j) + 10]] ^ key[(j) + 2]] \
547 ^ mds[3][q1[d ^ key[(j) + 11]] ^ key[(j) + 3]]
557 CALC_K_2 (q0[a ^ key[(j) + 16]], \
558 q1[b ^ key[(j) + 17]], \
559 q0[c ^ key[(j) + 18]], \
560 q1[d ^ key[(j) + 19]], j)
[all …]
Dcrc32c_generic.c49 u32 key; member
66 ctx->crc = mctx->key; in chksum_init()
76 static int chksum_setkey(struct crypto_shash *tfm, const u8 *key, in chksum_setkey() argument
81 if (keylen != sizeof(mctx->key)) { in chksum_setkey()
85 mctx->key = le32_to_cpu(*(__le32 *)key); in chksum_setkey()
125 return __chksum_finup(&mctx->key, data, length, out); in chksum_digest()
132 mctx->key = ~0; in crc32c_cra_init()
/linux-4.1.27/security/selinux/ss/
Davtab.c70 struct avtab_key *key, struct avtab_datum *datum) in avtab_insert_node() argument
76 newnode->key = *key; in avtab_insert_node()
94 static int avtab_insert(struct avtab *h, struct avtab_key *key, struct avtab_datum *datum) in avtab_insert() argument
98 u16 specified = key->specified & ~(AVTAB_ENABLED|AVTAB_ENABLED_OLD); in avtab_insert()
103 hvalue = avtab_hash(key, h->mask); in avtab_insert()
107 if (key->source_type == cur->key.source_type && in avtab_insert()
108 key->target_type == cur->key.target_type && in avtab_insert()
109 key->target_class == cur->key.target_class && in avtab_insert()
110 (specified & cur->key.specified)) in avtab_insert()
112 if (key->source_type < cur->key.source_type) in avtab_insert()
[all …]
Dhashtab.c12 struct hashtab *hashtab_create(u32 (*hash_value)(struct hashtab *h, const void *key), in hashtab_create() argument
39 int hashtab_insert(struct hashtab *h, void *key, void *datum) in hashtab_insert() argument
49 hvalue = h->hash_value(h, key); in hashtab_insert()
52 while (cur && h->keycmp(h, key, cur->key) > 0) { in hashtab_insert()
57 if (cur && (h->keycmp(h, key, cur->key) == 0)) in hashtab_insert()
63 newnode->key = key; in hashtab_insert()
77 void *hashtab_search(struct hashtab *h, const void *key) in hashtab_search() argument
85 hvalue = h->hash_value(h, key); in hashtab_search()
87 while (cur && h->keycmp(h, key, cur->key) > 0) in hashtab_search()
90 if (cur == NULL || (h->keycmp(h, key, cur->key) != 0)) in hashtab_search()
[all …]
Dconditional.c102 cur->node->key.specified &= ~AVTAB_ENABLED; in evaluate_cond_node()
104 cur->node->key.specified |= AVTAB_ENABLED; in evaluate_cond_node()
110 cur->node->key.specified &= ~AVTAB_ENABLED; in evaluate_cond_node()
112 cur->node->key.specified |= AVTAB_ENABLED; in evaluate_cond_node()
185 int cond_destroy_bool(void *key, void *datum, void *p) in cond_destroy_bool() argument
187 kfree(key); in cond_destroy_bool()
192 int cond_index_bool(void *key, void *datum, void *datap) in cond_index_bool() argument
205 if (flex_array_put_ptr(fa, booldatum->value - 1, key, in cond_index_bool()
222 char *key = NULL; in cond_read_bool() local
246 key = kmalloc(len + 1, GFP_KERNEL); in cond_read_bool()
[all …]
Dpolicydb.c172 char *key = NULL; in roles_init() local
187 key = kstrdup(OBJECT_R, GFP_KERNEL); in roles_init()
188 if (!key) in roles_init()
191 rc = hashtab_insert(p->p_roles.table, key, role); in roles_init()
197 kfree(key); in roles_init()
241 const struct range_trans *key = k; in rangetr_hash() local
242 return (key->source_type + (key->target_type << 3) + in rangetr_hash()
243 (key->target_class << 5)) & (h->size - 1); in rangetr_hash()
326 static int common_index(void *key, void *datum, void *datap) in common_index() argument
338 if (flex_array_put_ptr(fa, comdatum->value - 1, key, in common_index()
[all …]
/linux-4.1.27/include/linux/
Dkey.h36 struct key;
108 static inline key_ref_t make_key_ref(const struct key *key, in make_key_ref() argument
111 return (key_ref_t) ((unsigned long) key | possession); in make_key_ref()
114 static inline struct key *key_ref_to_ptr(const key_ref_t key_ref) in key_ref_to_ptr()
116 return (struct key *) ((unsigned long) key_ref & ~1UL); in key_ref_to_ptr()
132 struct key { struct
214 extern struct key *key_alloc(struct key_type *type, argument
227 extern void key_revoke(struct key *key);
228 extern void key_invalidate(struct key *key);
229 extern void key_put(struct key *key);
[all …]
Dkey-type.h25 struct key *key; /* key being constructed */ member
26 struct key *authkey;/* authorisation for key being constructed */
52 typedef int (*request_key_actor_t)(struct key_construction *key,
63 bool (*cmp)(const struct key *key,
103 int (*instantiate)(struct key *key, struct key_preparsed_payload *prep);
110 int (*update)(struct key *key, struct key_preparsed_payload *prep);
125 void (*revoke)(struct key *key);
128 void (*destroy)(struct key *key);
131 void (*describe)(const struct key *key, struct seq_file *p);
140 long (*read)(const struct key *key, char __user *buffer, size_t buflen);
[all …]
Djump_label.h97 static inline int static_key_count(struct static_key *key) in static_key_count() argument
99 return atomic_read(&key->enabled); in static_key_count()
109 inline struct jump_entry *jump_label_get_entries(struct static_key *key) in jump_label_get_entries() argument
111 return (struct jump_entry *)((unsigned long)key->entries in jump_label_get_entries()
115 static inline bool jump_label_get_branch_default(struct static_key *key) in jump_label_get_branch_default() argument
117 if (((unsigned long)key->entries & JUMP_LABEL_TYPE_MASK) == in jump_label_get_branch_default()
123 static __always_inline bool static_key_false(struct static_key *key) in static_key_false() argument
125 return arch_static_branch(key); in static_key_false()
128 static __always_inline bool static_key_true(struct static_key *key) in static_key_true() argument
130 return !static_key_false(key); in static_key_true()
[all …]
Dbtree-type.h37 static inline void *BTREE_FN(lookup)(BTREE_TYPE_HEAD *head, BTREE_KEYTYPE key) in BTREE_FN()
39 unsigned long _key = key; in BTREE_FN()
43 static inline int BTREE_FN(insert)(BTREE_TYPE_HEAD *head, BTREE_KEYTYPE key, in BTREE_FN()
46 unsigned long _key = key; in BTREE_FN()
50 static inline int BTREE_FN(update)(BTREE_TYPE_HEAD *head, BTREE_KEYTYPE key, in BTREE_FN()
53 unsigned long _key = key; in BTREE_FN()
57 static inline void *BTREE_FN(remove)(BTREE_TYPE_HEAD *head, BTREE_KEYTYPE key) in BTREE_FN()
59 unsigned long _key = key; in BTREE_FN()
63 static inline void *BTREE_FN(last)(BTREE_TYPE_HEAD *head, BTREE_KEYTYPE *key) in BTREE_FN()
68 *key = _key; in BTREE_FN()
[all …]
Dbtree.h100 unsigned long *key);
115 unsigned long *key, void *val, gfp_t gfp);
128 unsigned long *key, void *val);
140 unsigned long *key);
172 unsigned long *key);
186 unsigned long *key);
193 unsigned long *key, size_t index,
201 unsigned long *key,
215 #define btree_for_each_safel(head, key, val) \ argument
216 for (val = btree_lastl(head, &key); \
[all …]
Dbtree-128.h23 u64 key[2] = {k1, k2}; in btree_lookup128() local
24 return btree_lookup(&head->h, &btree_geo128, (unsigned long *)&key); in btree_lookup128()
30 u64 key[2] = {*k1, *k2}; in btree_get_prev128() local
34 (unsigned long *)&key); in btree_get_prev128()
35 *k1 = key[0]; in btree_get_prev128()
36 *k2 = key[1]; in btree_get_prev128()
43 u64 key[2] = {k1, k2}; in btree_insert128() local
45 (unsigned long *)&key, val, gfp); in btree_insert128()
51 u64 key[2] = {k1, k2}; in btree_update128() local
53 (unsigned long *)&key, val); in btree_update128()
[all …]
Dsysrq.h45 void handle_sysrq(int key);
46 void __handle_sysrq(int key, bool check_mask);
47 int register_sysrq_key(int key, struct sysrq_key_op *op);
48 int unregister_sysrq_key(int key, struct sysrq_key_op *op);
49 struct sysrq_key_op *__sysrq_get_key_op(int key);
55 static inline void handle_sysrq(int key) in handle_sysrq() argument
59 static inline void __handle_sysrq(int key, bool check_mask) in __handle_sysrq() argument
63 static inline int register_sysrq_key(int key, struct sysrq_key_op *op) in register_sysrq_key() argument
68 static inline int unregister_sysrq_key(int key, struct sysrq_key_op *op) in unregister_sysrq_key() argument
Djump_label_ratelimit.h9 struct static_key key; member
16 extern void static_key_slow_dec_deferred(struct static_key_deferred *key);
18 jump_label_rate_limit(struct static_key_deferred *key, unsigned long rl);
22 struct static_key key; member
24 static inline void static_key_slow_dec_deferred(struct static_key_deferred *key) in static_key_slow_dec_deferred() argument
27 static_key_slow_dec(&key->key); in static_key_slow_dec_deferred()
30 jump_label_rate_limit(struct static_key_deferred *key, in jump_label_rate_limit() argument
Dlockdep.h76 struct lockdep_subclass_key *key; member
151 struct lock_class_key *key; member
280 struct lock_class_key *key, int subclass);
287 { .name = (_name), .key = (void *)(_key), }
295 #define lockdep_set_class(lock, key) \ argument
296 lockdep_init_map(&(lock)->dep_map, #key, key, 0)
297 #define lockdep_set_class_and_name(lock, key, name) \ argument
298 lockdep_init_map(&(lock)->dep_map, name, key, 0)
299 #define lockdep_set_class_and_subclass(lock, key, sub) \ argument
300 lockdep_init_map(&(lock)->dep_map, #key, key, sub)
[all …]
Dhashtable.h55 #define hash_add(hashtable, node, key) \ argument
56 hlist_add_head(node, &hashtable[hash_min(key, HASH_BITS(hashtable))])
64 #define hash_add_rcu(hashtable, node, key) \ argument
65 hlist_add_head_rcu(node, &hashtable[hash_min(key, HASH_BITS(hashtable))])
160 #define hash_for_each_possible(name, obj, member, key) \ argument
161 hlist_for_each_entry(obj, &name[hash_min(key, HASH_BITS(name))], member)
172 #define hash_for_each_possible_rcu(name, obj, member, key) \ argument
173 hlist_for_each_entry_rcu(obj, &name[hash_min(key, HASH_BITS(name))],\
187 #define hash_for_each_possible_rcu_notrace(name, obj, member, key) \ argument
189 &name[hash_min(key, HASH_BITS(name))], member)
[all …]
Drhashtable.h88 const void *key; member
212 const void *key, const struct rhashtable_params params) in rht_key_hashfn() argument
218 hash = ht->p.hashfn(key, ht->key_len, tbl->hash_rnd); in rht_key_hashfn()
223 hash = params.hashfn(key, key_len, tbl->hash_rnd); in rht_key_hashfn()
225 hash = jhash(key, key_len, tbl->hash_rnd); in rht_key_hashfn()
227 hash = jhash2(key, key_len / sizeof(u32), in rht_key_hashfn()
233 hash = params.hashfn(key, key_len, tbl->hash_rnd); in rht_key_hashfn()
235 hash = jhash(key, key_len, tbl->hash_rnd); in rht_key_hashfn()
342 int rhashtable_insert_slow(struct rhashtable *ht, const void *key,
512 return memcmp(ptr + ht->p.key_offset, arg->key, ht->p.key_len); in rhashtable_compare()
[all …]
/linux-4.1.27/drivers/s390/crypto/
Dzcrypt_cca_key.h160 } __attribute__((packed)) *key = p; in zcrypt_type6_mex_key_de() local
163 memset(key, 0, sizeof(*key)); in zcrypt_type6_mex_key_de()
166 key->t6_hdr.blen = cpu_to_be16(0x189); in zcrypt_type6_mex_key_de()
167 key->t6_hdr.ulen = cpu_to_be16(0x189 - 2); in zcrypt_type6_mex_key_de()
169 key->t6_hdr.blen = cpu_to_le16(0x189); in zcrypt_type6_mex_key_de()
170 key->t6_hdr.ulen = cpu_to_le16(0x189 - 2); in zcrypt_type6_mex_key_de()
172 key->pvtMeHdr = static_pvt_me_hdr; in zcrypt_type6_mex_key_de()
173 key->pvtMeSec = static_pvt_me_sec; in zcrypt_type6_mex_key_de()
174 key->pubMeSec = static_pub_me_sec; in zcrypt_type6_mex_key_de()
180 memcpy(key->exponent, pk_exponent, 3); in zcrypt_type6_mex_key_de()
[all …]
/linux-4.1.27/net/mac80211/
Dkey.c125 static int ieee80211_key_enable_hw_accel(struct ieee80211_key *key) in ieee80211_key_enable_hw_accel() argument
133 if (key->flags & KEY_FLAG_TAINTED) { in ieee80211_key_enable_hw_accel()
141 key->flags &= ~KEY_FLAG_UPLOADED_TO_HARDWARE; in ieee80211_key_enable_hw_accel()
145 if (!key->local->ops->set_key) in ieee80211_key_enable_hw_accel()
148 assert_key_lock(key->local); in ieee80211_key_enable_hw_accel()
150 sta = key->sta; in ieee80211_key_enable_hw_accel()
156 if (sta && !(key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE) && in ieee80211_key_enable_hw_accel()
157 !(key->local->hw.flags & IEEE80211_HW_SUPPORTS_PER_STA_GTK)) in ieee80211_key_enable_hw_accel()
163 sdata = key->sdata; in ieee80211_key_enable_hw_accel()
169 if (!(key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE)) in ieee80211_key_enable_hw_accel()
[all …]
Ddebugfs_key.c23 struct ieee80211_key *key = file->private_data; \
25 format_string, key->prop); \
69 struct ieee80211_key *key = file->private_data; in key_algorithm_read() local
70 u32 c = key->conf.cipher; in key_algorithm_read()
84 struct ieee80211_key *key = file->private_data; in key_tx_spec_read() local
86 switch (key->conf.cipher) { in key_tx_spec_read()
93 key->u.tkip.tx.iv32, in key_tx_spec_read()
94 key->u.tkip.tx.iv16); in key_tx_spec_read()
98 pn = atomic64_read(&key->u.ccmp.tx_pn); in key_tx_spec_read()
105 pn = atomic64_read(&key->u.aes_cmac.tx_pn); in key_tx_spec_read()
[all …]
Dtkip.c145 u8 *ieee80211_tkip_add_iv(u8 *pos, struct ieee80211_key *key) in ieee80211_tkip_add_iv() argument
147 lockdep_assert_held(&key->u.tkip.txlock); in ieee80211_tkip_add_iv()
149 pos = write_tkip_iv(pos, key->u.tkip.tx.iv16); in ieee80211_tkip_add_iv()
150 *pos++ = (key->conf.keyidx << 6) | (1 << 5) /* Ext IV */; in ieee80211_tkip_add_iv()
151 put_unaligned_le32(key->u.tkip.tx.iv32, pos); in ieee80211_tkip_add_iv()
155 static void ieee80211_compute_tkip_p1k(struct ieee80211_key *key, u32 iv32) in ieee80211_compute_tkip_p1k() argument
157 struct ieee80211_sub_if_data *sdata = key->sdata; in ieee80211_compute_tkip_p1k()
158 struct tkip_ctx *ctx = &key->u.tkip.tx; in ieee80211_compute_tkip_p1k()
159 const u8 *tk = &key->conf.key[NL80211_TKIP_DATA_OFFSET_ENCR_KEY]; in ieee80211_compute_tkip_p1k()
161 lockdep_assert_held(&key->u.tkip.txlock); in ieee80211_compute_tkip_p1k()
[all …]
Dwpa.c32 u8 *data, *key, *mic; in ieee80211_tx_h_michael_mic_add() local
41 if (!tx->key || tx->key->conf.cipher != WLAN_CIPHER_SUITE_TKIP || in ieee80211_tx_h_michael_mic_add()
60 !(tx->key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC)) { in ieee80211_tx_h_michael_mic_add()
76 key = &tx->key->conf.key[NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY]; in ieee80211_tx_h_michael_mic_add()
78 michael_mic(key, hdr, data, data_len, mic); in ieee80211_tx_h_michael_mic_add()
89 u8 *data, *key = NULL; in ieee80211_rx_h_michael_mic_verify() local
114 if (!(status->flag & RX_FLAG_IV_STRIPPED) && rx->key && in ieee80211_rx_h_michael_mic_verify()
115 rx->key->conf.cipher == WLAN_CIPHER_SUITE_TKIP) in ieee80211_rx_h_michael_mic_verify()
126 if (!rx->key || rx->key->conf.cipher != WLAN_CIPHER_SUITE_TKIP || in ieee80211_rx_h_michael_mic_verify()
130 if (rx->sdata->vif.type == NL80211_IFTYPE_AP && rx->key->conf.keyidx) { in ieee80211_rx_h_michael_mic_verify()
[all …]
Ddebugfs_key.h5 void ieee80211_debugfs_key_add(struct ieee80211_key *key);
6 void ieee80211_debugfs_key_remove(struct ieee80211_key *key);
12 void ieee80211_debugfs_key_sta_del(struct ieee80211_key *key,
15 static inline void ieee80211_debugfs_key_add(struct ieee80211_key *key) in ieee80211_debugfs_key_add() argument
17 static inline void ieee80211_debugfs_key_remove(struct ieee80211_key *key) in ieee80211_debugfs_key_remove() argument
28 static inline void ieee80211_debugfs_key_sta_del(struct ieee80211_key *key, in ieee80211_debugfs_key_sta_del() argument
Dwep.c120 struct ieee80211_key *key) in ieee80211_wep_remove_iv() argument
163 const u8 *key, int keylen, int keyidx) in ieee80211_wep_encrypt() argument
182 memcpy(rc4key + 3, key, keylen); in ieee80211_wep_encrypt()
227 struct ieee80211_key *key) in ieee80211_wep_decrypt() argument
248 if (!key || keyidx != key->conf.keyidx) in ieee80211_wep_decrypt()
251 klen = 3 + key->conf.keylen; in ieee80211_wep_decrypt()
257 memcpy(rc4key + 3, key->conf.key, key->conf.keylen); in ieee80211_wep_decrypt()
288 if (ieee80211_wep_decrypt(rx->local, rx->skb, rx->key)) in ieee80211_crypto_wep_decrypt()
294 ieee80211_wep_remove_iv(rx->local, rx->skb, rx->key); in ieee80211_crypto_wep_decrypt()
309 if (ieee80211_wep_encrypt(tx->local, skb, tx->key->conf.key, in wep_encrypt_skb()
[all …]
/linux-4.1.27/samples/bpf/
Dtest_maps.c23 long long key, next_key, value; in test_hashmap_sanity() local
26 map_fd = bpf_create_map(BPF_MAP_TYPE_HASH, sizeof(key), sizeof(value), 2); in test_hashmap_sanity()
32 key = 1; in test_hashmap_sanity()
35 assert(bpf_update_elem(map_fd, &key, &value, BPF_ANY) == 0); in test_hashmap_sanity()
39 assert(bpf_update_elem(map_fd, &key, &value, BPF_NOEXIST) == -1 && in test_hashmap_sanity()
43 assert(bpf_update_elem(map_fd, &key, &value, -1) == -1 && errno == EINVAL); in test_hashmap_sanity()
46 assert(bpf_lookup_elem(map_fd, &key, &value) == 0 && value == 1234); in test_hashmap_sanity()
48 key = 2; in test_hashmap_sanity()
50 assert(bpf_lookup_elem(map_fd, &key, &value) == -1 && errno == ENOENT); in test_hashmap_sanity()
53 assert(bpf_update_elem(map_fd, &key, &value, BPF_EXIST) == -1 && in test_hashmap_sanity()
[all …]
Dtracex3_user.c23 __u32 key; in clear_stats() local
26 for (key = 0; key < SLOTS; key++) in clear_stats()
27 bpf_update_elem(fd, &key, &value, BPF_ANY); in clear_stats()
78 __u32 key; in print_hist() local
84 for (key = 0; key < SLOTS; key++) { in print_hist()
86 bpf_lookup_elem(fd, &key, &value); in print_hist()
87 cnt[key] = value; in print_hist()
93 for (key = full_range ? 0 : 29; key < SLOTS; key++) { in print_hist()
94 int c = num_colors * cnt[key] / (max_cnt + 1); in print_hist()
Dtracex2_user.c25 int key; in print_hist() local
33 for (key = 0; key < MAX_INDEX; key++) { in print_hist()
34 bpf_lookup_elem(fd, &key, &value); in print_hist()
35 data[key] = value; in print_hist()
36 if (value && key > max_ind) in print_hist()
37 max_ind = key; in print_hist()
60 long key, next_key, value; in main() local
82 key = 0; in main()
83 while (bpf_get_next_key(map_fd[0], &key, &next_key) == 0) { in main()
86 key = next_key; in main()
[all …]
Dlibbpf.c34 int bpf_update_elem(int fd, void *key, void *value, unsigned long long flags) in bpf_update_elem() argument
38 .key = ptr_to_u64(key), in bpf_update_elem()
46 int bpf_lookup_elem(int fd, void *key, void *value) in bpf_lookup_elem() argument
50 .key = ptr_to_u64(key), in bpf_lookup_elem()
57 int bpf_delete_elem(int fd, void *key) in bpf_delete_elem() argument
61 .key = ptr_to_u64(key), in bpf_delete_elem()
67 int bpf_get_next_key(int fd, void *key, void *next_key) in bpf_get_next_key() argument
71 .key = ptr_to_u64(key), in bpf_get_next_key()
Dsockex1_user.c32 int key; in main() local
34 key = IPPROTO_TCP; in main()
35 assert(bpf_lookup_elem(map_fd[0], &key, &tcp_cnt) == 0); in main()
37 key = IPPROTO_UDP; in main()
38 assert(bpf_lookup_elem(map_fd[0], &key, &udp_cnt) == 0); in main()
40 key = IPPROTO_ICMP; in main()
41 assert(bpf_lookup_elem(map_fd[0], &key, &icmp_cnt) == 0); in main()
Dsock_example.c33 int sock = -1, map_fd, prog_fd, i, key; in test_sock() local
36 map_fd = bpf_create_map(BPF_MAP_TYPE_ARRAY, sizeof(key), sizeof(value), in test_sock()
74 key = IPPROTO_TCP; in test_sock()
75 assert(bpf_lookup_elem(map_fd, &key, &tcp_cnt) == 0); in test_sock()
77 key = IPPROTO_UDP; in test_sock()
78 assert(bpf_lookup_elem(map_fd, &key, &udp_cnt) == 0); in test_sock()
80 key = IPPROTO_ICMP; in test_sock()
81 assert(bpf_lookup_elem(map_fd, &key, &icmp_cnt) == 0); in test_sock()
Dtracex4_user.c34 __u64 key, next_key; in print_old_objects() local
37 key = write(1, "\e[1;1H\e[2J", 12); /* clear screen */ in print_old_objects()
39 key = -1; in print_old_objects()
40 while (bpf_get_next_key(map_fd[0], &key, &next_key) == 0) { in print_old_objects()
42 key = next_key; in print_old_objects()
/linux-4.1.27/net/openvswitch/
Dflow.c248 static int parse_ipv6hdr(struct sk_buff *skb, struct sw_flow_key *key) in parse_ipv6hdr() argument
266 key->ip.proto = NEXTHDR_NONE; in parse_ipv6hdr()
267 key->ip.tos = ipv6_get_dsfield(nh); in parse_ipv6hdr()
268 key->ip.ttl = nh->hop_limit; in parse_ipv6hdr()
269 key->ipv6.label = *(__be32 *)nh & htonl(IPV6_FLOWINFO_FLOWLABEL); in parse_ipv6hdr()
270 key->ipv6.addr.src = nh->saddr; in parse_ipv6hdr()
271 key->ipv6.addr.dst = nh->daddr; in parse_ipv6hdr()
279 key->ip.frag = OVS_FRAG_TYPE_LATER; in parse_ipv6hdr()
281 key->ip.frag = OVS_FRAG_TYPE_FIRST; in parse_ipv6hdr()
283 key->ip.frag = OVS_FRAG_TYPE_NONE; in parse_ipv6hdr()
[all …]
Dactions.c44 struct sw_flow_key *key,
95 const struct sw_flow_key *key, in add_deferred_actions() argument
106 da->pkt_key = *key; in add_deferred_actions()
112 static void invalidate_flow_key(struct sw_flow_key *key) in invalidate_flow_key() argument
114 key->eth.type = htons(0); in invalidate_flow_key()
117 static bool is_flow_key_valid(const struct sw_flow_key *key) in is_flow_key_valid() argument
119 return !!key->eth.type; in is_flow_key_valid()
122 static int push_mpls(struct sk_buff *skb, struct sw_flow_key *key, in push_mpls() argument
154 invalidate_flow_key(key); in push_mpls()
158 static int pop_mpls(struct sk_buff *skb, struct sw_flow_key *key, in pop_mpls() argument
[all …]
Dflow_netlink.c89 sizeof((match)->key->field), is_mask); \
91 (match)->mask->key.field = value; \
93 (match)->key->field = value; \
100 memcpy((u8 *)&(match)->mask->key + offset, value_p, \
103 memcpy((u8 *)(match)->key + offset, value_p, len); \
113 sizeof((match)->key->field), is_mask); \
115 memset((u8 *)&(match)->mask->key.field, value, \
116 sizeof((match)->mask->key.field)); \
118 memset((u8 *)&(match)->key->field, value, \
119 sizeof((match)->key->field)); \
[all …]
/linux-4.1.27/kernel/
Djump_label.c38 if (jea->key < jeb->key) in jump_label_cmp()
41 if (jea->key > jeb->key) in jump_label_cmp()
57 static void jump_label_update(struct static_key *key, int enable);
59 void static_key_slow_inc(struct static_key *key) in static_key_slow_inc() argument
62 if (atomic_inc_not_zero(&key->enabled)) in static_key_slow_inc()
66 if (atomic_read(&key->enabled) == 0) { in static_key_slow_inc()
67 if (!jump_label_get_branch_default(key)) in static_key_slow_inc()
68 jump_label_update(key, JUMP_LABEL_ENABLE); in static_key_slow_inc()
70 jump_label_update(key, JUMP_LABEL_DISABLE); in static_key_slow_inc()
72 atomic_inc(&key->enabled); in static_key_slow_inc()
[all …]
Dmodule_signing.c133 static struct key *request_asymmetric_key(const char *signer, size_t signer_len, in request_asymmetric_key()
136 key_ref_t key; in request_asymmetric_key() local
161 key = keyring_search(make_key_ref(system_trusted_keyring, 1), in request_asymmetric_key()
163 if (IS_ERR(key)) in request_asymmetric_key()
165 id, PTR_ERR(key)); in request_asymmetric_key()
168 if (IS_ERR(key)) { in request_asymmetric_key()
169 switch (PTR_ERR(key)) { in request_asymmetric_key()
176 return ERR_CAST(key); in request_asymmetric_key()
180 pr_devel("<==%s() = 0 [%x]\n", __func__, key_serial(key_ref_to_ptr(key))); in request_asymmetric_key()
181 return key_ref_to_ptr(key); in request_asymmetric_key()
[all …]
Dfutex.c203 union futex_key key; member
233 union futex_key key; member
242 .key = FUTEX_KEY_INIT,
261 static inline void futex_get_mm(union futex_key *key) in futex_get_mm() argument
263 atomic_inc(&key->private.mm->mm_count); in futex_get_mm()
309 static struct futex_hash_bucket *hash_futex(union futex_key *key) in hash_futex() argument
311 u32 hash = jhash2((u32*)&key->both.word, in hash_futex()
312 (sizeof(key->both.word)+sizeof(key->both.ptr))/4, in hash_futex()
313 key->both.offset); in hash_futex()
333 static void get_futex_key_refs(union futex_key *key) in get_futex_key_refs() argument
[all …]
Dsystem_keyring.c21 struct key *system_trusted_keyring;
57 key_ref_t key; in load_system_certificate_list() local
79 key = key_create_or_update(make_key_ref(system_trusted_keyring, 1), in load_system_certificate_list()
88 if (IS_ERR(key)) { in load_system_certificate_list()
90 PTR_ERR(key)); in load_system_certificate_list()
92 set_bit(KEY_FLAG_BUILTIN, &key_ref_to_ptr(key)->flags); in load_system_certificate_list()
94 key_ref_to_ptr(key)->description); in load_system_certificate_list()
95 key_ref_put(key); in load_system_certificate_list()
/linux-4.1.27/fs/ubifs/
Dkey.h97 union ubifs_key *key, ino_t inum) in ino_key_init() argument
99 key->u32[0] = inum; in ino_key_init()
100 key->u32[1] = UBIFS_INO_KEY << UBIFS_S_KEY_BLOCK_BITS; in ino_key_init()
112 union ubifs_key *key = k; in ino_key_init_flash() local
114 key->j32[0] = cpu_to_le32(inum); in ino_key_init_flash()
115 key->j32[1] = cpu_to_le32(UBIFS_INO_KEY << UBIFS_S_KEY_BLOCK_BITS); in ino_key_init_flash()
126 union ubifs_key *key, ino_t inum) in lowest_ino_key() argument
128 key->u32[0] = inum; in lowest_ino_key()
129 key->u32[1] = 0; in lowest_ino_key()
139 union ubifs_key *key, ino_t inum) in highest_ino_key() argument
[all …]
Dtnc.c322 ubifs_assert(is_hash_key(c, &zbr->key)); in lnc_add()
397 ubifs_assert(is_hash_key(c, &zbr->key)); in tnc_read_node_nm()
487 static int fallible_read_node(struct ubifs_info *c, const union ubifs_key *key, in fallible_read_node() argument
492 dbg_tnck(key, "LEB %d:%d, key ", zbr->lnum, zbr->offs); in fallible_read_node()
494 ret = try_read_node(c, node, key_type(c, key), zbr->len, zbr->lnum, in fallible_read_node()
501 key_read(c, &dent->key, &node_key); in fallible_read_node()
502 if (keys_cmp(c, key, &node_key) != 0) in fallible_read_node()
506 dbg_mntk(key, "dangling branch LEB %d:%d len %d, key ", in fallible_read_node()
691 static int resolve_collision(struct ubifs_info *c, const union ubifs_key *key, in resolve_collision() argument
714 if (keys_cmp(c, &(*zn)->zbranch[*n].key, key)) { in resolve_collision()
[all …]
Dtnc_misc.c137 const union ubifs_key *key, int *n) in ubifs_search_zbranch() argument
147 cmp = keys_cmp(c, key, &zbr[mid].key); in ubifs_search_zbranch()
163 ubifs_assert(keys_cmp(c, key, &zbr[0].key) < 0); in ubifs_search_zbranch()
165 ubifs_assert(keys_cmp(c, key, &zbr[*n].key) > 0); in ubifs_search_zbranch()
167 ubifs_assert(keys_cmp(c, key, &zbr[*n + 1].key) < 0); in ubifs_search_zbranch()
308 key_read(c, &br->key, &zbr->key); in read_znode()
324 switch (key_type(c, &zbr->key)) { in read_znode()
332 i, key_type(c, &zbr->key)); in read_znode()
340 type = key_type(c, &zbr->key); in read_znode()
368 key1 = &znode->zbranch[i].key; in read_znode()
[all …]
Dreplay.c62 union ubifs_key key; member
204 ino = key_inum(c, &r->key); in trun_remove_range()
223 dbg_mntk(&r->key, "LEB %d:%d len %d deletion %d sqnum %llu key ", in apply_replay_entry()
229 if (is_hash_key(c, &r->key)) { in apply_replay_entry()
231 err = ubifs_tnc_remove_nm(c, &r->key, &r->nm); in apply_replay_entry()
233 err = ubifs_tnc_add_nm(c, &r->key, r->lnum, r->offs, in apply_replay_entry()
237 switch (key_type(c, &r->key)) { in apply_replay_entry()
240 ino_t inum = key_inum(c, &r->key); in apply_replay_entry()
249 err = ubifs_tnc_remove(c, &r->key); in apply_replay_entry()
253 err = ubifs_tnc_add(c, &r->key, r->lnum, r->offs, in apply_replay_entry()
[all …]
Dgc.c138 ubifs_assert(key_type(c, &sa->key) == UBIFS_DATA_KEY); in data_nodes_cmp()
139 ubifs_assert(key_type(c, &sb->key) == UBIFS_DATA_KEY); in data_nodes_cmp()
143 inuma = key_inum(c, &sa->key); in data_nodes_cmp()
144 inumb = key_inum(c, &sb->key); in data_nodes_cmp()
147 unsigned int blka = key_block(c, &sa->key); in data_nodes_cmp()
148 unsigned int blkb = key_block(c, &sb->key); in data_nodes_cmp()
182 ubifs_assert(key_type(c, &sa->key) != UBIFS_DATA_KEY && in nondata_nodes_cmp()
183 key_type(c, &sb->key) != UBIFS_DATA_KEY); in nondata_nodes_cmp()
196 ubifs_assert(key_type(c, &sa->key) == UBIFS_DENT_KEY || in nondata_nodes_cmp()
197 key_type(c, &sa->key) == UBIFS_XENT_KEY); in nondata_nodes_cmp()
[all …]
/linux-4.1.27/fs/nilfs2/
Ddirect.c37 nilfs_direct_get_ptr(const struct nilfs_bmap *direct, __u64 key) in nilfs_direct_get_ptr() argument
39 return le64_to_cpu(*(nilfs_direct_dptrs(direct) + key)); in nilfs_direct_get_ptr()
43 __u64 key, __u64 ptr) in nilfs_direct_set_ptr() argument
45 *(nilfs_direct_dptrs(direct) + key) = cpu_to_le64(ptr); in nilfs_direct_set_ptr()
49 __u64 key, int level, __u64 *ptrp) in nilfs_direct_lookup() argument
53 if (key > NILFS_DIRECT_KEY_MAX || level != 1) in nilfs_direct_lookup()
55 ptr = nilfs_direct_get_ptr(direct, key); in nilfs_direct_lookup()
64 __u64 key, __u64 *ptrp, in nilfs_direct_lookup_contig() argument
72 if (key > NILFS_DIRECT_KEY_MAX) in nilfs_direct_lookup_contig()
74 ptr = nilfs_direct_get_ptr(direct, key); in nilfs_direct_lookup_contig()
[all …]
Dbmap.c75 int nilfs_bmap_lookup_at_level(struct nilfs_bmap *bmap, __u64 key, int level, in nilfs_bmap_lookup_at_level() argument
82 ret = bmap->b_ops->bop_lookup(bmap, key, level, ptrp); in nilfs_bmap_lookup_at_level()
99 int nilfs_bmap_lookup_contig(struct nilfs_bmap *bmap, __u64 key, __u64 *ptrp, in nilfs_bmap_lookup_contig() argument
105 ret = bmap->b_ops->bop_lookup_contig(bmap, key, ptrp, maxblocks); in nilfs_bmap_lookup_contig()
111 static int nilfs_bmap_do_insert(struct nilfs_bmap *bmap, __u64 key, __u64 ptr) in nilfs_bmap_do_insert() argument
118 ret = bmap->b_ops->bop_check_insert(bmap, key); in nilfs_bmap_do_insert()
125 bmap, key, ptr, keys, ptrs, n); in nilfs_bmap_do_insert()
134 return bmap->b_ops->bop_insert(bmap, key, ptr); in nilfs_bmap_do_insert()
155 int nilfs_bmap_insert(struct nilfs_bmap *bmap, __u64 key, unsigned long rec) in nilfs_bmap_insert() argument
160 ret = nilfs_bmap_do_insert(bmap, key, rec); in nilfs_bmap_insert()
[all …]
/linux-4.1.27/drivers/input/
Dsparse-keymap.c29 struct key_entry *key; in sparse_keymap_get_key_index() local
32 for (key = dev->keycode; key->type != KE_END; key++) { in sparse_keymap_get_key_index()
33 if (key->type == KE_KEY) { in sparse_keymap_get_key_index()
34 if (key == k) in sparse_keymap_get_key_index()
46 struct key_entry *key; in sparse_keymap_entry_by_index() local
49 for (key = dev->keycode; key->type != KE_END; key++) in sparse_keymap_entry_by_index()
50 if (key->type == KE_KEY) in sparse_keymap_entry_by_index()
52 return key; in sparse_keymap_entry_by_index()
68 struct key_entry *key; in sparse_keymap_entry_from_scancode() local
70 for (key = dev->keycode; key->type != KE_END; key++) in sparse_keymap_entry_from_scancode()
[all …]
Dmatrix-keymap.c32 unsigned int row_shift, unsigned int key) in matrix_keypad_map_key() argument
35 unsigned int row = KEY_ROW(key); in matrix_keypad_map_key()
36 unsigned int col = KEY_COL(key); in matrix_keypad_map_key()
37 unsigned short code = KEY_VAL(key); in matrix_keypad_map_key()
42 __func__, key, row, col, rows, cols); in matrix_keypad_map_key()
110 unsigned int key = be32_to_cpup(prop + i); in matrix_keypad_parse_of_keymap() local
113 row_shift, key)) in matrix_keypad_parse_of_keymap()
188 unsigned int key = keymap_data->keymap[i]; in matrix_keypad_build_keymap() local
191 row_shift, key)) in matrix_keypad_build_keymap()
/linux-4.1.27/security/integrity/
Ddigsig_asymmetric.c26 static struct key *request_asymmetric_key(struct key *keyring, uint32_t keyid) in request_asymmetric_key()
28 struct key *key; in request_asymmetric_key() local
41 key = ERR_CAST(kref); in request_asymmetric_key()
43 key = key_ref_to_ptr(kref); in request_asymmetric_key()
45 key = request_key(&key_type_asymmetric, name, NULL); in request_asymmetric_key()
48 if (IS_ERR(key)) { in request_asymmetric_key()
50 name, PTR_ERR(key)); in request_asymmetric_key()
51 switch (PTR_ERR(key)) { in request_asymmetric_key()
58 return key; in request_asymmetric_key()
62 pr_debug("%s() = 0 [%x]\n", __func__, key_serial(key)); in request_asymmetric_key()
[all …]
Ddigsig.c24 static struct key *keyring[INTEGRITY_KEYRING_MAX];
90 key_ref_t key; in integrity_load_x509() local
101 key = key_create_or_update(make_key_ref(keyring[id], 1), in integrity_load_x509()
109 if (IS_ERR(key)) { in integrity_load_x509()
110 rc = PTR_ERR(key); in integrity_load_x509()
115 key_ref_to_ptr(key)->description, path); in integrity_load_x509()
116 key_ref_put(key); in integrity_load_x509()
/linux-4.1.27/fs/afs/
Dsecurity.c23 struct key *afs_request_key(struct afs_cell *cell) in afs_request_key()
25 struct key *key; in afs_request_key() local
30 key = request_key(&key_type_rxrpc, cell->anonymous_key->description, in afs_request_key()
32 if (IS_ERR(key)) { in afs_request_key()
33 if (PTR_ERR(key) != -ENOKEY) { in afs_request_key()
34 _leave(" = %ld", PTR_ERR(key)); in afs_request_key()
35 return key; in afs_request_key()
43 _leave(" = {%x} [auth]", key_serial(key)); in afs_request_key()
44 return key; in afs_request_key()
60 key_put(permits->permits[loop].key); in afs_zap_permits()
[all …]
Ddir.c191 struct key *key) in afs_dir_get_page() argument
196 page = read_cache_page(dir->i_mapping, index, afs_page_filler, key); in afs_dir_get_page()
322 struct key *key) in afs_dir_iterate() argument
347 page = afs_dir_get_page(dir, blkoff / PAGE_SIZE, key); in afs_dir_iterate()
427 struct afs_fid *fid, struct key *key) in afs_do_lookup() argument
440 ret = afs_dir_iterate(dir, &cookie.ctx, key); in afs_do_lookup()
462 int ret, struct dentry *dentry, struct inode *dir, struct key *key, in afs_try_auto_mntpt() argument
470 ret, dentry, dentry, vnode->fid.vid, vnode->fid.vnode, key); in afs_try_auto_mntpt()
476 inode = afs_iget_autocell(dir, devname, strlen(devname), key); in afs_try_auto_mntpt()
500 struct key *key; in afs_lookup() local
[all …]
Dfile.c68 struct key *key; in afs_open() local
73 key = afs_request_key(vnode->volume->cell); in afs_open()
74 if (IS_ERR(key)) { in afs_open()
75 _leave(" = %ld [key]", PTR_ERR(key)); in afs_open()
76 return PTR_ERR(key); in afs_open()
79 ret = afs_validate(vnode, key); in afs_open()
85 file->private_data = key; in afs_open()
129 struct key *key = data; in afs_page_filler() local
134 _enter("{%x},{%lu},{%lu}", key_serial(key), inode->i_ino, page->index); in afs_page_filler()
172 ret = afs_vnode_fetch_data(vnode, key, offset, len, page); in afs_page_filler()
[all …]
Dinternal.h51 struct key *key; /* key to use for secure mounting */ member
83 struct key *key; /* security for this call */ member
148 struct key *key; /* owner of this write */ member
197 struct key *anonymous_key; /* anonymous user key for this cell */
371 struct key *unlock_key; /* key to be used in unlocking */
389 struct key *key; /* RxRPC ticket holding a security context */ member
515 extern int afs_fs_fetch_file_status(struct afs_server *, struct key *,
520 extern int afs_fs_fetch_data(struct afs_server *, struct key *,
523 extern int afs_fs_create(struct afs_server *, struct key *,
528 extern int afs_fs_remove(struct afs_server *, struct key *,
[all …]
Dvnode.c265 struct afs_vnode *auth_vnode, struct key *key) in afs_vnode_fetch_status() argument
360 ret = afs_fs_fetch_file_status(server, key, vnode, NULL, in afs_vnode_fetch_status()
369 afs_cache_permit(vnode, key, acl_order); in afs_vnode_fetch_status()
395 int afs_vnode_fetch_data(struct afs_vnode *vnode, struct key *key, in afs_vnode_fetch_data() argument
406 key_serial(key)); in afs_vnode_fetch_data()
423 ret = afs_fs_fetch_data(server, key, vnode, offset, length, in afs_vnode_fetch_data()
450 int afs_vnode_create(struct afs_vnode *vnode, struct key *key, in afs_vnode_create() argument
463 key_serial(key), in afs_vnode_create()
479 ret = afs_fs_create(server, key, vnode, name, mode, newfid, in afs_vnode_create()
508 int afs_vnode_remove(struct afs_vnode *vnode, struct key *key, const char *name, in afs_vnode_remove() argument
[all …]
Dfsclient.c278 struct key *key, in afs_fs_fetch_file_status() argument
287 key_serial(key), vnode->fid.vid, vnode->fid.vnode); in afs_fs_fetch_file_status()
293 call->key = key; in afs_fs_fetch_file_status()
450 struct key *key, in afs_fs_fetch_data64() argument
467 call->key = key; in afs_fs_fetch_data64()
493 struct key *key, in afs_fs_fetch_data() argument
503 return afs_fs_fetch_data64(server, key, vnode, offset, length, in afs_fs_fetch_data()
512 call->key = key; in afs_fs_fetch_data()
661 struct key *key, in afs_fs_create() argument
685 call->key = key; in afs_fs_create()
[all …]
Dflock.c112 struct key *key; in afs_lock_work() local
146 key = key_get(fl->fl_file->private_data); in afs_lock_work()
149 ret = afs_vnode_extend_lock(vnode, key); in afs_lock_work()
151 key_put(key); in afs_lock_work()
180 key = key_get(fl->fl_file->private_data); in afs_lock_work()
185 ret = afs_vnode_set_lock(vnode, key, type); in afs_lock_work()
216 afs_vnode_release_lock(vnode, key); in afs_lock_work()
222 key_put(key); in afs_lock_work()
238 static void afs_defer_unlock(struct afs_vnode *vnode, struct key *key) in afs_defer_unlock() argument
246 vnode->unlock_key = key_get(key); in afs_defer_unlock()
[all …]
Dinode.c34 static int afs_inode_map_status(struct afs_vnode *vnode, struct key *key) in afs_inode_map_status() argument
84 afs_mntpt_check_symlink(vnode, key); in afs_inode_map_status()
137 int namesz, struct key *key) in afs_iget_autocell() argument
198 struct inode *afs_iget(struct super_block *sb, struct key *key, in afs_iget() argument
234 ret = afs_vnode_fetch_status(vnode, NULL, key); in afs_iget()
265 ret = afs_inode_map_status(vnode, key); in afs_iget()
313 int afs_validate(struct afs_vnode *vnode, struct key *key) in afs_validate() argument
319 key_serial(key)); in afs_validate()
345 ret = afs_vnode_fetch_status(vnode, NULL, key); in afs_validate()
462 struct key *key; in afs_setattr() local
[all …]
Dsuper.c329 inode = afs_iget(sb, params->key, &fid, NULL, NULL); in afs_fill_super()
360 struct key *key; in afs_mount() local
385 key = afs_request_key(params.cell); in afs_mount()
386 if (IS_ERR(key)) { in afs_mount()
387 _leave(" = %ld [key]", PTR_ERR(key)); in afs_mount()
388 ret = PTR_ERR(key); in afs_mount()
391 params.key = key; in afs_mount()
442 key_put(params.key); in afs_mount()
533 struct key *key; in afs_statfs() local
536 key = afs_request_key(vnode->volume->cell); in afs_statfs()
[all …]
/linux-4.1.27/fs/nfs/
Dfscache.c69 struct nfs_fscache_key *key, *xkey; in nfs_fscache_get_super_cookie() local
79 key = kzalloc(sizeof(*key) + ulen, GFP_KERNEL); in nfs_fscache_get_super_cookie()
80 if (!key) in nfs_fscache_get_super_cookie()
83 key->nfs_client = nfss->nfs_client; in nfs_fscache_get_super_cookie()
84 key->key.super.s_flags = sb->s_flags & NFS_MS_MASK; in nfs_fscache_get_super_cookie()
85 key->key.nfs_server.flags = nfss->flags; in nfs_fscache_get_super_cookie()
86 key->key.nfs_server.rsize = nfss->rsize; in nfs_fscache_get_super_cookie()
87 key->key.nfs_server.wsize = nfss->wsize; in nfs_fscache_get_super_cookie()
88 key->key.nfs_server.acregmin = nfss->acregmin; in nfs_fscache_get_super_cookie()
89 key->key.nfs_server.acregmax = nfss->acregmax; in nfs_fscache_get_super_cookie()
[all …]
Dfscache-index.c74 struct nfs_server_key *key = buffer; in nfs_server_get_key() local
77 memset(key, 0, len); in nfs_server_get_key()
78 key->nfsversion = clp->rpc_ops->version; in nfs_server_get_key()
79 key->family = clp->cl_addr.ss_family; in nfs_server_get_key()
83 key->port = sin->sin_port; in nfs_server_get_key()
84 key->addr[0].ipv4_addr = sin->sin_addr; in nfs_server_get_key()
85 len += sizeof(key->addr[0].ipv4_addr); in nfs_server_get_key()
89 key->port = sin6->sin6_port; in nfs_server_get_key()
90 key->addr[0].ipv6_addr = sin6->sin6_addr; in nfs_server_get_key()
91 len += sizeof(key->addr[0].ipv6_addr); in nfs_server_get_key()
[all …]
Ddns_resolve.c74 struct nfs_dns_ent *key; in nfs_dns_ent_update() local
77 key = container_of(ckey, struct nfs_dns_ent, h); in nfs_dns_ent_update()
79 memcpy(&new->addr, &key->addr, key->addrlen); in nfs_dns_ent_update()
80 new->addrlen = key->addrlen; in nfs_dns_ent_update()
87 struct nfs_dns_ent *key; in nfs_dns_ent_init() local
90 key = container_of(ckey, struct nfs_dns_ent, h); in nfs_dns_ent_init()
93 new->hostname = kstrndup(key->hostname, key->namelen, GFP_KERNEL); in nfs_dns_ent_init()
95 new->namelen = key->namelen; in nfs_dns_ent_init()
125 static unsigned int nfs_dns_hash(const struct nfs_dns_ent *key) in nfs_dns_hash() argument
127 return hash_str(key->hostname, NFS_DNS_HASHBITS); in nfs_dns_hash()
[all …]
/linux-4.1.27/drivers/gpu/drm/
Ddrm_hashtab.c59 void drm_ht_verbose_list(struct drm_open_hash *ht, unsigned long key) in drm_ht_verbose_list() argument
66 hashed_key = hash_long(key, ht->order); in drm_ht_verbose_list()
67 DRM_DEBUG("Key is 0x%08lx, Hashed key is 0x%08x\n", key, hashed_key); in drm_ht_verbose_list()
70 DRM_DEBUG("count %d, key: 0x%08lx\n", count++, entry->key); in drm_ht_verbose_list()
74 unsigned long key) in drm_ht_find_key() argument
80 hashed_key = hash_long(key, ht->order); in drm_ht_find_key()
83 if (entry->key == key) in drm_ht_find_key()
85 if (entry->key > key) in drm_ht_find_key()
92 unsigned long key) in drm_ht_find_key_rcu() argument
98 hashed_key = hash_long(key, ht->order); in drm_ht_find_key_rcu()
[all …]
/linux-4.1.27/drivers/staging/vt6655/
Dkey.c45 struct ieee80211_key_conf *key, u32 key_type, u32 mode, in vnt_set_keymode() argument
53 u8 key_inx = key->keyidx; in vnt_set_keymode()
66 key->hw_key_idx = i; in vnt_set_keymode()
67 entry = key->hw_key_idx; in vnt_set_keymode()
78 key->hw_key_idx = entry; in vnt_set_keymode()
101 if (key->keylen == WLAN_KEY_LEN_WEP40) in vnt_set_keymode()
102 key->key[15] &= 0x7f; in vnt_set_keymode()
103 if (key->keylen == WLAN_KEY_LEN_WEP104) in vnt_set_keymode()
104 key->key[15] |= 0x80; in vnt_set_keymode()
108 bssid, (u32 *)key->key, priv->byLocalID); in vnt_set_keymode()
[all …]
/linux-4.1.27/drivers/staging/vt6656/
Dkey.c51 struct ieee80211_key_conf *key, u32 key_type, u32 mode, in vnt_set_keymode() argument
59 u8 key_inx = key->keyidx; in vnt_set_keymode()
72 key->hw_key_idx = i; in vnt_set_keymode()
73 entry = key->hw_key_idx; in vnt_set_keymode()
84 key->hw_key_idx = entry; in vnt_set_keymode()
110 if (key->keylen == WLAN_KEY_LEN_WEP40) in vnt_set_keymode()
111 key->key[15] &= 0x7f; in vnt_set_keymode()
112 if (key->keylen == WLAN_KEY_LEN_WEP104) in vnt_set_keymode()
113 key->key[15] |= 0x80; in vnt_set_keymode()
116 vnt_mac_set_keyentry(priv, key_mode, entry, key_inx, bssid, key->key); in vnt_set_keymode()
[all …]
/linux-4.1.27/tools/perf/arch/x86/util/
Dkvm-stat.c20 struct event_key *key) in mmio_event_get_key() argument
22 key->key = perf_evsel__intval(evsel, sample, "gpa"); in mmio_event_get_key()
23 key->info = perf_evsel__intval(evsel, sample, "type"); in mmio_event_get_key()
31 struct perf_sample *sample, struct event_key *key) in mmio_event_begin() argument
40 mmio_event_get_key(evsel, sample, key); in mmio_event_begin()
48 struct event_key *key) in mmio_event_end() argument
57 mmio_event_get_key(evsel, sample, key); in mmio_event_end()
65 struct event_key *key, in mmio_event_decode_key() argument
69 (unsigned long)key->key, in mmio_event_decode_key()
70 key->info == KVM_TRACE_MMIO_WRITE ? "W" : "R"); in mmio_event_decode_key()
[all …]
/linux-4.1.27/fs/btrfs/tests/
Dextent-buffer-tests.c37 struct btrfs_key key; in test_btrfs_split_item() local
64 key.objectid = 0; in test_btrfs_split_item()
65 key.type = BTRFS_EXTENT_CSUM_KEY; in test_btrfs_split_item()
66 key.offset = 0; in test_btrfs_split_item()
68 setup_items_for_insert(root, path, &key, &value_len, value_len, in test_btrfs_split_item()
74 key.offset = 3; in test_btrfs_split_item()
81 ret = btrfs_split_item(NULL, root, path, &key, 17); in test_btrfs_split_item()
91 btrfs_item_key_to_cpu(eb, &key, 0); in test_btrfs_split_item()
92 if (key.objectid != 0 || key.type != BTRFS_EXTENT_CSUM_KEY || in test_btrfs_split_item()
93 key.offset != 0) { in test_btrfs_split_item()
[all …]
Dqgroup-tests.c92 struct btrfs_key key; in add_tree_ref() local
98 key.objectid = bytenr; in add_tree_ref()
99 key.type = BTRFS_EXTENT_ITEM_KEY; in add_tree_ref()
100 key.offset = num_bytes; in add_tree_ref()
109 ret = btrfs_search_slot(&trans, root, &key, path, 0, 1); in add_tree_ref()
122 key.objectid = bytenr; in add_tree_ref()
124 key.type = BTRFS_SHARED_BLOCK_REF_KEY; in add_tree_ref()
125 key.offset = parent; in add_tree_ref()
127 key.type = BTRFS_TREE_BLOCK_REF_KEY; in add_tree_ref()
128 key.offset = root_objectid; in add_tree_ref()
[all …]
/linux-4.1.27/net/mac802154/
Dllsec.c26 static void llsec_key_put(struct mac802154_llsec_key *key);
50 struct ieee802154_llsec_key_entry *key, *kn; in mac802154_llsec_destroy() local
68 list_for_each_entry_safe(key, kn, &sec->table.keys, list) { in mac802154_llsec_destroy()
71 mkey = container_of(key->key, struct mac802154_llsec_key, key); in mac802154_llsec_destroy()
72 list_del(&key->list); in mac802154_llsec_destroy()
74 kfree(key); in mac802154_llsec_destroy()
122 struct mac802154_llsec_key *key; in llsec_key_alloc() local
125 key = kzalloc(sizeof(*key), GFP_KERNEL); in llsec_key_alloc()
126 if (!key) in llsec_key_alloc()
129 kref_init(&key->ref); in llsec_key_alloc()
[all …]
/linux-4.1.27/fs/cachefiles/
Dkey.c41 char *key; in cachefiles_cook_key() local
81 key = kmalloc(max, cachefiles_gfp); in cachefiles_cook_key()
82 if (!key) in cachefiles_cook_key()
88 sprintf(key, "@%02x%c+", (unsigned) csum, 0); in cachefiles_cook_key()
96 key[len + 1] = cachefiles_charmap[acc & 63]; in cachefiles_cook_key()
98 key[len] = cachefiles_charmap[acc & 63]; in cachefiles_cook_key()
104 key[len++] = '\0'; in cachefiles_cook_key()
106 key[len++] = '+'; in cachefiles_cook_key()
110 key[len++] = *raw++; in cachefiles_cook_key()
123 key[len++] = '\0'; in cachefiles_cook_key()
[all …]
/linux-4.1.27/crypto/asymmetric_keys/
Dpkcs7_trust.c28 struct key *trust_keyring) in pkcs7_validate_trust_one()
32 struct key *key; in pkcs7_validate_trust_one() local
57 key = x509_request_asymmetric_key(trust_keyring, x509->id, in pkcs7_validate_trust_one()
59 if (!IS_ERR(key)) { in pkcs7_validate_trust_one()
66 sinfo->index, x509->index, key_serial(key)); in pkcs7_validate_trust_one()
69 if (key == ERR_PTR(-ENOMEM)) in pkcs7_validate_trust_one()
89 key = x509_request_asymmetric_key(trust_keyring, last->akid_skid, in pkcs7_validate_trust_one()
91 if (!IS_ERR(key)) { in pkcs7_validate_trust_one()
94 sinfo->index, x509->index, key_serial(key)); in pkcs7_validate_trust_one()
97 if (PTR_ERR(key) != -ENOKEY) in pkcs7_validate_trust_one()
[all …]
Dpublic_key.c48 static void public_key_describe(const struct key *asymmetric_key, in public_key_describe()
51 struct public_key *key = asymmetric_key->payload.data; in public_key_describe() local
53 if (key) in public_key_describe()
55 pkey_id_type_name[key->id_type], key->algo->name); in public_key_describe()
63 struct public_key *key = payload; in public_key_destroy() local
66 if (key) { in public_key_destroy()
67 for (i = 0; i < ARRAY_SIZE(key->mpi); i++) in public_key_destroy()
68 mpi_free(key->mpi[i]); in public_key_destroy()
69 kfree(key); in public_key_destroy()
111 static int public_key_verify_signature_2(const struct key *key, in public_key_verify_signature_2() argument
[all …]
DKconfig2 tristate "Asymmetric (public-key cryptographic) key type"
5 This option provides support for a key type that holds the data for
6 the asymmetric keys used for public key cryptographic operations such
13 tristate "Asymmetric public-key crypto algorithm subtype"
19 This option provides support for asymmetric public key type handling.
25 tristate "RSA public-key algorithm"
36 This option provides support for parsing X.509 format blobs for key
37 data and provides the ability to instantiate a crypto key from a
38 public key packet found inside the certificate.
50 tristate "PKCS#7 testing key type"
[all …]
Dasymmetric_type.c147 static bool asymmetric_key_cmp(const struct key *key, in asymmetric_key_cmp() argument
150 const struct asymmetric_key_ids *kids = asymmetric_key_ids(key); in asymmetric_key_cmp()
160 static bool asymmetric_key_cmp_partial(const struct key *key, in asymmetric_key_cmp_partial() argument
163 const struct asymmetric_key_ids *kids = asymmetric_key_ids(key); in asymmetric_key_cmp_partial()
188 bool (*cmp)(const struct key *, const struct key_match_data *) = in asymmetric_key_match_preparse()
230 static void asymmetric_key_describe(const struct key *key, struct seq_file *m) in asymmetric_key_describe() argument
232 const struct asymmetric_key_subtype *subtype = asymmetric_key_subtype(key); in asymmetric_key_describe()
233 const struct asymmetric_key_ids *kids = asymmetric_key_ids(key); in asymmetric_key_describe()
238 seq_puts(m, key->description); in asymmetric_key_describe()
242 subtype->describe(key, m); in asymmetric_key_describe()
[all …]
Dx509_public_key.c75 struct key *x509_request_asymmetric_key(struct key *keyring, in x509_request_asymmetric_key()
79 key_ref_t key; in x509_request_asymmetric_key() local
100 key = keyring_search(make_key_ref(keyring, 1), in x509_request_asymmetric_key()
102 if (IS_ERR(key)) in x509_request_asymmetric_key()
103 pr_debug("Request for key '%s' err %ld\n", id, PTR_ERR(key)); in x509_request_asymmetric_key()
106 if (IS_ERR(key)) { in x509_request_asymmetric_key()
107 switch (PTR_ERR(key)) { in x509_request_asymmetric_key()
114 return ERR_CAST(key); in x509_request_asymmetric_key()
119 key_serial(key_ref_to_ptr(key))); in x509_request_asymmetric_key()
120 return key_ref_to_ptr(key); in x509_request_asymmetric_key()
[all …]
Dsignature.c28 int verify_signature(const struct key *key, in verify_signature() argument
36 if (key->type != &key_type_asymmetric) in verify_signature()
38 subtype = asymmetric_key_subtype(key); in verify_signature()
40 !key->payload.data) in verify_signature()
45 ret = subtype->verify_signature(key, sig); in verify_signature()
/linux-4.1.27/Documentation/security/
Dkeys-request-key.txt5 The key request service is part of the key retention service (refer to
12 struct key *request_key(const struct key_type *type,
18 struct key *request_key_with_auxdata(const struct key_type *type,
26 struct key *request_key_async(const struct key_type *type,
33 struct key *request_key_async_with_auxdata(const struct key_type *type,
47 does not need to link the key to a keyring to prevent it from being immediately
48 destroyed. The kernel interface returns a pointer directly to the key, and
49 it's up to the caller to destroy the key.
53 default is NULL). This is only useful for those key types that define their
54 own upcall mechanism rather than using /sbin/request-key.
[all …]
Dkeys.txt9 Keyrings are permitted; these are a special type of key that can hold links to
13 The key service can be configured on by enabling:
15 "Security options"/"Enable access key retention support" (CONFIG_KEYS)
27 - Defining a key type
28 - Request-key callback service
37 tokens, keyrings, etc.. These are represented in the kernel by struct key.
39 Each key has a number of attributes:
43 - A description (for matching a key in a search).
50 (*) Each key is issued a serial number of type key_serial_t that is unique for
51 the lifetime of that key. All serial numbers are positive non-zero 32-bit
[all …]
Dkeys-trusted-encrypted.txt3 Trusted and Encrypted Keys are two new key types added to the existing kernel
4 key ring service. Both of these new types are variable length symmetric keys,
12 under a 2048 bit RSA key in the TPM, and optionally sealed to specified PCR
16 when the kernel and initramfs are updated. The same key can have many saved
26 keyctl update key "update [options]"
30 keyhandle= ascii hex value of sealing key default 0x40000000 (SRK)
31 keyauth= ascii hex auth for sealing key default 0x00...i
42 "keyctl print" returns an ascii hex copy of the sealed key, which is in standard
43 TPM_STORED_DATA format. The key length for new keys are always in bytes.
49 numbers, and are encrypted/decrypted using a specified 'master' key. The
[all …]
Dkeys-ecryptfs.txt9 using a key, the FEFEK, derived from a user prompted passphrase; in the latter
11 to support other mechanisms like public key cryptography, PKCS#11 and TPM based
16 kernel key of the 'user' type, inserted in the user's session specific keyring
20 The 'encrypted' key type has been extended with the introduction of the new
24 kernel and protected by the parent master key.
32 required key can be securely generated by an Administrator and provided at boot
33 time after the unsealing of a 'trusted' key in order to perform the mount in a
34 controlled environment. Another advantage is that the key is not exposed to
39 keyctl add encrypted name "new ecryptfs key-type:master-key-name keylen" ring
41 keyctl update keyid "update key-type:master-key-name"
[all …]
/linux-4.1.27/drivers/crypto/qat/qat_common/
Dqat_crypto.c156 char key[ADF_CFG_MAX_KEY_LEN_IN_BYTES]; in qat_crypto_create_instances() local
160 strlcpy(key, ADF_NUM_CY, sizeof(key)); in qat_crypto_create_instances()
162 if (adf_cfg_get_param_value(accel_dev, SEC, key, val)) in qat_crypto_create_instances()
178 snprintf(key, sizeof(key), ADF_CY "%d" ADF_RING_BANK_NUM, i); in qat_crypto_create_instances()
179 if (adf_cfg_get_param_value(accel_dev, SEC, key, val)) in qat_crypto_create_instances()
184 snprintf(key, sizeof(key), ADF_CY "%d" ADF_RING_SYM_SIZE, i); in qat_crypto_create_instances()
185 if (adf_cfg_get_param_value(accel_dev, SEC, key, val)) in qat_crypto_create_instances()
191 snprintf(key, sizeof(key), ADF_CY "%d" ADF_RING_ASYM_SIZE, i); in qat_crypto_create_instances()
192 if (adf_cfg_get_param_value(accel_dev, SEC, key, val)) in qat_crypto_create_instances()
200 snprintf(key, sizeof(key), ADF_CY "%d" ADF_RING_SYM_TX, i); in qat_crypto_create_instances()
[all …]
/linux-4.1.27/tools/perf/arch/s390/util/
Dkvm-stat.c23 struct event_key *key) in event_icpt_insn_get_key() argument
28 key->key = icpt_insn_decoder(insn); in event_icpt_insn_get_key()
29 key->exit_reasons = sie_icpt_insn_codes; in event_icpt_insn_get_key()
34 struct event_key *key) in event_sigp_get_key() argument
36 key->key = perf_evsel__intval(evsel, sample, "order_code"); in event_sigp_get_key()
37 key->exit_reasons = sie_sigp_order_codes; in event_sigp_get_key()
42 struct event_key *key) in event_diag_get_key() argument
44 key->key = perf_evsel__intval(evsel, sample, "code"); in event_diag_get_key()
45 key->exit_reasons = sie_diagnose_codes; in event_diag_get_key()
50 struct event_key *key) in event_icpt_prog_get_key() argument
[all …]
/linux-4.1.27/net/wireless/
Dlib80211_crypt_ccmp.c43 u8 key[CCMP_TK_LEN]; member
184 struct lib80211_ccmp_data *key = priv; in lib80211_ccmp_hdr() local
192 memcpy(aeskey, key->key, CCMP_TK_LEN); in lib80211_ccmp_hdr()
200 key->tx_pn[i]++; in lib80211_ccmp_hdr()
201 if (key->tx_pn[i] != 0) in lib80211_ccmp_hdr()
206 *pos++ = key->tx_pn[5]; in lib80211_ccmp_hdr()
207 *pos++ = key->tx_pn[4]; in lib80211_ccmp_hdr()
209 *pos++ = (key->key_idx << 6) | (1 << 5) /* Ext IV included */ ; in lib80211_ccmp_hdr()
210 *pos++ = key->tx_pn[3]; in lib80211_ccmp_hdr()
211 *pos++ = key->tx_pn[2]; in lib80211_ccmp_hdr()
[all …]
Dlib80211_crypt_wep.c35 u8 key[WEP_KEY_LEN + 1]; member
92 u8 *key, int keylen, void *priv) in lib80211_wep_build_iv() argument
140 u8 key[WEP_KEY_LEN + 3]; in lib80211_wep_encrypt() local
151 skb_copy_from_linear_data_offset(skb, hdr_len, key, 3); in lib80211_wep_encrypt()
154 memcpy(key + 3, wep->key, wep->key_len); in lib80211_wep_encrypt()
168 crypto_blkcipher_setkey(wep->tx_tfm, key, klen); in lib80211_wep_encrypt()
185 u8 key[WEP_KEY_LEN + 3]; in lib80211_wep_decrypt() local
193 key[0] = *pos++; in lib80211_wep_decrypt()
194 key[1] = *pos++; in lib80211_wep_decrypt()
195 key[2] = *pos++; in lib80211_wep_decrypt()
[all …]
/linux-4.1.27/drivers/crypto/qat/qat_dh895xcc/
Dadf_drv.c125 char key[ADF_CFG_MAX_KEY_LEN_IN_BYTES]; in adf_dev_configure() local
135 snprintf(key, sizeof(key), ADF_CY "%d" ADF_RING_BANK_NUM, i); in adf_dev_configure()
137 key, (void *)&val, ADF_DEC)) in adf_dev_configure()
140 snprintf(key, sizeof(key), ADF_CY "%d" ADF_ETRMGR_CORE_AFFINITY, in adf_dev_configure()
143 key, (void *)&val, ADF_DEC)) in adf_dev_configure()
146 snprintf(key, sizeof(key), ADF_CY "%d" ADF_RING_ASYM_SIZE, i); in adf_dev_configure()
149 key, (void *)&val, ADF_DEC)) in adf_dev_configure()
153 snprintf(key, sizeof(key), ADF_CY "%d" ADF_RING_SYM_SIZE, i); in adf_dev_configure()
155 key, (void *)&val, ADF_DEC)) in adf_dev_configure()
159 snprintf(key, sizeof(key), ADF_CY "%d" ADF_RING_ASYM_TX, i); in adf_dev_configure()
[all …]
/linux-4.1.27/drivers/staging/lustre/lustre/llite/
Dllite_rmtacl.c77 static struct rmtacl_ctl_entry *rce_alloc(pid_t key, int ops) in rce_alloc() argument
86 rce->rce_key = key; in rce_alloc()
101 pid_t key) in __rct_search() argument
104 struct list_head *head = &rct->rct_entries[rce_hashfunc(key)]; in __rct_search()
107 if (rce->rce_key == key) in __rct_search()
113 struct rmtacl_ctl_entry *rct_search(struct rmtacl_ctl_table *rct, pid_t key) in rct_search() argument
118 rce = __rct_search(rct, key); in rct_search()
123 int rct_add(struct rmtacl_ctl_table *rct, pid_t key, int ops) in rct_add() argument
127 rce = rce_alloc(key, ops); in rct_add()
132 e = __rct_search(rct, key); in rct_add()
[all …]
/linux-4.1.27/drivers/staging/rtl8192e/
Drtllib_crypt_ccmp.c35 u8 key[CCMP_TK_LEN]; member
188 struct rtllib_ccmp_data *key = priv; in rtllib_ccmp_encrypt() local
206 key->tx_pn[i]++; in rtllib_ccmp_encrypt()
207 if (key->tx_pn[i] != 0) in rtllib_ccmp_encrypt()
212 *pos++ = key->tx_pn[5]; in rtllib_ccmp_encrypt()
213 *pos++ = key->tx_pn[4]; in rtllib_ccmp_encrypt()
215 *pos++ = (key->key_idx << 6) | (1 << 5) /* Ext IV included */; in rtllib_ccmp_encrypt()
216 *pos++ = key->tx_pn[3]; in rtllib_ccmp_encrypt()
217 *pos++ = key->tx_pn[2]; in rtllib_ccmp_encrypt()
218 *pos++ = key->tx_pn[1]; in rtllib_ccmp_encrypt()
[all …]
Drtllib_crypt_wep.c28 u8 key[WEP_KEY_LEN + 1]; member
98 u8 key[WEP_KEY_LEN + 3]; in prism2_wep_encrypt() local
134 *pos++ = key[0] = (wep->iv >> 16) & 0xff; in prism2_wep_encrypt()
135 *pos++ = key[1] = (wep->iv >> 8) & 0xff; in prism2_wep_encrypt()
136 *pos++ = key[2] = wep->iv & 0xff; in prism2_wep_encrypt()
140 memcpy(key + 3, wep->key, wep->key_len); in prism2_wep_encrypt()
153 crypto_blkcipher_setkey(wep->tx_tfm, key, klen); in prism2_wep_encrypt()
172 u8 key[WEP_KEY_LEN + 3]; in prism2_wep_decrypt() local
185 key[0] = *pos++; in prism2_wep_decrypt()
186 key[1] = *pos++; in prism2_wep_decrypt()
[all …]
Drtllib_wx.c311 int i, key, key_provided, len; in rtllib_wx_set_encode() local
316 key = erq->flags & IW_ENCODE_INDEX; in rtllib_wx_set_encode()
317 if (key) { in rtllib_wx_set_encode()
318 if (key > NUM_WEP_KEYS) in rtllib_wx_set_encode()
320 key--; in rtllib_wx_set_encode()
324 key = ieee->crypt_info.tx_keyidx; in rtllib_wx_set_encode()
327 RTLLIB_DEBUG_WX("Key: %d [%s]\n", key, key_provided ? in rtllib_wx_set_encode()
329 crypt = &ieee->crypt_info.crypt[key]; in rtllib_wx_set_encode()
333 key); in rtllib_wx_set_encode()
387 new_crypt->priv = new_crypt->ops->init(key); in rtllib_wx_set_encode()
[all …]
/linux-4.1.27/fs/btrfs/
Dexport.c65 struct btrfs_key key; in btrfs_get_dentry() local
72 key.objectid = root_objectid; in btrfs_get_dentry()
73 key.type = BTRFS_ROOT_ITEM_KEY; in btrfs_get_dentry()
74 key.offset = (u64)-1; in btrfs_get_dentry()
78 root = btrfs_read_fs_root_no_name(fs_info, &key); in btrfs_get_dentry()
84 key.objectid = objectid; in btrfs_get_dentry()
85 key.type = BTRFS_INODE_ITEM_KEY; in btrfs_get_dentry()
86 key.offset = 0; in btrfs_get_dentry()
88 inode = btrfs_iget(sb, &key, root, NULL); in btrfs_get_dentry()
160 struct btrfs_key key; in btrfs_get_parent() local
[all …]
Droot-tree.c136 *root, struct btrfs_key *key, struct btrfs_root_item in btrfs_update_root() argument
150 ret = btrfs_search_slot(trans, root, key, path, 0, 1); in btrfs_update_root()
159 key->objectid, key->type, key->offset); in btrfs_update_root()
175 ret = btrfs_search_slot(trans, root, key, path, in btrfs_update_root()
189 key, sizeof(*item)); in btrfs_update_root()
213 struct btrfs_key *key, struct btrfs_root_item *item) in btrfs_insert_root() argument
219 return btrfs_insert_item(trans, root, key, item, sizeof(*item)); in btrfs_insert_root()
226 struct btrfs_key key; in btrfs_find_orphan_roots() local
240 key.objectid = BTRFS_ORPHAN_OBJECTID; in btrfs_find_orphan_roots()
241 key.type = BTRFS_ORPHAN_ITEM_KEY; in btrfs_find_orphan_roots()
[all …]
Ddir-item.c77 struct btrfs_key key, location; in btrfs_insert_xattr_item() local
84 key.objectid = objectid; in btrfs_insert_xattr_item()
85 key.type = BTRFS_XATTR_ITEM_KEY; in btrfs_insert_xattr_item()
86 key.offset = btrfs_name_hash(name, name_len); in btrfs_insert_xattr_item()
89 dir_item = insert_with_overflow(trans, root, path, &key, data_size, in btrfs_insert_xattr_item()
131 struct btrfs_key key; in btrfs_insert_dir_item() local
135 key.objectid = btrfs_ino(dir); in btrfs_insert_dir_item()
136 key.type = BTRFS_DIR_ITEM_KEY; in btrfs_insert_dir_item()
137 key.offset = btrfs_name_hash(name, name_len); in btrfs_insert_dir_item()
147 dir_item = insert_with_overflow(trans, root, path, &key, data_size, in btrfs_insert_dir_item()
[all …]
Duuid-tree.c26 static void btrfs_uuid_to_key(u8 *uuid, u8 type, struct btrfs_key *key) in btrfs_uuid_to_key() argument
28 key->type = type; in btrfs_uuid_to_key()
29 key->objectid = get_unaligned_le64(uuid); in btrfs_uuid_to_key()
30 key->offset = get_unaligned_le64(uuid + sizeof(u64)); in btrfs_uuid_to_key()
43 struct btrfs_key key; in btrfs_uuid_tree_lookup() local
56 btrfs_uuid_to_key(uuid, type, &key); in btrfs_uuid_tree_lookup()
57 ret = btrfs_search_slot(NULL, uuid_root, &key, path, 0, 0); in btrfs_uuid_tree_lookup()
99 struct btrfs_key key; in btrfs_uuid_tree_add() local
114 btrfs_uuid_to_key(uuid, type, &key); in btrfs_uuid_tree_add()
122 ret = btrfs_insert_empty_item(trans, uuid_root, path, &key, in btrfs_uuid_tree_add()
[all …]
Dorphan.c26 struct btrfs_key key; in btrfs_insert_orphan_item() local
29 key.objectid = BTRFS_ORPHAN_OBJECTID; in btrfs_insert_orphan_item()
30 key.type = BTRFS_ORPHAN_ITEM_KEY; in btrfs_insert_orphan_item()
31 key.offset = offset; in btrfs_insert_orphan_item()
37 ret = btrfs_insert_empty_item(trans, root, path, &key, 0); in btrfs_insert_orphan_item()
47 struct btrfs_key key; in btrfs_del_orphan_item() local
50 key.objectid = BTRFS_ORPHAN_OBJECTID; in btrfs_del_orphan_item()
51 key.type = BTRFS_ORPHAN_ITEM_KEY; in btrfs_del_orphan_item()
52 key.offset = offset; in btrfs_del_orphan_item()
58 ret = btrfs_search_slot(trans, root, &key, path, -1, 1); in btrfs_del_orphan_item()
Dinode-item.c104 struct btrfs_key key; in btrfs_lookup_inode_extref() local
107 key.objectid = inode_objectid; in btrfs_lookup_inode_extref()
108 key.type = BTRFS_INODE_EXTREF_KEY; in btrfs_lookup_inode_extref()
109 key.offset = btrfs_extref_hash(ref_objectid, name, name_len); in btrfs_lookup_inode_extref()
111 ret = btrfs_search_slot(trans, root, &key, path, ins_len, cow); in btrfs_lookup_inode_extref()
128 struct btrfs_key key; in btrfs_del_inode_extref() local
137 key.objectid = inode_objectid; in btrfs_del_inode_extref()
138 key.type = BTRFS_INODE_EXTREF_KEY; in btrfs_del_inode_extref()
139 key.offset = btrfs_extref_hash(ref_objectid, name, name_len); in btrfs_del_inode_extref()
147 ret = btrfs_search_slot(trans, root, &key, path, -1, 1); in btrfs_del_inode_extref()
[all …]
Dtree-defrag.c36 struct btrfs_key key; in btrfs_defrag_leaves() local
80 memset(&key, 0, sizeof(key)); in btrfs_defrag_leaves()
82 memcpy(&key, &root->defrag_progress, sizeof(key)); in btrfs_defrag_leaves()
87 ret = btrfs_search_forward(root, &key, path, min_trans); in btrfs_defrag_leaves()
95 wret = btrfs_search_slot(trans, root, &key, path, 0, 1); in btrfs_defrag_leaves()
106 next_key_ret = btrfs_find_next_key(root, path, &key, 1, in btrfs_defrag_leaves()
117 memcpy(&root->defrag_progress, &key, sizeof(key)); in btrfs_defrag_leaves()
Drelocation.c143 struct btrfs_key key; member
586 struct btrfs_key key; in read_fs_root() local
588 key.objectid = root_objectid; in read_fs_root()
589 key.type = BTRFS_ROOT_ITEM_KEY; in read_fs_root()
591 key.offset = 0; in read_fs_root()
593 key.offset = (u64)-1; in read_fs_root()
595 return btrfs_get_fs_root(fs_info, &key, false); in read_fs_root()
625 struct btrfs_key key; in find_inline_backref() local
630 btrfs_item_key_to_cpu(leaf, &key, slot); in find_inline_backref()
643 if (key.type == BTRFS_EXTENT_ITEM_KEY && in find_inline_backref()
[all …]
Dbackref.c37 static int check_extent_in_eb(struct btrfs_key *key, struct extent_buffer *eb, in check_extent_in_eb() argument
65 e->inum = key->objectid; in check_extent_in_eb()
66 e->offset = key->offset + offset; in check_extent_in_eb()
87 struct btrfs_key key; in find_extent_in_eb() local
101 btrfs_item_key_to_cpu(eb, &key, slot); in find_extent_in_eb()
102 if (key.type != BTRFS_EXTENT_DATA_KEY) in find_extent_in_eb()
113 ret = check_extent_in_eb(&key, eb, fi, extent_item_pos, eie); in find_extent_in_eb()
195 struct btrfs_key *key, int level, in __add_prelim_ref() argument
209 if (key) in __add_prelim_ref()
210 ref->key_for_search = *key; in __add_prelim_ref()
[all …]
Dfile-item.c310 struct btrfs_key key; in btrfs_lookup_csums_range() local
335 key.objectid = BTRFS_EXTENT_CSUM_OBJECTID; in btrfs_lookup_csums_range()
336 key.offset = start; in btrfs_lookup_csums_range()
337 key.type = BTRFS_EXTENT_CSUM_KEY; in btrfs_lookup_csums_range()
339 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0); in btrfs_lookup_csums_range()
344 btrfs_item_key_to_cpu(leaf, &key, path->slots[0] - 1); in btrfs_lookup_csums_range()
345 if (key.objectid == BTRFS_EXTENT_CSUM_OBJECTID && in btrfs_lookup_csums_range()
346 key.type == BTRFS_EXTENT_CSUM_KEY) { in btrfs_lookup_csums_range()
347 offset = (start - key.offset) >> in btrfs_lookup_csums_range()
366 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); in btrfs_lookup_csums_range()
[all …]
Dtree-log.c345 struct btrfs_key *key) in overwrite_item() argument
354 bool inode_item = key->type == BTRFS_INODE_ITEM_KEY; in overwrite_item()
363 ret = btrfs_search_slot(NULL, root, key, path, 0, 0); in overwrite_item()
458 key, item_size); in overwrite_item()
486 if (key->type == BTRFS_INODE_ITEM_KEY && ret == -EEXIST) { in overwrite_item()
535 if (key->type == BTRFS_INODE_ITEM_KEY) { in overwrite_item()
556 struct btrfs_key key; in read_one_inode() local
559 key.objectid = objectid; in read_one_inode()
560 key.type = BTRFS_INODE_ITEM_KEY; in read_one_inode()
561 key.offset = 0; in read_one_inode()
[all …]
Dfile.c290 struct btrfs_key key; in __btrfs_run_defrag_inode() local
297 key.objectid = defrag->root; in __btrfs_run_defrag_inode()
298 key.type = BTRFS_ROOT_ITEM_KEY; in __btrfs_run_defrag_inode()
299 key.offset = (u64)-1; in __btrfs_run_defrag_inode()
303 inode_root = btrfs_read_fs_root_no_name(fs_info, &key); in __btrfs_run_defrag_inode()
309 key.objectid = defrag->ino; in __btrfs_run_defrag_inode()
310 key.type = BTRFS_INODE_ITEM_KEY; in __btrfs_run_defrag_inode()
311 key.offset = 0; in __btrfs_run_defrag_inode()
312 inode = btrfs_iget(fs_info->sb, &key, inode_root, NULL); in __btrfs_run_defrag_inode()
701 struct btrfs_key key; in __btrfs_drop_extents() local
[all …]
Dextent-tree.c98 u64 flags, struct btrfs_disk_key *key,
105 struct btrfs_key *key);
162 if (block_group->key.objectid < cache->key.objectid) { in btrfs_add_block_group_cache()
164 } else if (block_group->key.objectid > cache->key.objectid) { in btrfs_add_block_group_cache()
176 if (info->first_logical_byte > block_group->key.objectid) in btrfs_add_block_group_cache()
177 info->first_logical_byte = block_group->key.objectid; in btrfs_add_block_group_cache()
202 end = cache->key.objectid + cache->key.offset - 1; in block_group_cache_tree_search()
203 start = cache->key.objectid; in block_group_cache_tree_search()
206 if (!contains && (!ret || start < ret->key.objectid)) in block_group_cache_tree_search()
222 if (bytenr == 0 && info->first_logical_byte > ret->key.objectid) in block_group_cache_tree_search()
[all …]
Dprint-tree.c63 struct btrfs_disk_key key; in print_extent_item() local
94 btrfs_tree_block_key(eb, info, &key); in print_extent_item()
97 btrfs_disk_key_objectid(&key), key.type, in print_extent_item()
98 btrfs_disk_key_offset(&key), in print_extent_item()
185 struct btrfs_key key; in btrfs_print_leaf() local
197 btrfs_item_key_to_cpu(l, &key, i); in btrfs_print_leaf()
198 type = key.type; in btrfs_print_leaf()
201 i, key.objectid, type, key.offset, in btrfs_print_leaf()
316 struct btrfs_key key; in btrfs_print_tree() local
331 btrfs_node_key_to_cpu(c, &key, i); in btrfs_print_tree()
[all …]
/linux-4.1.27/drivers/tty/
Dsysrq.c84 static void sysrq_handle_loglevel(int key) in sysrq_handle_loglevel() argument
88 i = key - '0'; in sysrq_handle_loglevel()
101 static void sysrq_handle_SAK(int key) in sysrq_handle_SAK() argument
117 static void sysrq_handle_unraw(int key) in sysrq_handle_unraw() argument
132 static void sysrq_handle_crash(int key) in sysrq_handle_crash() argument
147 static void sysrq_handle_reboot(int key) in sysrq_handle_reboot() argument
160 static void sysrq_handle_sync(int key) in sysrq_handle_sync() argument
171 static void sysrq_handle_show_timers(int key) in sysrq_handle_show_timers() argument
182 static void sysrq_handle_mountro(int key) in sysrq_handle_mountro() argument
194 static void sysrq_handle_showlocks(int key) in sysrq_handle_showlocks() argument
[all …]
/linux-4.1.27/kernel/sched/
Dwait.c14 void __init_waitqueue_head(wait_queue_head_t *q, const char *name, struct lock_class_key *key) in __init_waitqueue_head() argument
17 lockdep_set_class_and_name(&q->lock, key, name); in __init_waitqueue_head()
66 int nr_exclusive, int wake_flags, void *key) in __wake_up_common() argument
73 if (curr->func(curr, mode, wake_flags, key) && in __wake_up_common()
90 int nr_exclusive, void *key) in __wake_up() argument
95 __wake_up_common(q, mode, nr_exclusive, 0, key); in __wake_up()
109 void __wake_up_locked_key(wait_queue_head_t *q, unsigned int mode, void *key) in __wake_up_locked_key() argument
111 __wake_up_common(q, mode, 1, 0, key); in __wake_up_locked_key()
133 int nr_exclusive, void *key) in __wake_up_sync_key() argument
145 __wake_up_common(q, mode, nr_exclusive, wake_flags, key); in __wake_up_sync_key()
[all …]
/linux-4.1.27/drivers/staging/rtl8192u/ieee80211/
Dieee80211_crypt_ccmp.c39 u8 key[CCMP_TK_LEN]; member
196 struct ieee80211_ccmp_data *key = priv; in ieee80211_ccmp_encrypt() local
215 key->tx_pn[i]++; in ieee80211_ccmp_encrypt()
216 if (key->tx_pn[i] != 0) in ieee80211_ccmp_encrypt()
221 *pos++ = key->tx_pn[5]; in ieee80211_ccmp_encrypt()
222 *pos++ = key->tx_pn[4]; in ieee80211_ccmp_encrypt()
224 *pos++ = (key->key_idx << 6) | (1 << 5) /* Ext IV included */; in ieee80211_ccmp_encrypt()
225 *pos++ = key->tx_pn[3]; in ieee80211_ccmp_encrypt()
226 *pos++ = key->tx_pn[2]; in ieee80211_ccmp_encrypt()
227 *pos++ = key->tx_pn[1]; in ieee80211_ccmp_encrypt()
[all …]
Dieee80211_crypt_wep.c32 u8 key[WEP_KEY_LEN + 1]; member
105 u8 key[WEP_KEY_LEN + 3]; in prism2_wep_encrypt() local
137 *pos++ = key[0] = (wep->iv >> 16) & 0xff; in prism2_wep_encrypt()
138 *pos++ = key[1] = (wep->iv >> 8) & 0xff; in prism2_wep_encrypt()
139 *pos++ = key[2] = wep->iv & 0xff; in prism2_wep_encrypt()
143 memcpy(key + 3, wep->key, wep->key_len); in prism2_wep_encrypt()
156 crypto_blkcipher_setkey(wep->tx_tfm, key, klen); in prism2_wep_encrypt()
177 u8 key[WEP_KEY_LEN + 3]; in prism2_wep_decrypt() local
189 key[0] = *pos++; in prism2_wep_decrypt()
190 key[1] = *pos++; in prism2_wep_decrypt()
[all …]
Dieee80211_wx.c299 int i, key, key_provided, len; in ieee80211_wx_set_encode() local
304 key = erq->flags & IW_ENCODE_INDEX; in ieee80211_wx_set_encode()
305 if (key) { in ieee80211_wx_set_encode()
306 if (key > WEP_KEYS) in ieee80211_wx_set_encode()
308 key--; in ieee80211_wx_set_encode()
312 key = ieee->tx_keyidx; in ieee80211_wx_set_encode()
315 IEEE80211_DEBUG_WX("Key: %d [%s]\n", key, key_provided ? in ieee80211_wx_set_encode()
317 crypt = &ieee->crypt[key]; in ieee80211_wx_set_encode()
322 key); in ieee80211_wx_set_encode()
373 new_crypt->priv = new_crypt->ops->init(key); in ieee80211_wx_set_encode()
[all …]
/linux-4.1.27/arch/sparc/crypto/
Daes_glue.c34 void (*encrypt)(const u64 *key, const u32 *input, u32 *output);
35 void (*decrypt)(const u64 *key, const u32 *input, u32 *output);
36 void (*load_encrypt_keys)(const u64 *key);
37 void (*load_decrypt_keys)(const u64 *key);
38 void (*ecb_encrypt)(const u64 *key, const u64 *input, u64 *output,
40 void (*ecb_decrypt)(const u64 *key, const u64 *input, u64 *output,
42 void (*cbc_encrypt)(const u64 *key, const u64 *input, u64 *output,
44 void (*cbc_decrypt)(const u64 *key, const u64 *input, u64 *output,
46 void (*ctr_crypt)(const u64 *key, const u64 *input, u64 *output,
52 u64 key[AES_MAX_KEYLENGTH / sizeof(u64)]; member
[all …]
Dcamellia_glue.c54 extern void camellia_sparc64_crypt(const u64 *key, const u32 *input,
75 extern void camellia_sparc64_load_keys(const u64 *key, unsigned int key_len);
78 const u64 *key);
92 const u64 *key; in __ecb_crypt() local
104 key = &ctx->encrypt_key[0]; in __ecb_crypt()
106 key = &ctx->decrypt_key[0]; in __ecb_crypt()
107 camellia_sparc64_load_keys(key, ctx->key_len); in __ecb_crypt()
117 op(src64, dst64, block_len, key); in __ecb_crypt()
141 const u64 *key, u64 *iv);
155 const u64 *key; in cbc_encrypt() local
[all …]
/linux-4.1.27/net/ceph/
Dcrypto.c19 dst->key = kmemdup(src->key, src->len, GFP_NOFS); in ceph_crypto_key_clone()
20 if (!dst->key) in ceph_crypto_key_clone()
25 int ceph_crypto_key_encode(struct ceph_crypto_key *key, void **p, void *end) in ceph_crypto_key_encode() argument
27 if (*p + sizeof(u16) + sizeof(key->created) + in ceph_crypto_key_encode()
28 sizeof(u16) + key->len > end) in ceph_crypto_key_encode()
30 ceph_encode_16(p, key->type); in ceph_crypto_key_encode()
31 ceph_encode_copy(p, &key->created, sizeof(key->created)); in ceph_crypto_key_encode()
32 ceph_encode_16(p, key->len); in ceph_crypto_key_encode()
33 ceph_encode_copy(p, key->key, key->len); in ceph_crypto_key_encode()
37 int ceph_crypto_key_decode(struct ceph_crypto_key *key, void **p, void *end) in ceph_crypto_key_decode() argument
[all …]
Dceph_common.c142 if (opt1->key && !opt2->key) in ceph_compare_options()
144 if (!opt1->key && opt2->key) in ceph_compare_options()
146 if (opt1->key && opt2->key) { in ceph_compare_options()
147 if (opt1->key->type != opt2->key->type) in ceph_compare_options()
149 if (opt1->key->created.tv_sec != opt2->key->created.tv_sec) in ceph_compare_options()
151 if (opt1->key->created.tv_nsec != opt2->key->created.tv_nsec) in ceph_compare_options()
153 if (opt1->key->len != opt2->key->len) in ceph_compare_options()
155 if (opt1->key->key && !opt2->key->key) in ceph_compare_options()
157 if (!opt1->key->key && opt2->key->key) in ceph_compare_options()
159 if (opt1->key->key && opt2->key->key) { in ceph_compare_options()
[all …]
Dcrypto.h14 void *key; member
17 static inline void ceph_crypto_key_destroy(struct ceph_crypto_key *key) in ceph_crypto_key_destroy() argument
19 if (key) in ceph_crypto_key_destroy()
20 kfree(key->key); in ceph_crypto_key_destroy()
25 int ceph_crypto_key_encode(struct ceph_crypto_key *key, void **p, void *end);
26 int ceph_crypto_key_decode(struct ceph_crypto_key *key, void **p, void *end);
27 int ceph_crypto_key_unarmor(struct ceph_crypto_key *key, const char *in);
/linux-4.1.27/Documentation/crypto/
Dasymmetric-keys.txt11 - Asymmetric key subtypes.
19 The "asymmetric" key type is designed to be a container for the keys used in
20 public-key cryptography, without imposing any particular restrictions on the
21 form or mechanism of the cryptography or form of the key.
23 The asymmetric key is given a subtype that defines what sort of data is
24 associated with the key and provides operations to describe and destroy it.
25 However, no requirement is made that the key data actually be stored in the
26 key.
28 A completely in-kernel key retention and operation subtype can be defined, but
30 a TPM) that might be used to both retain the relevant key and perform
[all …]
/linux-4.1.27/net/sunrpc/auth_gss/
Dgss_krb5_keys.c250 static void mit_des_fixup_key_parity(u8 key[8]) in mit_des_fixup_key_parity()
254 key[i] &= 0xfe; in mit_des_fixup_key_parity()
255 key[i] |= 1^parity_char(key[i]); in mit_des_fixup_key_parity()
264 struct xdr_netobj *key) in gss_krb5_des3_make_key() argument
269 if (key->len != 24) { in gss_krb5_des3_make_key()
270 dprintk("%s: key->len is %d\n", __func__, key->len); in gss_krb5_des3_make_key()
283 memcpy(key->data + i*8, randombits->data + i*7, 7); in gss_krb5_des3_make_key()
284 key->data[i*8+7] = (((key->data[i*8]&1)<<1) | in gss_krb5_des3_make_key()
285 ((key->data[i*8+1]&1)<<2) | in gss_krb5_des3_make_key()
286 ((key->data[i*8+2]&1)<<3) | in gss_krb5_des3_make_key()
[all …]
/linux-4.1.27/lib/
Dbtree.c135 static void dec_key(struct btree_geo *geo, unsigned long *key) in dec_key() argument
141 val = key[i]; in dec_key()
142 key[i] = val - 1; in dec_key()
159 unsigned long *key) in setkey() argument
161 longcpy(bkey(geo, node, n), key, geo->keylen); in setkey()
208 unsigned long *key) in btree_last() argument
219 longcpy(key, bkey(geo, node, 0), geo->keylen); in btree_last()
225 unsigned long *key) in keycmp() argument
227 return longcmp(bkey(geo, node, pos), key, geo->keylen); in keycmp()
230 static int keyzero(struct btree_geo *geo, unsigned long *key) in keyzero() argument
[all …]
Ddigsig.c70 static int digsig_verify_rsa(struct key *key, in digsig_verify_rsa() argument
86 down_read(&key->sem); in digsig_verify_rsa()
87 ukp = key->payload.data; in digsig_verify_rsa()
169 up_read(&key->sem); in digsig_verify_rsa()
189 int digsig_verify(struct key *keyring, const char *sig, int siglen, in digsig_verify()
196 struct key *key; in digsig_verify() local
213 key = ERR_CAST(kref); in digsig_verify()
215 key = key_ref_to_ptr(kref); in digsig_verify()
217 key = request_key(&key_type_user, name, NULL); in digsig_verify()
219 if (IS_ERR(key)) { in digsig_verify()
[all …]
Drbtree_test.c11 u32 key; member
27 u32 key = node->key; in insert() local
31 if (key < rb_entry(parent, struct test_node, rb)->key) in insert()
70 u32 key = node->key; in RB_DECLARE_CALLBACKS() local
79 if (key < parent->key) in RB_DECLARE_CALLBACKS()
99 nodes[i].key = prandom_u32_state(&rnd); in init()
145 WARN_ON_ONCE(node->key < prev_key); in check()
153 prev_key = node->key; in check()
/linux-4.1.27/mm/
Dcleancache.c146 struct cleancache_filekey *key) in cleancache_get_key() argument
152 key->u.ino = inode->i_ino; in cleancache_get_key()
156 len = (*fhfn)(inode, &key->u.fh[0], &maxlen, NULL); in cleancache_get_key()
181 struct cleancache_filekey key = { .u.key = { 0 } }; in __cleancache_get_page() local
193 if (cleancache_get_key(page->mapping->host, &key) < 0) in __cleancache_get_page()
196 ret = cleancache_ops->get_page(pool_id, key, page->index, page); in __cleancache_get_page()
219 struct cleancache_filekey key = { .u.key = { 0 } }; in __cleancache_put_page() local
229 cleancache_get_key(page->mapping->host, &key) >= 0) { in __cleancache_put_page()
230 cleancache_ops->put_page(pool_id, key, page->index, page); in __cleancache_put_page()
249 struct cleancache_filekey key = { .u.key = { 0 } }; in __cleancache_invalidate_page() local
[all …]
/linux-4.1.27/drivers/staging/wlan-ng/
Dp80211wep.c123 int wep_change_key(wlandevice_t *wlandev, int keynum, u8 *key, int keylen) in wep_change_key() argument
129 if (key == NULL) in wep_change_key()
138 8, key); in wep_change_key()
142 memcpy(wlandev->wep_keys[keynum], key, keylen); in wep_change_key()
155 u8 s[256], key[64], c_crc[4]; in wep_decrypt() local
163 key[0] = iv[0]; in wep_decrypt()
164 key[1] = iv[1]; in wep_decrypt()
165 key[2] = iv[2]; in wep_decrypt()
180 memcpy(key + 3, wlandev->wep_keys[keyidx], keylen); in wep_decrypt()
185 pr_debug("D %d: %*ph (%d %d) %*phC\n", len, 3, key, in wep_decrypt()
[all …]
/linux-4.1.27/tools/perf/ui/tui/
Dutil.c29 int key; in popup_menu__run() local
35 key = ui_browser__run(menu, 0); in popup_menu__run()
37 switch (key) { in popup_menu__run()
40 key = menu->index; in popup_menu__run()
46 key = -1; in popup_menu__run()
56 return key; in popup_menu__run()
75 int x, y, len, key; in ui_browser__input_window() local
129 key = ui__getch(delay_secs); in ui_browser__input_window()
130 while (key != K_TIMER && key != K_ENTER && key != K_ESC) { in ui_browser__input_window()
133 if (key == K_BKSPC) { in ui_browser__input_window()
[all …]
/linux-4.1.27/include/keys/
Duser-type.h42 extern int user_update(struct key *key, struct key_preparsed_payload *prep);
43 extern void user_revoke(struct key *key);
44 extern void user_destroy(struct key *key);
45 extern void user_describe(const struct key *user, struct seq_file *m);
46 extern long user_read(const struct key *key,
Dasymmetric-subtype.h32 void (*describe)(const struct key *key, struct seq_file *m);
38 int (*verify_signature)(const struct key *key,
50 struct asymmetric_key_subtype *asymmetric_key_subtype(const struct key *key) in asymmetric_key_subtype() argument
52 return key->type_data.p[0]; in asymmetric_key_subtype()
Dbig_key-type.h21 extern void big_key_revoke(struct key *key);
22 extern void big_key_destroy(struct key *key);
23 extern void big_key_describe(const struct key *big_key, struct seq_file *m);
24 extern long big_key_read(const struct key *key, char __user *buffer, size_t buflen);
/linux-4.1.27/Documentation/devicetree/bindings/input/
Dpxa27x-keypad.txt7 - marvell,debounce-interval : How long time the key will be
9 is debounce interval for direct key and bit[15:0] is debounce
10 interval for matrix key. The value is in binary number of 2ms
16 - marvell,direct-key-count : How many direct keyes are used.
17 - marvell,direct-key-mask : The mask indicates which keyes
18 are used. If bit[X] of the mask is set, the direct key X
20 - marvell,direct-key-low-active : Direct key status register
23 is low, the key is pressed(active).
24 - marvell,direct-key-map : It is a u16 array. Each item indicates
25 the linux key-code for the direct key.
[all …]
/linux-4.1.27/drivers/sfi/
Dsfi_acpi.c99 struct sfi_table_key key = SFI_ANY_KEY; in sfi_acpi_parse_xsdt() local
106 ret = sfi_check_table(xsdt_va->table_offset_entry[i], &key); in sfi_acpi_parse_xsdt()
127 static struct acpi_table_header *sfi_acpi_get_table(struct sfi_table_key *key) in sfi_acpi_get_table() argument
134 ret = sfi_check_table(xsdt_va->table_offset_entry[i], key); in sfi_acpi_get_table()
156 struct sfi_table_key key; in sfi_acpi_table_parse() local
162 key.sig = signature; in sfi_acpi_table_parse()
163 key.oem_id = oem_id; in sfi_acpi_table_parse()
164 key.oem_table_id = oem_table_id; in sfi_acpi_table_parse()
166 table = sfi_acpi_get_table(&key); in sfi_acpi_table_parse()
182 struct sfi_table_key key; in sfi_acpi_table_show() local
[all …]
Dsfi_core.c200 struct sfi_table_key *key) in sfi_table_check_key() argument
203 if (strncmp(th->sig, key->sig, SFI_SIGNATURE_SIZE) in sfi_table_check_key()
204 || (key->oem_id && strncmp(th->oem_id, in sfi_table_check_key()
205 key->oem_id, SFI_OEM_ID_SIZE)) in sfi_table_check_key()
206 || (key->oem_table_id && strncmp(th->oem_table_id, in sfi_table_check_key()
207 key->oem_table_id, SFI_OEM_TABLE_ID_SIZE))) in sfi_table_check_key()
231 __ref sfi_check_table(u64 pa, struct sfi_table_key *key) in sfi_check_table() argument
240 if (!key->sig) { in sfi_check_table()
245 if (!sfi_table_check_key(th, key)) in sfi_check_table()
259 struct sfi_table_header *sfi_get_table(struct sfi_table_key *key) in sfi_get_table() argument
[all …]
/linux-4.1.27/arch/x86/boot/
Dvideo.c102 int key; in get_entry() local
106 key = getchar(); in get_entry()
108 if (key == '\b') { in get_entry()
113 } else if ((key >= '0' && key <= '9') || in get_entry()
114 (key >= 'A' && key <= 'Z') || in get_entry()
115 (key >= 'a' && key <= 'z')) { in get_entry()
117 entry_buf[len++] = key; in get_entry()
118 putchar(key); in get_entry()
121 } while (key != '\r'); in get_entry()
130 key = entry_buf[i] | 0x20; in get_entry()
[all …]
/linux-4.1.27/drivers/staging/lustre/include/linux/libcfs/
Dlibcfs_hash.h301 unsigned (*hs_hash)(struct cfs_hash *hs, const void *key, unsigned mask);
305 void (*hs_keycpy)(struct hlist_node *hnode, void *key);
310 int (*hs_keycmp)(const void *key, struct hlist_node *hnode);
458 cfs_hash_id(struct cfs_hash *hs, const void *key, unsigned mask) in cfs_hash_id() argument
460 return hs->hs_ops->hs_hash(hs, key, mask); in cfs_hash_id()
470 cfs_hash_keycpy(struct cfs_hash *hs, struct hlist_node *hnode, void *key) in cfs_hash_keycpy() argument
473 hs->hs_ops->hs_keycpy(hnode, key); in cfs_hash_keycpy()
480 cfs_hash_keycmp(struct cfs_hash *hs, const void *key, struct hlist_node *hnode) in cfs_hash_keycmp() argument
482 return hs->hs_ops->hs_keycmp(key, hnode); in cfs_hash_keycmp()
549 void cfs_hash_bd_get(struct cfs_hash *hs, const void *key, struct cfs_hash_bd *bd);
[all …]
/linux-4.1.27/kernel/bpf/
Dhashtab.c31 char key[0] __aligned(8); member
98 static inline u32 htab_map_hash(const void *key, u32 key_len) in htab_map_hash() argument
100 return jhash(key, key_len, 0); in htab_map_hash()
109 void *key, u32 key_size) in lookup_elem_raw() argument
114 if (l->hash == hash && !memcmp(&l->key, key, key_size)) in lookup_elem_raw()
121 static void *htab_map_lookup_elem(struct bpf_map *map, void *key) in htab_map_lookup_elem() argument
133 hash = htab_map_hash(key, key_size); in htab_map_lookup_elem()
137 l = lookup_elem_raw(head, hash, key, key_size); in htab_map_lookup_elem()
140 return l->key + round_up(map->key_size, 8); in htab_map_lookup_elem()
146 static int htab_map_get_next_key(struct bpf_map *map, void *key, void *next_key) in htab_map_get_next_key() argument
[all …]
Dsyscall.c149 void __user *ukey = u64_to_ptr(attr->key); in map_lookup_elem()
154 void *key, *value, *ptr; in map_lookup_elem() local
165 key = kmalloc(map->key_size, GFP_USER); in map_lookup_elem()
166 if (!key) in map_lookup_elem()
170 if (copy_from_user(key, ukey, map->key_size) != 0) in map_lookup_elem()
179 ptr = map->ops->map_lookup_elem(map, key); in map_lookup_elem()
197 kfree(key); in map_lookup_elem()
207 void __user *ukey = u64_to_ptr(attr->key); in map_update_elem()
212 void *key, *value; in map_update_elem() local
223 key = kmalloc(map->key_size, GFP_USER); in map_update_elem()
[all …]
/linux-4.1.27/scripts/kconfig/lxdialog/
Dmenubox.c189 int key = 0, button = 0, scroll = 0, choice = 0; in dialog_menu() local
282 while (key != KEY_ESC) { in dialog_menu()
283 key = wgetch(menu); in dialog_menu()
285 if (key < 256 && isalpha(key)) in dialog_menu()
286 key = tolower(key); in dialog_menu()
288 if (strchr("ynmh", key)) in dialog_menu()
294 if (key == tolower(item_str()[j])) in dialog_menu()
301 if (key == tolower(item_str()[j])) in dialog_menu()
308 key == KEY_UP || key == KEY_DOWN || in dialog_menu()
309 key == '-' || key == '+' || in dialog_menu()
[all …]
Dchecklist.c121 int key = 0, button = 0, choice = 0, scroll = 0, max_choice; in dialog_checklist() local
208 while (key != KEY_ESC) { in dialog_checklist()
209 key = wgetch(dialog); in dialog_checklist()
213 if (toupper(key) == toupper(item_str()[0])) in dialog_checklist()
217 if (i < max_choice || key == KEY_UP || key == KEY_DOWN || in dialog_checklist()
218 key == '+' || key == '-') { in dialog_checklist()
219 if (key == KEY_UP || key == '-') { in dialog_checklist()
244 } else if (key == KEY_DOWN || key == '+') { in dialog_checklist()
286 switch (key) { in dialog_checklist()
306 button = ((key == KEY_LEFT ? --button : ++button) < 0) in dialog_checklist()
[all …]
Dyesno.c44 int i, x, y, key = 0, button = 0; in dialog_yesno() local
78 while (key != KEY_ESC) { in dialog_yesno()
79 key = wgetch(dialog); in dialog_yesno()
80 switch (key) { in dialog_yesno()
93 button = ((key == KEY_LEFT ? --button : ++button) < 0) ? 1 : (button > 1 ? 0 : button); in dialog_yesno()
103 key = on_key_esc(dialog); in dialog_yesno()
113 return key; /* ESC pressed */ in dialog_yesno()
/linux-4.1.27/net/sctp/
Dauth.c61 void sctp_auth_key_put(struct sctp_auth_bytes *key) in sctp_auth_key_put() argument
63 if (!key) in sctp_auth_key_put()
66 if (atomic_dec_and_test(&key->refcnt)) { in sctp_auth_key_put()
67 kzfree(key); in sctp_auth_key_put()
75 struct sctp_auth_bytes *key; in sctp_auth_create_key() local
82 key = kmalloc(sizeof(struct sctp_auth_bytes) + key_len, gfp); in sctp_auth_create_key()
83 if (!key) in sctp_auth_create_key()
86 key->len = key_len; in sctp_auth_create_key()
87 atomic_set(&key->refcnt, 1); in sctp_auth_create_key()
90 return key; in sctp_auth_create_key()
[all …]
/linux-4.1.27/tools/perf/util/
Dkvm-stat.h13 u64 key; member
27 struct event_key key; member
40 key_cmp_fun key; member
48 struct event_key *key);
55 struct event_key *key);
57 struct perf_sample *sample, struct event_key *key);
59 void (*decode_key)(struct perf_kvm_stat *kvm, struct event_key *key,
112 struct event_key *key);
115 struct event_key *key);
118 struct event_key *key);
[all …]
/linux-4.1.27/Documentation/filesystems/nfs/
Didmapper.txt8 ways NFS could obtain this information: placing a call to /sbin/request-key
11 NFS will attempt to call /sbin/request-key first. If this succeeds, the
12 result will be cached using the generic request-key cache. This call should
13 only fail if /etc/request-key.conf is not configured for the id_resolver key
14 type, see the "Configuring" section below if you wish to use the request-key
17 If the call to /sbin/request-key fails (if /etc/request-key.conf is not
18 configured with the id_resolver key type), then the idmapper will ask the
26 The file /etc/request-key.conf will need to be modified so /sbin/request-key can
34 The last parameter, 600, defines how many seconds into the future the key will
38 id mapper uses for key descriptions:
[all …]
/linux-4.1.27/drivers/net/wireless/ath/
Dkey.c339 static int ath_setkey_tkip(struct ath_common *common, u16 keyix, const u8 *key, in ath_setkey_tkip() argument
346 key_txmic = key + NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY; in ath_setkey_tkip()
347 key_rxmic = key + NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY; in ath_setkey_tkip()
476 struct ieee80211_key_conf *key) in ath_key_config() argument
486 switch (key->cipher) { in ath_key_config()
504 hk.kv_len = key->keylen; in ath_key_config()
505 if (key->keylen) in ath_key_config()
506 memcpy(hk.kv_val, key->key, key->keylen); in ath_key_config()
508 if (!(key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) { in ath_key_config()
514 idx = ath_reserve_key_cache_slot(common, key->cipher); in ath_key_config()
[all …]
/linux-4.1.27/drivers/crypto/vmx/
Daesp8-ppc.pl62 my ($zero,$in0,$in1,$key,$rcon,$mask,$tmp)=map("v$_",(0..6));
115 lvsr $key,0,r9 # borrow $key
121 le?vxor $key,$key,$mask # adjust for byte swap
124 vperm $in0,$in0,$in1,$key # align [and byte swap in LE]
142 vperm $key,$in0,$in0,$mask # rotate-n-splat
147 vcipherlast $key,$key,$rcon
157 vxor $in0,$in0,$key
162 vperm $key,$in0,$in0,$mask # rotate-n-splat
167 vcipherlast $key,$key,$rcon
177 vxor $in0,$in0,$key
[all …]
Daesp8-ppc.h7 u8 key[AES_MAX_KEYLENGTH]; member
12 struct aes_key *key);
14 struct aes_key *key);
15 void aes_p8_encrypt(const u8 *in, u8 *out, const struct aes_key *key);
16 void aes_p8_decrypt(const u8 *in, u8 *out,const struct aes_key *key);
18 const struct aes_key *key, u8 *iv, const int enc);
20 size_t len, const struct aes_key *key, const u8 *iv);
/linux-4.1.27/fs/reiserfs/
Dprints.c17 static char *reiserfs_cpu_offset(struct cpu_key *key) in reiserfs_cpu_offset() argument
19 if (cpu_key_k_type(key) == TYPE_DIRENTRY) in reiserfs_cpu_offset()
22 GET_HASH_VALUE(cpu_key_k_offset(key)), in reiserfs_cpu_offset()
24 GET_GENERATION_NUMBER(cpu_key_k_offset(key))); in reiserfs_cpu_offset()
27 (unsigned long long)cpu_key_k_offset(key)); in reiserfs_cpu_offset()
31 static char *le_offset(struct reiserfs_key *key) in le_offset() argument
35 version = le_key_version(key); in le_offset()
36 if (le_key_k_type(version, key) == TYPE_DIRENTRY) in le_offset()
39 GET_HASH_VALUE(le_key_k_offset(version, key)), in le_offset()
41 GET_GENERATION_NUMBER(le_key_k_offset(version, key))); in le_offset()
[all …]
Ditem_ops.c24 static void sd_decrement_key(struct cpu_key *key) in sd_decrement_key() argument
26 key->on_disk_key.k_objectid--; in sd_decrement_key()
27 set_cpu_key_k_type(key, TYPE_ANY); in sd_decrement_key()
28 set_cpu_key_k_offset(key, (loff_t)(~0ULL >> 1)); in sd_decrement_key()
31 static int sd_is_left_mergeable(struct reiserfs_key *key, unsigned long bsize) in sd_is_left_mergeable() argument
128 static void direct_decrement_key(struct cpu_key *key) in direct_decrement_key() argument
130 cpu_key_k_offset_dec(key); in direct_decrement_key()
131 if (cpu_key_k_offset(key) == 0) in direct_decrement_key()
132 set_cpu_key_k_type(key, TYPE_STAT_DATA); in direct_decrement_key()
135 static int direct_is_left_mergeable(struct reiserfs_key *key, in direct_is_left_mergeable() argument
[all …]
/linux-4.1.27/net/ipv4/
Dfib_trie.c97 t_key key; member
192 #define get_cindex(key, kv) (((key) ^ (kv)->key) >> (kv)->pos) argument
194 static inline unsigned long get_index(t_key key, struct key_vector *kv) in get_index() argument
196 unsigned long index = key ^ kv->key; in get_index()
325 static struct key_vector *leaf_new(t_key key, struct fib_alias *fa) in leaf_new() argument
334 l->key = key; in leaf_new()
346 static struct key_vector *tnode_new(t_key key, int pos, int bits) in tnode_new() argument
366 tn->key = (shift < KEYLENGTH) ? (key >> shift) << shift : 0; in tnode_new()
436 static inline void put_child_root(struct key_vector *tp, t_key key, in put_child_root() argument
442 put_child(tp, get_index(key, tp), n); in put_child_root()
[all …]
/linux-4.1.27/drivers/staging/speakup/
Dkeyhelp.c65 u_short *p_key = key_data, key; in build_key_data() local
102 key = (state_tbl[i] << 8) + ch; in build_key_data()
108 *p_key = key; in build_key_data()
113 static void say_key(int key) in say_key() argument
115 int i, state = key >> 8; in say_key()
117 key &= 0xff; in say_key()
122 if ((key > 0) && (key <= num_key_names)) in say_key()
124 spk_msg_get(MSG_KEYNAMES_START + (key - 1))); in say_key()
145 int spk_handle_help(struct vc_data *vc, u_char type, u_char ch, u_short key) in spk_handle_help() argument
187 if ((type != KT_SPKUP) && (key > 0) && (key <= num_key_names)) { in spk_handle_help()
[all …]
/linux-4.1.27/drivers/hid/
Dhid-zydacron.c117 unsigned key; in zc_raw_event() local
124 key = zc->last_key[index]; in zc_raw_event()
125 if (key) { in zc_raw_event()
126 input_event(zc->input_ep81, EV_KEY, key, 0); in zc_raw_event()
131 key = 0; in zc_raw_event()
137 key = KEY_MODE; in zc_raw_event()
141 key = KEY_SCREEN; in zc_raw_event()
145 key = KEY_INFO; in zc_raw_event()
149 key = KEY_RADIO; in zc_raw_event()
154 if (key) { in zc_raw_event()
[all …]
Dhid-prodikeys.c388 unsigned key; in pcmidi_handle_report4() local
398 key = pm->last_key[bit_index]; in pcmidi_handle_report4()
408 key = 0; in pcmidi_handle_report4()
433 key = KEY_MESSENGER; in pcmidi_handle_report4()
436 key = KEY_CALENDAR; in pcmidi_handle_report4()
439 key = KEY_ADDRESSBOOK; in pcmidi_handle_report4()
442 key = KEY_DOCUMENTS; in pcmidi_handle_report4()
445 key = KEY_WORDPROCESSOR; in pcmidi_handle_report4()
448 key = KEY_SPREADSHEET; in pcmidi_handle_report4()
451 key = KEY_COFFEE; in pcmidi_handle_report4()
[all …]
/linux-4.1.27/drivers/power/
Dtest_power.c251 char const *key; member
294 static int map_get_value(struct battery_property_map *map, const char *key, in map_get_value() argument
300 strncpy(buf, key, MAX_KEYLENGTH); in map_get_value()
307 while (map->key) { in map_get_value()
308 if (strncasecmp(map->key, buf, MAX_KEYLENGTH) == 0) in map_get_value()
320 while (map->key) { in map_get_key()
322 return map->key; in map_get_key()
335 static int param_set_ac_online(const char *key, const struct kernel_param *kp) in param_set_ac_online() argument
337 ac_online = map_get_value(map_ac_online, key, ac_online); in param_set_ac_online()
348 static int param_set_usb_online(const char *key, const struct kernel_param *kp) in param_set_usb_online() argument
[all …]
/linux-4.1.27/Documentation/ABI/testing/
Dsysfs-driver-sunxi-sid9 HDMI-HDCP key and some custom keys. Below a quick overview, for
11 0x000 128 bit root-key (sun[457]i)
12 0x010 128 bit boot-key (sun7i)
13 0x020 64 bit security-jtag-key (sun7i)
14 0x028 16 bit key configuration (sun7i)
15 0x02b 16 bit custom-vendor-key (sun7i)
16 0x02c 320 bit low general key (sun7i)
18 0x064 224 bit low general key (sun7i)
19 0x080 2304 bit HDCP-key (sun7i)
20 0x1a0 768 bit high general key (sun7i)
/linux-4.1.27/net/dns_resolver/
Ddns_key.c179 static bool dns_resolver_cmp(const struct key *key, in dns_resolver_cmp() argument
183 const char *src = key->description, *dsp = match_data->raw_data; in dns_resolver_cmp()
224 static void dns_resolver_describe(const struct key *key, struct seq_file *m) in dns_resolver_describe() argument
226 int err = key->type_data.x[0]; in dns_resolver_describe()
228 seq_puts(m, key->description); in dns_resolver_describe()
229 if (key_is_instantiated(key)) { in dns_resolver_describe()
233 seq_printf(m, ": %u", key->datalen); in dns_resolver_describe()
241 static long dns_resolver_read(const struct key *key, in dns_resolver_read() argument
244 if (key->type_data.x[0]) in dns_resolver_read()
245 return key->type_data.x[0]; in dns_resolver_read()
[all …]
/linux-4.1.27/net/rxrpc/
Dar-key.c33 static void rxrpc_destroy(struct key *);
34 static void rxrpc_destroy_s(struct key *);
35 static void rxrpc_describe(const struct key *, struct seq_file *);
36 static long rxrpc_read(const struct key *, char __user *, size_t);
862 static void rxrpc_destroy(struct key *key) in rxrpc_destroy() argument
864 rxrpc_free_token_list(key->payload.data); in rxrpc_destroy()
870 static void rxrpc_destroy_s(struct key *key) in rxrpc_destroy_s() argument
872 if (key->payload.data) { in rxrpc_destroy_s()
873 crypto_free_blkcipher(key->payload.data); in rxrpc_destroy_s()
874 key->payload.data = NULL; in rxrpc_destroy_s()
[all …]
Dar-security.c128 struct key *key = conn->key; in rxrpc_init_client_conn_security() local
131 _enter("{%d},{%x}", conn->debug_id, key_serial(key)); in rxrpc_init_client_conn_security()
133 if (!key) in rxrpc_init_client_conn_security()
136 ret = key_validate(key); in rxrpc_init_client_conn_security()
140 if (!key->payload.data) in rxrpc_init_client_conn_security()
142 token = key->payload.data; in rxrpc_init_client_conn_security()
168 struct key *key; in rxrpc_init_server_conn_security() local
213 key = key_ref_to_ptr(kref); in rxrpc_init_server_conn_security()
216 conn->server_key = key; in rxrpc_init_server_conn_security()
262 key_put(conn->key); in rxrpc_clear_conn_security()
/linux-4.1.27/drivers/infiniband/hw/mthca/
Dmthca_mr.c53 __be32 key; member
390 static inline u32 tavor_key_to_hw_index(u32 key) in tavor_key_to_hw_index() argument
392 return key; in tavor_key_to_hw_index()
400 static inline u32 arbel_key_to_hw_index(u32 key) in arbel_key_to_hw_index() argument
402 return (key << 24) | (key >> 8); in arbel_key_to_hw_index()
413 static inline u32 key_to_hw_index(struct mthca_dev *dev, u32 key) in key_to_hw_index() argument
416 return arbel_key_to_hw_index(key); in key_to_hw_index()
418 return tavor_key_to_hw_index(key); in key_to_hw_index()
421 static inline u32 adjust_key(struct mthca_dev *dev, u32 key) in adjust_key() argument
424 return ((key << 20) & 0x800000) | (key & 0x7fffff); in adjust_key()
[all …]
/linux-4.1.27/Documentation/
Ddigsig.txt20 Public key and signature consist of header and MPIs.
23 uint8_t version; /* key format version */
24 time_t timestamp; /* key made, always 0 for now */
40 keyid equals to SHA1[12-19] over the total key content.
42 Such approach insures that key or signature header could not be changed.
50 digsig_verify() - digital signature verification with public key
54 * digsig_verify() - digital signature verification with public key
55 * @keyring: keyring to search key in
67 int digsig_verify(struct key *keyring, const char *sig, int siglen,
72 The signing and key management utilities evm-utils provide functionality
[all …]
Dmodule-signing.txt15 - Administering/protecting the private key.
25 or modules signed with an invalid key. Module signing increases security by
32 type. The facility currently only supports the RSA public key encryption
52 signature for which the key is not known or a module that is unsigned.
54 If this is off (ie. "permissive"), then modules for which the key is not
60 signature that can be verified by a public key in the kernel's possession
97 private key is used to generate a signature and the corresponding public key is
98 used to check it. The private key is only needed during the build, after which
99 it can be deleted or stored securely. The public key gets built into the
109 during the building of vmlinux (the public part of the key needs to be built
[all …]
/linux-4.1.27/net/ipv4/netfilter/
Dnf_nat_proto_gre.c48 static u_int16_t key; in gre_unique_tuple() local
58 keyptr = &tuple->src.u.gre.key; in gre_unique_tuple()
60 keyptr = &tuple->dst.u.gre.key; in gre_unique_tuple()
67 min = ntohs(range->min_proto.gre.key); in gre_unique_tuple()
68 range_size = ntohs(range->max_proto.gre.key) - min + 1; in gre_unique_tuple()
73 for (i = 0; ; ++key) { in gre_unique_tuple()
74 *keyptr = htons(min + key % range_size); in gre_unique_tuple()
112 pr_debug("call_id -> 0x%04x\n", ntohs(tuple->dst.u.gre.key)); in gre_manip_pkt()
113 pgreh->call_id = tuple->dst.u.gre.key; in gre_manip_pkt()
/linux-4.1.27/fs/cifs/
Dsmbencrypt.c52 str_to_key(unsigned char *str, unsigned char *key) in str_to_key() argument
56 key[0] = str[0] >> 1; in str_to_key()
57 key[1] = ((str[0] & 0x01) << 6) | (str[1] >> 2); in str_to_key()
58 key[2] = ((str[1] & 0x03) << 5) | (str[2] >> 3); in str_to_key()
59 key[3] = ((str[2] & 0x07) << 4) | (str[3] >> 4); in str_to_key()
60 key[4] = ((str[3] & 0x0F) << 3) | (str[4] >> 5); in str_to_key()
61 key[5] = ((str[4] & 0x1F) << 2) | (str[5] >> 6); in str_to_key()
62 key[6] = ((str[5] & 0x3F) << 1) | (str[6] >> 7); in str_to_key()
63 key[7] = str[6] & 0x7F; in str_to_key()
65 key[i] = (key[i] << 1); in str_to_key()
[all …]
Dcifs_spnego.c37 cifs_spnego_key_instantiate(struct key *key, struct key_preparsed_payload *prep) in cifs_spnego_key_instantiate() argument
48 key->payload.data = payload; in cifs_spnego_key_instantiate()
56 cifs_spnego_key_destroy(struct key *key) in cifs_spnego_key_destroy() argument
58 kfree(key->payload.data); in cifs_spnego_key_destroy()
98 struct key *
106 struct key *spnego_key; in cifs_get_spnego_key()
191 struct key *keyring; in init_cifs_spnego()
/linux-4.1.27/drivers/net/wireless/ipw2x00/
Dlibipw_wx.c319 int i, key, key_provided, len; in libipw_wx_set_encode() local
325 key = erq->flags & IW_ENCODE_INDEX; in libipw_wx_set_encode()
326 if (key) { in libipw_wx_set_encode()
327 if (key > WEP_KEYS) in libipw_wx_set_encode()
329 key--; in libipw_wx_set_encode()
333 key = ieee->crypt_info.tx_keyidx; in libipw_wx_set_encode()
336 LIBIPW_DEBUG_WX("Key: %d [%s]\n", key, key_provided ? in libipw_wx_set_encode()
339 crypt = &ieee->crypt_info.crypt[key]; in libipw_wx_set_encode()
344 key); in libipw_wx_set_encode()
396 new_crypt->priv = new_crypt->ops->init(key); in libipw_wx_set_encode()
[all …]
/linux-4.1.27/drivers/crypto/
Dpadlock-aes.c108 const __le32 *key = (const __le32 *)in_key; in aes_set_key() local
125 ctx->E[0] = le32_to_cpu(key[0]); in aes_set_key()
126 ctx->E[1] = le32_to_cpu(key[1]); in aes_set_key()
127 ctx->E[2] = le32_to_cpu(key[2]); in aes_set_key()
128 ctx->E[3] = le32_to_cpu(key[3]); in aes_set_key()
190 static inline void rep_xcrypt_ecb(const u8 *input, u8 *output, void *key, in rep_xcrypt_ecb() argument
195 : "d"(control_word), "b"(key), "c"(count)); in rep_xcrypt_ecb()
198 static inline u8 *rep_xcrypt_cbc(const u8 *input, u8 *output, void *key, in rep_xcrypt_cbc() argument
203 : "d" (control_word), "b" (key), "c" (count)); in rep_xcrypt_cbc()
207 static void ecb_crypt_copy(const u8 *in, u8 *out, u32 *key, in ecb_crypt_copy() argument
[all …]
/linux-4.1.27/scripts/kconfig/
Dnconf.c287 typedef void (*function_key_handler_t)(int *key, struct menu *menu);
288 static void handle_f1(int *key, struct menu *current_item);
289 static void handle_f2(int *key, struct menu *current_item);
290 static void handle_f3(int *key, struct menu *current_item);
291 static void handle_f4(int *key, struct menu *current_item);
292 static void handle_f5(int *key, struct menu *current_item);
293 static void handle_f6(int *key, struct menu *current_item);
294 static void handle_f7(int *key, struct menu *current_item);
295 static void handle_f8(int *key, struct menu *current_item);
296 static void handle_f9(int *key, struct menu *current_item);
[all …]
/linux-4.1.27/Documentation/RCU/
Drculist_nulls.txt17 obj = lockless_lookup(key);
24 * must check key after getting the reference on object
26 if (obj->key != key) { // not the object we expected
33 Beware that lockless_lookup(key) cannot use traditional hlist_for_each_entry_rcu()
36 lockless_lookup(key)
43 if (obj->key == key)
54 if (obj->key == key)
68 checking the key."
74 and previous value of 'obj->key'. Or else, an item could be deleted
85 obj->key = key;
[all …]
/linux-4.1.27/drivers/staging/lustre/lustre/obdclass/
Dlu_object.c444 struct lu_cdebug_data *key; in lu_cdebug_printer() local
451 key = lu_context_key_get(&env->le_ctx, &lu_global_key); in lu_cdebug_printer()
452 LASSERT(key != NULL); in lu_cdebug_printer()
454 used = strlen(key->lck_area); in lu_cdebug_printer()
459 vsnprintf(key->lck_area + used, in lu_cdebug_printer()
460 ARRAY_SIZE(key->lck_area) - used, format, args); in lu_cdebug_printer()
463 libcfs_debug_msg(msgdata, "%s", key->lck_area); in lu_cdebug_printer()
464 key->lck_area[0] = 0; in lu_cdebug_printer()
885 const void *key, unsigned mask) in lu_obj_hop_hash() argument
887 struct lu_fid *fid = (struct lu_fid *)key; in lu_obj_hop_hash()
[all …]
/linux-4.1.27/tools/perf/
Dbuiltin-kvm.c39 struct event_key *key) in exit_event_get_key() argument
41 key->info = 0; in exit_event_get_key()
42 key->key = perf_evsel__intval(evsel, sample, KVM_EXIT_REASON); in exit_event_get_key()
51 struct perf_sample *sample, struct event_key *key) in exit_event_begin() argument
54 exit_event_get_key(evsel, sample, key); in exit_event_begin()
68 struct event_key *key __maybe_unused) in exit_event_end()
89 struct event_key *key, in exit_event_decode_key() argument
92 const char *exit_reason = get_exit_reason(kvm, key->exit_reasons, in exit_event_decode_key()
93 key->key); in exit_event_decode_key()
151 static int kvm_events_hash_fn(u64 key) in kvm_events_hash_fn() argument
[all …]
/linux-4.1.27/sound/core/
Djack.c84 for (i = 0; i < ARRAY_SIZE(jack->key); i++) { in snd_jack_dev_register()
90 if (!jack->key[i]) in snd_jack_dev_register()
91 jack->key[i] = BTN_0 + i; in snd_jack_dev_register()
93 input_set_capability(jack->input_dev, EV_KEY, jack->key[i]); in snd_jack_dev_register()
211 int key = fls(SND_JACK_BTN_0) - fls(type); in snd_jack_set_key() local
215 if (!keytype || key >= ARRAY_SIZE(jack->key)) in snd_jack_set_key()
219 jack->key[key] = keytype; in snd_jack_set_key()
238 for (i = 0; i < ARRAY_SIZE(jack->key); i++) { in snd_jack_report()
242 input_report_key(jack->input_dev, jack->key[i], in snd_jack_report()
/linux-4.1.27/kernel/debug/kdb/
Dkdb_io.c59 int key; in kdb_read_get_key() local
73 key = *ped++; in kdb_read_get_key()
78 key = (*f)(); in kdb_read_get_key()
79 if (key == -1) { in kdb_read_get_key()
87 if (key == '\r') in kdb_read_get_key()
88 key = '\n'; in kdb_read_get_key()
89 *buffer++ = key; in kdb_read_get_key()
93 if (escape_delay == 0 && key == '\e') { in kdb_read_get_key()
99 *ped++ = key; in kdb_read_get_key()
109 if (key != '[') in kdb_read_get_key()
[all …]
/linux-4.1.27/arch/powerpc/boot/
Dplanetcore.c41 const char *planetcore_get_key(const char *table, const char *key) in planetcore_get_key() argument
43 int keylen = strlen(key); in planetcore_get_key()
46 if (!strncmp(table, key, keylen) && table[keylen] == '=') in planetcore_get_key()
55 int planetcore_get_decimal(const char *table, const char *key, u64 *val) in planetcore_get_decimal() argument
57 const char *str = planetcore_get_key(table, key); in planetcore_get_decimal()
65 int planetcore_get_hex(const char *table, const char *key, u64 *val) in planetcore_get_hex() argument
67 const char *str = planetcore_get_key(table, key); in planetcore_get_hex()
/linux-4.1.27/scripts/
Dbootgraph.pl187 foreach my $key (@initcalls) {
188 my $duration = $end{$key} - $start{$key};
192 my $pid = $pids{$key};
198 $s = ($start{$key} - $firsttime) * $mult;
201 $e = ($end{$key} - $firsttime) * $mult;
213 if ($type{$key} == 1) {
219 print "<text transform=\"translate($s2,$y2) rotate(90)\">$key</text>\n";
221 print "<text transform=\"translate($s3,$y2) rotate(90)\" font-size=\"3pt\">$key</text>\n";
/linux-4.1.27/arch/s390/crypto/
Ddes_s390.c32 u8 key[DES3_KEY_SIZE]; member
35 static int des_setkey(struct crypto_tfm *tfm, const u8 *key, in des_setkey() argument
43 if (!des_ekey(tmp, key) && (*flags & CRYPTO_TFM_REQ_WEAK_KEY)) { in des_setkey()
48 memcpy(ctx->key, key, key_len); in des_setkey()
56 crypt_s390_km(KM_DEA_ENCRYPT, ctx->key, out, in, DES_BLOCK_SIZE); in des_encrypt()
63 crypt_s390_km(KM_DEA_DECRYPT, ctx->key, out, in, DES_BLOCK_SIZE); in des_decrypt()
86 u8 *key, struct blkcipher_walk *walk) in ecb_desall_crypt() argument
97 ret = crypt_s390_km(func, key, out, in, n); in ecb_desall_crypt()
116 u8 key[DES3_KEY_SIZE]; in cbc_desall_crypt() member
123 memcpy(param.key, ctx->key, DES3_KEY_SIZE); in cbc_desall_crypt()
[all …]
/linux-4.1.27/drivers/hwmon/
Dapplesmc.c122 char key[5]; /* four-letter key code */ member
221 static int send_argument(const char *key) in send_argument() argument
226 if (send_byte(key[i], APPLESMC_DATA_PORT)) in send_argument()
231 static int read_smc(u8 cmd, const char *key, u8 *buffer, u8 len) in read_smc() argument
236 if (send_command(cmd) || send_argument(key)) { in read_smc()
237 pr_warn("%.4s: read arg fail\n", key); in read_smc()
243 pr_warn("%.4s: read len fail\n", key); in read_smc()
249 pr_warn("%.4s: read data[%d] fail\n", key, i); in read_smc()
269 static int write_smc(u8 cmd, const char *key, const u8 *buffer, u8 len) in write_smc() argument
273 if (send_command(cmd) || send_argument(key)) { in write_smc()
[all …]
/linux-4.1.27/fs/xfs/
Dxfs_mru_cache.h25 unsigned long key; member
37 int xfs_mru_cache_insert(struct xfs_mru_cache *mru, unsigned long key,
40 xfs_mru_cache_remove(struct xfs_mru_cache *mru, unsigned long key);
41 void xfs_mru_cache_delete(struct xfs_mru_cache *mru, unsigned long key);
43 xfs_mru_cache_lookup(struct xfs_mru_cache *mru, unsigned long key);
/linux-4.1.27/include/net/
Darp.h14 u32 key = *(const u32 *)pkey; in arp_hashfn() local
15 u32 val = key ^ hash32_ptr(dev); in arp_hashfn()
20 static inline struct neighbour *__ipv4_neigh_lookup_noref(struct net_device *dev, u32 key) in __ipv4_neigh_lookup_noref() argument
22 return ___neigh_lookup_noref(&arp_tbl, neigh_key_eq32, arp_hashfn, &key, dev); in __ipv4_neigh_lookup_noref()
25 static inline struct neighbour *__ipv4_neigh_lookup(struct net_device *dev, u32 key) in __ipv4_neigh_lookup() argument
30 n = __ipv4_neigh_lookup_noref(dev, key); in __ipv4_neigh_lookup()
/linux-4.1.27/drivers/net/ethernet/mellanox/mlx5/core/
Dmr.c59 u8 key; in mlx5_core_create_mkey() local
63 key = dev->priv.mkey_key++; in mlx5_core_create_mkey()
65 in->seg.qpn_mkey7_0 |= cpu_to_be32(key); in mlx5_core_create_mkey()
87 mr->key = mlx5_idx_to_mkey(be32_to_cpu(lout.mkey) & 0xffffff) | key; in mlx5_core_create_mkey()
91 be32_to_cpu(lout.mkey), key, mr->key); in mlx5_core_create_mkey()
95 err = radix_tree_insert(&table->tree, mlx5_base_mkey(mr->key), mr); in mlx5_core_create_mkey()
99 mlx5_base_mkey(mr->key), err); in mlx5_core_create_mkey()
120 deleted_mr = radix_tree_delete(&table->tree, mlx5_base_mkey(mr->key)); in mlx5_core_destroy_mkey()
124 mlx5_base_mkey(mr->key)); in mlx5_core_destroy_mkey()
129 in.mkey = cpu_to_be32(mlx5_mkey_to_idx(mr->key)); in mlx5_core_destroy_mkey()
[all …]
/linux-4.1.27/include/linux/usb/
Dwusb.h313 const u8 key[16], const struct aes_ccm_nonce *_n,
317 static inline int wusb_prf_64(void *out, size_t out_size, const u8 key[16], in wusb_prf_64()
322 return wusb_prf(out, out_size, key, n, a, b, blen, 64); in wusb_prf_64()
325 static inline int wusb_prf_128(void *out, size_t out_size, const u8 key[16], in wusb_prf_128()
330 return wusb_prf(out, out_size, key, n, a, b, blen, 128); in wusb_prf_128()
333 static inline int wusb_prf_256(void *out, size_t out_size, const u8 key[16], in wusb_prf_256()
338 return wusb_prf(out, out_size, key, n, a, b, blen, 256); in wusb_prf_256()
343 const u8 key[16], in wusb_key_derive()
348 return wusb_prf_256(keydvt_out, sizeof(*keydvt_out), key, n, &a, in wusb_key_derive()
368 static inline int wusb_oob_mic(u8 mic_out[8], const u8 key[16], in wusb_oob_mic()
[all …]
/linux-4.1.27/drivers/media/usb/dvb-usb/
DcinergyT2-core.c144 u8 key[5] = {0, 0, 0, 0, 0}, cmd = CINERGYT2_EP1_GET_RC_EVENTS; in cinergyt2_rc_query() local
149 dvb_usb_generic_rw(d, &cmd, 1, key, sizeof(key), 0); in cinergyt2_rc_query()
150 if (key[4] == 0xff) { in cinergyt2_rc_query()
169 key[2] = ~key[1]; in cinergyt2_rc_query()
170 dvb_usb_nec_rc_key_to_event(d, key, event, state); in cinergyt2_rc_query()
171 if (key[0] != 0) { in cinergyt2_rc_query()
175 deb_rc("key: %*ph\n", 5, key); in cinergyt2_rc_query()
/linux-4.1.27/drivers/md/bcache/
Dmovinggc.c54 trace_bcache_gc_copy_collision(&io->w->key); in write_moving_finish()
71 else if (!KEY_DIRTY(&b->key) && in read_moving_endio()
72 ptr_stale(io->op.c, &b->key, 0)) { in read_moving_endio()
87 bio->bi_iter.bi_size = KEY_SIZE(&io->w->key) << 9; in moving_init()
88 bio->bi_max_vecs = DIV_ROUND_UP(KEY_SIZE(&io->w->key), in moving_init()
103 io->bio.bio.bi_iter.bi_sector = KEY_START(&io->w->key); in write_moving()
107 op->writeback = KEY_DIRTY(&io->w->key); in write_moving()
108 op->csum = KEY_CSUM(&io->w->key); in write_moving()
110 bkey_copy(&op->replace_key, &io->w->key); in write_moving()
124 bch_submit_bbio(bio, io->op.c, &io->w->key, 0); in read_moving_submit()
[all …]
Dbtree.c116 #define btree(fn, key, b, op, ...) \ argument
120 struct btree *_child = bch_btree_node_get((b)->c, op, key, l, \
191 uint64_t crc = b->key.ptr[0]; in btree_csum_set()
254 bset_sector_offset(&b->keys, i) < KEY_SIZE(&b->key); in bch_btree_node_read_done()
264 bkey_cmp(&b->key, &b->keys.set[0].end) < 0) in bch_btree_node_read_done()
276 err, PTR_BUCKET_NR(b->c, &b->key, 0), in bch_btree_node_read_done()
299 bio->bi_iter.bi_size = KEY_SIZE(&b->key) << 9; in bch_btree_node_read()
305 bch_submit_bbio(bio, b->c, &b->key, 0); in bch_btree_node_read()
322 PTR_BUCKET_NR(b->c, &b->key, 0)); in bch_btree_node_read()
390 BKEY_PADDED(key) k; in do_btree_node_write()
[all …]
/linux-4.1.27/arch/arm/crypto/
Dbsaes-armv7.pl53 my ($inp,$out,$len,$key)=("r0","r1","r2","r3");
57 my ($key,$rounds,$const)=("r4","r5","r6");
344 vldmia $key!, {@t[0]-@t[3]}
349 vldmia $key!, {@t[0]}
353 vldmia $key!, {@t[1]}
357 vldmia $key!, {@t[2]}
360 vldmia $key!, {@t[3]}
728 vldmia $key!, {@XMM[9]} @ round 0 key
784 vldmia $key, {@XMM[8]} @ last round key
823 vldmia $key!, {@XMM[9]} @ round 0 key
[all …]
/linux-4.1.27/fs/ntfs/
Ddir.c157 (ntfschar*)&ie->key.file_name.file_name, in ntfs_lookup_inode_by_name()
158 ie->key.file_name.file_name_length, in ntfs_lookup_inode_by_name()
171 if (ie->key.file_name.file_name_type == FILE_NAME_DOS) { in ntfs_lookup_inode_by_name()
205 ie->key.file_name.file_name_type && in ntfs_lookup_inode_by_name()
207 (ntfschar*)&ie->key.file_name.file_name, in ntfs_lookup_inode_by_name()
208 ie->key.file_name.file_name_length, in ntfs_lookup_inode_by_name()
211 u8 type = ie->key.file_name.file_name_type; in ntfs_lookup_inode_by_name()
212 u8 len = ie->key.file_name.file_name_length; in ntfs_lookup_inode_by_name()
237 memcpy(name->name, ie->key.file_name.file_name, in ntfs_lookup_inode_by_name()
248 (ntfschar*)&ie->key.file_name.file_name, in ntfs_lookup_inode_by_name()
[all …]
/linux-4.1.27/arch/arm64/crypto/
Dghash-ce-glue.c56 struct ghash_key *key = crypto_shash_ctx(desc->tfm); in ghash_update() local
71 pmull_ghash_update(blocks, ctx->digest, src, key, in ghash_update()
88 struct ghash_key *key = crypto_shash_ctx(desc->tfm); in ghash_final() local
93 pmull_ghash_update(1, ctx->digest, ctx->buf, key, NULL); in ghash_final()
106 struct ghash_key *key = crypto_shash_ctx(tfm); in ghash_setkey() local
118 key->a = (a << 1) | (b >> 63); in ghash_setkey()
119 key->b = (b << 1) | (a >> 63); in ghash_setkey()
122 key->b ^= 0xc200000000000000UL; in ghash_setkey()
/linux-4.1.27/security/keys/encrypted-keys/
Dencrypted.c306 static struct key *request_user_key(const char *master_desc, u8 **master_key, in request_user_key()
310 struct key *ukey; in request_user_key()
338 static int calc_hmac(u8 *digest, const u8 *key, unsigned int keylen, in calc_hmac() argument
350 ret = crypto_shash_setkey(hmacalg, key, keylen); in calc_hmac()
404 static int init_blkcipher_desc(struct blkcipher_desc *desc, const u8 *key, in init_blkcipher_desc() argument
418 ret = crypto_blkcipher_setkey(desc->tfm, key, key_len); in init_blkcipher_desc()
428 static struct key *request_master_key(struct encrypted_key_payload *epayload, in request_master_key()
431 struct key *mkey = NULL; in request_master_key()
598 static struct encrypted_key_payload *encrypted_key_alloc(struct key *key, in encrypted_key_alloc() argument
635 ret = key_payload_reserve(key, payload_datalen + datablob_len in encrypted_key_alloc()
[all …]
/linux-4.1.27/net/sched/
Dem_u32.c24 struct tc_u32_key *key = (struct tc_u32_key *) em->data; in em_u32_match() local
30 ptr += (info->nexthdr & key->offmask); in em_u32_match()
33 ptr += key->off; in em_u32_match()
38 return !(((*(__be32 *) ptr) ^ key->val) & key->mask); in em_u32_match()
/linux-4.1.27/drivers/staging/lustre/lustre/libcfs/
Dhash.c471 unsigned int bits, const void *key, struct cfs_hash_bd *bd) in cfs_hash_bd_from_key() argument
473 unsigned int index = cfs_hash_id(hs, key, (1U << bits) - 1); in cfs_hash_bd_from_key()
482 cfs_hash_bd_get(struct cfs_hash *hs, const void *key, struct cfs_hash_bd *bd) in cfs_hash_bd_get() argument
487 hs->hs_cur_bits, key, bd); in cfs_hash_bd_get()
491 hs->hs_rehash_bits, key, bd); in cfs_hash_bd_get()
619 const void *key, struct hlist_node *hnode, in cfs_hash_bd_lookup_intent() argument
632 if (!cfs_hash_keycmp(hs, key, ehnode)) in cfs_hash_bd_lookup_intent()
659 cfs_hash_bd_lookup_locked(struct cfs_hash *hs, struct cfs_hash_bd *bd, const void *key) in cfs_hash_bd_lookup_locked() argument
661 return cfs_hash_bd_lookup_intent(hs, bd, key, NULL, in cfs_hash_bd_lookup_locked()
667 cfs_hash_bd_peek_locked(struct cfs_hash *hs, struct cfs_hash_bd *bd, const void *key) in cfs_hash_bd_peek_locked() argument
[all …]
/linux-4.1.27/drivers/net/ethernet/mellanox/mlx4/
Dmr.c274 static u32 key_to_hw_index(u32 key) in key_to_hw_index() argument
276 return (key << 24) | (key >> 8); in key_to_hw_index()
300 int key = key_to_hw_index(mmr->key) & (dev->caps.num_mpts - 1); in mlx4_mr_hw_get_mpt() local
306 err = mlx4_HW2SW_MPT(dev, NULL, key); in mlx4_mr_hw_get_mpt()
318 key, NULL); in mlx4_mr_hw_get_mpt()
324 err = mlx4_cmd_box(dev, 0, mailbox->dma, key, in mlx4_mr_hw_get_mpt()
363 int key = key_to_hw_index(mmr->key) & (dev->caps.num_mpts - 1); in mlx4_mr_hw_write_mpt() local
369 err = mlx4_SW2HW_MPT(dev, mailbox, key); in mlx4_mr_hw_write_mpt()
428 mr->key = hw_index_to_key(mridx); in mlx4_mr_alloc_reserved()
554 key_to_hw_index(mr->key) & in mlx4_mr_free_reserved()
[all …]
/linux-4.1.27/tools/perf/ui/
Dbrowser.c186 int key = 0, err; in ui_browser__warning() local
197 while ((key = ui__question_window("Warning!", text, in ui_browser__warning()
204 return key; in ui_browser__warning()
209 int key; in ui_browser__help_window() local
211 while ((key = ui__help_window(text)) == K_RESIZE) in ui_browser__help_window()
214 return key; in ui_browser__help_window()
219 int key; in ui_browser__dialog_yesno() local
221 while ((key = ui__dialog_yesno(text)) == K_RESIZE) in ui_browser__dialog_yesno()
224 return key == K_ENTER || toupper(key) == 'Y'; in ui_browser__dialog_yesno()
357 int err, key; in ui_browser__run() local
[all …]
/linux-4.1.27/Documentation/networking/
Ddns_resolver.txt20 by way of requesting a key of key type dns_resolver. These queries are
21 upcalled to userspace through /sbin/request-key.
24 request-key. It is under development and does not yet provide the full feature
49 To set up this facility, the /etc/request-key.conf file must be altered so that
50 /sbin/request-key can appropriately direct the upcalls. For example, to handle
78 may then be cached. The key description is constructed as a string of the
122 The dnsresolver module registers a key type called "dns_resolver". Keys of
130 directed by means of configuration lines in /etc/request-key.conf that tell
131 /sbin/request-key what program to run to instantiate the key.
137 remainder of the string to the key as its payload.
[all …]
/linux-4.1.27/sound/pci/hda/
Dhda_sysfs.c24 const char *key; member
275 "%s = %s\n", hint->key, hint->val); in hints_show()
281 static struct hda_hint *get_hint(struct hda_codec *codec, const char *key) in get_hint() argument
287 if (!strcmp(hint->key, key)) in get_hint()
310 char *key, *val; in parse_hints() local
319 key = kstrndup_noeol(buf, 1024); in parse_hints()
320 if (!key) in parse_hints()
323 val = strchr(key, '='); in parse_hints()
325 kfree(key); in parse_hints()
330 remove_trail_spaces(key); in parse_hints()
[all …]

123456789