Home
last modified time | relevance | path

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

12345678910>>...96

/linux/tools/testing/selftests/bpf/progs/
H A Dtest_tunnel_kern.c53 __type(key, __u32);
61 struct bpf_tunnel_key key; in gre_set_tunnel() local
63 __builtin_memset(&key, 0x0, sizeof(key)); in gre_set_tunnel()
64 key.remote_ipv4 = 0xac100164; /* 172.16.1.100 */ in gre_set_tunnel()
65 key.tunnel_id = 2; in gre_set_tunnel()
66 key.tunnel_tos = 0; in gre_set_tunnel()
67 key.tunnel_ttl = 64; in gre_set_tunnel()
69 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in gre_set_tunnel()
83 struct bpf_tunnel_key key; in gre_set_tunnel_no_key() local
85 __builtin_memset(&key, 0x0, sizeof(key)); in gre_set_tunnel_no_key()
[all …]
H A Dwq.c22 __type(key, int);
30 __type(key, int);
42 __type(key, int);
49 __type(key, int);
56 static int test_elem_callback(void *map, int *key, in test_elem_callback() argument
57 int (callback_fn)(void *map, int *key, void *value)) in test_elem_callback()
62 if ((ok & (1 << *key) || in test_elem_callback()
63 (ok_sleepable & (1 << *key)))) in test_elem_callback()
67 bpf_map_update_elem(map, key, &init, 0)) in test_elem_callback()
70 val = bpf_map_lookup_elem(map, key); in test_elem_callback()
89 test_hmap_elem_callback(void * map,int * key,int (callback_fn)(void * map,int * key,void * value)) test_hmap_elem_callback() argument
120 wq_callback(void * map,int * key,void * value) wq_callback() argument
128 wq_cb_sleepable(void * map,int * key,void * value) wq_cb_sleepable() argument
146 int key = 0; test_call_array_sleepable() local
156 int key = 1; test_syscall_array_sleepable() local
166 int key = 2; test_call_hash_sleepable() local
176 int key = 3; test_call_hash_malloc_sleepable() local
186 int key = 4; test_call_lru_sleepable() local
[all...]
/linux/security/keys/
H A Dkey.c38 void __key_check(const struct key *key) in __key_check() argument
41 key, key->magic, KEY_DEBUG_MAGIC); in __key_check()
133 static inline void key_alloc_serial(struct key *key) in key_alloc_serial() argument
136 struct key *xkey; in key_alloc_serial()
141 get_random_bytes(&key->serial, sizeof(key->serial)); in key_alloc_serial()
143 key->serial >>= 1; /* negative numbers are not permitted */ in key_alloc_serial()
144 } while (key->serial < 3); in key_alloc_serial()
154 xkey = rb_entry(parent, struct key, serial_node); in key_alloc_serial()
156 if (key->serial < xkey->serial) in key_alloc_serial()
158 else if (key->serial > xkey->serial) in key_alloc_serial()
[all …]
H A Drequest_key.c22 static struct key *check_cached_key(struct keyring_search_context *ctx) in check_cached_key()
25 struct key *key = current->cached_requested_key; in check_cached_key() local
27 if (key && in check_cached_key()
28 ctx->match_data.cmp(key, &ctx->match_data) && in check_cached_key()
29 !(key->flags & ((1 << KEY_FLAG_INVALIDATED) | in check_cached_key()
31 return key_get(key); in check_cached_key()
36 static void cache_requested_key(struct key *key) in cache_requested_key() argument
44 t->cached_requested_key = key_get(key); in cache_requested_key()
59 void complete_request_key(struct key *authkey, int error) in complete_request_key()
62 struct key *key = rka->target_key; in complete_request_key() local
[all …]
H A Dgc.c72 void key_set_expiry(struct key *key, time64_t expiry) in key_set_expiry() argument
74 key->expiry = expiry; in key_set_expiry()
76 if (!(key->type->flags & KEY_TYPE_INSTANT_REAP)) in key_set_expiry()
138 struct key *key = in key_gc_unused_keys() local
139 list_entry(keys->next, struct key, graveyard_link); in key_gc_unused_keys()
140 short state = key->state; in key_gc_unused_keys()
142 list_del(&key->graveyard_link); in key_gc_unused_keys()
144 kdebug("- %u", key->serial); in key_gc_unused_keys()
145 key_check(key); in key_gc_unused_keys()
148 remove_watch_list(key->watchers, key->serial); in key_gc_unused_keys()
[all …]
H A Dkeyring.c40 static inline struct key *keyring_ptr_to_key(const struct assoc_array_ptr *x) in keyring_ptr_to_key()
43 return (struct key *)((unsigned long)object & ~KEYRING_PTR_SUBTYPE); in keyring_ptr_to_key()
45 static inline void *keyring_key_to_ptr(struct key *key) in keyring_key_to_ptr() argument
47 if (key->type == &key_type_keyring) in keyring_key_to_ptr()
48 return (void *)((unsigned long)key | KEYRING_PTR_SUBTYPE); in keyring_key_to_ptr()
49 return key; in keyring_key_to_ptr()
76 static int keyring_instantiate(struct key *keyring,
78 static void keyring_revoke(struct key *keyring);
79 static void keyring_destroy(struct key *keyring);
80 static void keyring_describe(const struct key *keyring, struct seq_file *m);
[all …]
/linux/kernel/
H A Djump_label.c41 * Entrires are sorted by key. in jump_label_cmp()
72 jea->key = jeb->key - delta; in jump_label_swap()
76 jeb->key = tmp.key + delta; in jump_label_swap()
93 static void jump_label_update(struct static_key *key);
104 int static_key_count(struct static_key *key) in static_key_count() argument
110 int n = atomic_read(&key->enabled); in static_key_count()
117 * static_key_fast_inc_not_disabled - adds a user for a static key
118 * @key
127 static_key_fast_inc_not_disabled(struct static_key * key) static_key_fast_inc_not_disabled() argument
151 static_key_slow_inc_cpuslocked(struct static_key * key) static_key_slow_inc_cpuslocked() argument
186 static_key_slow_inc(struct static_key * key) static_key_slow_inc() argument
197 static_key_enable_cpuslocked(struct static_key * key) static_key_enable_cpuslocked() argument
220 static_key_enable(struct static_key * key) static_key_enable() argument
228 static_key_disable_cpuslocked(struct static_key * key) static_key_disable_cpuslocked() argument
245 static_key_disable(struct static_key * key) static_key_disable() argument
253 static_key_dec_not_one(struct static_key * key) static_key_dec_not_one() argument
292 __static_key_slow_dec_cpuslocked(struct static_key * key) __static_key_slow_dec_cpuslocked() argument
318 __static_key_slow_dec(struct static_key * key) __static_key_slow_dec() argument
327 struct static_key_deferred *key = jump_label_update_timeout() local
333 static_key_slow_dec(struct static_key * key) static_key_slow_dec() argument
340 static_key_slow_dec_cpuslocked(struct static_key * key) static_key_slow_dec_cpuslocked() argument
346 __static_key_slow_dec_deferred(struct static_key * key,struct delayed_work * work,unsigned long timeout) __static_key_slow_dec_deferred() argument
359 __static_key_deferred_flush(void * key,struct delayed_work * work) __static_key_deferred_flush() argument
366 jump_label_rate_limit(struct static_key_deferred * key,unsigned long rl) jump_label_rate_limit() argument
409 static_key_entries(struct static_key * key) static_key_entries() argument
415 static_key_type(struct static_key * key) static_key_type() argument
420 static_key_linked(struct static_key * key) static_key_linked() argument
425 static_key_clear_linked(struct static_key * key) static_key_clear_linked() argument
430 static_key_set_linked(struct static_key * key) static_key_set_linked() argument
444 static_key_set_entries(struct static_key * key,struct jump_entry * entries) static_key_set_entries() argument
457 struct static_key *key = jump_entry_key(entry); jump_label_type() local
492 __jump_label_update(struct static_key * key,struct jump_entry * entry,struct jump_entry * stop,bool init) __jump_label_update() argument
503 __jump_label_update(struct static_key * key,struct jump_entry * entry,struct jump_entry * stop,bool init) __jump_label_update() argument
529 struct static_key *key = NULL; jump_label_init() local
571 static_key_sealed(struct static_key * key) static_key_sealed() argument
576 static_key_seal(struct static_key * key) static_key_seal() argument
614 struct static_key *key = jump_entry_key(entry); jump_label_init_type() local
628 static_key_mod(struct static_key * key) static_key_mod() argument
640 static_key_set_mod(struct static_key * key,struct static_key_mod * mod) static_key_set_mod() argument
675 __jump_label_mod_update(struct static_key * key) __jump_label_mod_update() argument
705 struct static_key *key = NULL; jump_label_add_module() local
777 struct static_key *key = NULL; jump_label_del_module() local
896 jump_label_update(struct static_key * key) jump_label_update() argument
[all...]
/linux/tools/testing/selftests/bpf/
H A Dtest_lru_map.c42 static int bpf_map_lookup_elem_with_ref_bit(int fd, unsigned long long key, in bpf_map_lookup_elem_with_ref_bit() argument
48 BPF_LD_IMM64(BPF_REG_3, key), in bpf_map_lookup_elem_with_ref_bit()
163 unsigned long long key, value[nr_cpus]; in test_lru_sanity0() local
185 key = 1; in test_lru_sanity0()
186 assert(!bpf_map_update_elem(lru_map_fd, &key, value, BPF_NOEXIST)); in test_lru_sanity0()
187 assert(!bpf_map_update_elem(expected_map_fd, &key, value, in test_lru_sanity0()
191 assert(bpf_map_update_elem(lru_map_fd, &key, value, BPF_NOEXIST) == -EEXIST); in test_lru_sanity0()
194 assert(bpf_map_update_elem(lru_map_fd, &key, value, -1) == -EINVAL); in test_lru_sanity0()
199 key = 2; in test_lru_sanity0()
200 assert(bpf_map_lookup_elem(lru_map_fd, &key, value) == -ENOENT); in test_lru_sanity0()
[all …]
/linux/crypto/
H A Dtestmgr.h40 const char *key; member
66 const char *key; member
106 const char *key; member
138 const unsigned char *key; member
148 const unsigned char *key; member
182 .key =
225 .key =
292 .key =
400 .key =
444 .key =
[all …]
H A Drsa_helper.c19 struct rsa_key *key = context; in rsa_get_n() local
40 key->n = value; in rsa_get_n()
41 key->n_sz = vlen; in rsa_get_n()
49 struct rsa_key *key = context; in rsa_get_e() local
52 if (!value || !key->n_sz || !vlen || vlen > key->n_sz) in rsa_get_e()
55 key->e = value; in rsa_get_e()
56 key->e_sz = vlen; in rsa_get_e()
64 struct rsa_key *key = context; in rsa_get_d() local
67 if (!value || !key->n_sz || !vlen || vlen > key->n_sz) in rsa_get_d()
70 key->d = value; in rsa_get_d()
[all …]
/linux/drivers/net/wireless/silabs/wfx/
H A Dkey.c34 struct ieee80211_key_conf *key, u8 *peer_addr) in fill_wep_pair() argument
36 WARN(key->keylen > sizeof(msg->key_data), "inconsistent data"); in fill_wep_pair()
37 msg->key_length = key->keylen; in fill_wep_pair()
38 memcpy(msg->key_data, key->key, key->keylen); in fill_wep_pair()
44 struct ieee80211_key_conf *key) in fill_wep_group() argument
46 WARN(key->keylen > sizeof(msg->key_data), "inconsistent data"); in fill_wep_group()
47 msg->key_id = key->keyidx; in fill_wep_group()
48 msg->key_length = key->keylen; in fill_wep_group()
49 memcpy(msg->key_data, key->key, key->keylen); in fill_wep_group()
54 struct ieee80211_key_conf *key, u8 *peer_addr) in fill_tkip_pair() argument
[all …]
/linux/net/mac80211/
H A Dkey.c120 static int ieee80211_key_enable_hw_accel(struct ieee80211_key *key) in ieee80211_key_enable_hw_accel() argument
122 struct ieee80211_sub_if_data *sdata = key->sdata; in ieee80211_key_enable_hw_accel()
127 lockdep_assert_wiphy(key->local->hw.wiphy); in ieee80211_key_enable_hw_accel()
129 if (key->flags & KEY_FLAG_TAINTED) { in ieee80211_key_enable_hw_accel()
137 if (key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE && in ieee80211_key_enable_hw_accel()
138 !(key->conf.flags & (IEEE80211_KEY_FLAG_GENERATE_MMIC | in ieee80211_key_enable_hw_accel()
143 key->flags &= ~KEY_FLAG_UPLOADED_TO_HARDWARE; in ieee80211_key_enable_hw_accel()
147 if (!key->local->ops->set_key) 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()
[all …]
/linux/include/linux/
H A Dkey.h33 struct key;
155 static inline key_ref_t make_key_ref(const struct key *key, in make_key_ref() argument
158 return (key_ref_t) ((unsigned long) key | possession); in make_key_ref()
161 static inline struct key *key_ref_to_ptr(const key_ref_t key_ref) in key_ref_to_ptr()
163 return (struct key *) ((unsigned long) key_ref & ~1UL); in key_ref_to_ptr()
171 typedef int (*key_restrict_link_func_t)(struct key *dest_keyring,
174 struct key *restriction_key);
178 struct key *key; member
195 struct key { struct
284 extern struct key *key_alloc(struct key_type *type,
[all …]
H A Djump_label.h82 #define STATIC_KEY_CHECK_USE(key) WARN(!static_key_initialized, \ argument
84 __func__, (key))
121 long key; // key may be far away from the core kernel under KASLR member
136 long offset = entry->key & ~3L; in jump_entry_key()
138 return (struct static_key *)((unsigned long)&entry->key + offset); in jump_entry_key()
155 return (struct static_key *)((unsigned long)entry->key & ~3UL); in jump_entry_key()
162 return (unsigned long)entry->key & 1UL; in jump_entry_is_branch()
167 return (unsigned long)entry->key & 2UL; in jump_entry_is_init()
173 entry->key |= 2; in jump_entry_set_init()
175 entry->key &= ~2; in jump_entry_set_init()
[all …]
H A Dkey-type.h41 typedef int (*request_key_actor_t)(struct key *auth_key, void *aux);
51 bool (*cmp)(const struct key *key,
95 int (*instantiate)(struct key *key, struct key_preparsed_payload *prep);
102 int (*update)(struct key *key, struct key_preparsed_payload *prep);
120 void (*revoke)(struct key *key);
123 void (*destroy)(struct key *key);
126 void (*describe)(const struct key *key, struct seq_file *p);
135 long (*read)(const struct key *key, char *buffer, size_t buflen);
173 extern int key_payload_reserve(struct key *key, size_t datalen);
174 extern int key_instantiate_and_link(struct key *key,
[all …]
/linux/drivers/s390/crypto/
H A Dzcrypt_cca_key.h112 } __packed *key = p; in zcrypt_type6_mex_key_en() local
124 memset(key, 0, sizeof(*key)); in zcrypt_type6_mex_key_en()
126 key->pubhdr = static_pub_hdr; in zcrypt_type6_mex_key_en()
127 key->pubsec = static_pub_sec; in zcrypt_type6_mex_key_en()
130 ptr = key->exponent; in zcrypt_type6_mex_key_en()
138 key->pubsec.modulus_bit_len = 8 * mex->inputdatalength; in zcrypt_type6_mex_key_en()
139 key->pubsec.modulus_byte_len = mex->inputdatalength; in zcrypt_type6_mex_key_en()
140 key->pubsec.exponent_len = mex->inputdatalength; in zcrypt_type6_mex_key_en()
141 key->pubsec.section_length = sizeof(key->pubsec) + in zcrypt_type6_mex_key_en()
143 key->pubhdr.token_length = in zcrypt_type6_mex_key_en()
[all …]
/linux/lib/
H A Dtest_static_keys.c37 struct static_key *key; member
41 #define test_key_func(key, branch) \ argument
42 static bool key ## _ ## branch(void) \
44 return branch(&key); \
47 static void invert_key(struct static_key *key) in invert_key() argument
49 if (static_key_enabled(key)) in invert_key()
50 static_key_disable(key); in invert_key()
52 static_key_enable(key); in invert_key()
61 if (previous != keys[i].key) { in invert_keys()
62 invert_key(keys[i].key); in invert_keys()
[all …]
/linux/fs/afs/
H A Dsecurity.c26 struct key *key; in afs_alloc_anon_key() local
29 key = cell->anonymous_key; in afs_alloc_anon_key()
30 if (!key) { in afs_alloc_anon_key()
31 key = rxrpc_get_null_key(cell->key_desc); in afs_alloc_anon_key()
32 if (!IS_ERR(key)) in afs_alloc_anon_key()
33 cell->anonymous_key = key; in afs_alloc_anon_key()
37 if (IS_ERR(key)) in afs_alloc_anon_key()
38 return PTR_ERR(key); in afs_alloc_anon_key()
48 struct key *afs_request_key(struct afs_cell *cell) in afs_request_key()
50 struct key *key; in afs_request_key() local
[all …]
/linux/fs/ubifs/
H A Dkey.h91 union ubifs_key *key, ino_t inum) in ino_key_init() argument
93 key->u32[0] = inum; in ino_key_init()
94 key->u32[1] = UBIFS_INO_KEY << UBIFS_S_KEY_BLOCK_BITS; in ino_key_init()
106 union ubifs_key *key = k; in ino_key_init_flash() local
108 key->j32[0] = cpu_to_le32(inum); in ino_key_init_flash()
109 key->j32[1] = cpu_to_le32(UBIFS_INO_KEY << UBIFS_S_KEY_BLOCK_BITS); in ino_key_init_flash()
120 union ubifs_key *key, ino_t inum) in lowest_ino_key() argument
122 key->u32[0] = inum; in lowest_ino_key()
123 key->u32[1] = 0; in lowest_ino_key()
133 union ubifs_key *key, ino_t inum) in highest_ino_key() argument
[all …]
/linux/fs/nilfs2/
H A Ddirect.c24 nilfs_direct_get_ptr(const struct nilfs_bmap *direct, __u64 key) in nilfs_direct_get_ptr() argument
26 return le64_to_cpu(*(nilfs_direct_dptrs(direct) + key)); in nilfs_direct_get_ptr()
30 __u64 key, __u64 ptr) in nilfs_direct_set_ptr() argument
32 *(nilfs_direct_dptrs(direct) + key) = cpu_to_le64(ptr); in nilfs_direct_set_ptr()
36 __u64 key, int level, __u64 *ptrp) in nilfs_direct_lookup() argument
40 if (key > NILFS_DIRECT_KEY_MAX || level != 1) in nilfs_direct_lookup()
42 ptr = nilfs_direct_get_ptr(direct, key); in nilfs_direct_lookup()
51 __u64 key, __u64 *ptrp, in nilfs_direct_lookup_contig() argument
59 if (key > NILFS_DIRECT_KEY_MAX) in nilfs_direct_lookup_contig()
61 ptr = nilfs_direct_get_ptr(direct, key); in nilfs_direct_lookup_contig()
[all …]
/linux/drivers/md/dm-pcache/
H A Dcache_req.c36 static int cache_data_alloc(struct pcache_cache *cache, struct pcache_cache_key *key) in cache_data_alloc() argument
48 to_alloc = key->len - allocated; in cache_data_alloc()
52 cache_pos_copy(&key->cache_pos, &data_head->head_pos); in cache_data_alloc()
53 key->seg_gen = key->cache_pos.cache_seg->gen; in cache_data_alloc()
68 key->len = seg_remain; in cache_data_alloc()
90 static int cache_copy_from_req_bio(struct pcache_cache *cache, struct pcache_cache_key *key, in cache_copy_from_req_bio() argument
93 struct pcache_cache_pos *pos = &key->cache_pos; in cache_copy_from_req_bio()
98 return segment_copy_from_bio(segment, pos->seg_off, key->len, pcache_req->bio, bio_off); in cache_copy_from_req_bio()
141 struct pcache_cache_key *key; in miss_read_end_req() local
144 key = (struct pcache_cache_key *)priv_data; in miss_read_end_req()
[all …]
/linux/drivers/crypto/intel/qat/qat_common/
H A Dadf_gen2_config.c15 char key[ADF_CFG_MAX_KEY_LEN_IN_BYTES]; in adf_gen2_crypto_dev_config() local
30 snprintf(key, sizeof(key), ADF_CY "%d" ADF_RING_ASYM_BANK_NUM, i); in adf_gen2_crypto_dev_config()
32 key, &val, ADF_DEC); in adf_gen2_crypto_dev_config()
36 snprintf(key, sizeof(key), ADF_CY "%d" ADF_RING_SYM_BANK_NUM, i); in adf_gen2_crypto_dev_config()
38 key, &val, ADF_DEC); in adf_gen2_crypto_dev_config()
42 snprintf(key, sizeof(key), ADF_CY "%d" ADF_ETRMGR_CORE_AFFINITY, in adf_gen2_crypto_dev_config()
45 key, &val, ADF_DEC); in adf_gen2_crypto_dev_config()
49 snprintf(key, sizeof(key), ADF_CY "%d" ADF_RING_ASYM_SIZE, i); in adf_gen2_crypto_dev_config()
52 key, &val, ADF_DEC); in adf_gen2_crypto_dev_config()
57 snprintf(key, sizeof(key), ADF_CY "%d" ADF_RING_SYM_SIZE, i); in adf_gen2_crypto_dev_config()
[all …]
/linux/tools/testing/selftests/bpf/map_tests/
H A Dlpm_trie_map_basic_ops.c35 uint8_t key[]; member
55 const uint8_t *key,
59 const uint8_t *key, in tlpm_add() argument
68 node = tlpm_match(list, key, n_bits); in tlpm_add()
70 memcpy(node->key, key, n); in tlpm_add()
81 memcpy(node->key, key, n); in tlpm_add()
99 const uint8_t *key, in tlpm_match() argument
113 if ((key[i / 8] & (1 << (7 - i % 8))) != in tlpm_match()
114 (list->key[i / 8] & (1 << (7 - i % 8)))) in tlpm_match()
128 const uint8_t *key, in tlpm_delete() argument
[all …]
/linux/drivers/nvdimm/
H A Dsecurity.c27 static void *key_data(struct key *key) in key_data() argument
29 struct encrypted_key_payload *epayload = dereference_key_locked(key); in key_data()
31 lockdep_assert_held_read(&key->sem); in key_data()
36 static void nvdimm_put_key(struct key *key) in nvdimm_put_key() argument
38 if (!key) in nvdimm_put_key()
41 up_read(&key->sem); in nvdimm_put_key()
42 key_put(key); in nvdimm_put_key()
50 static struct key *nvdimm_request_key(struct nvdimm *nvdimm) in nvdimm_request_key()
52 struct key *key = NULL; in nvdimm_request_key() local
58 key = request_key(&key_type_encrypted, desc, ""); in nvdimm_request_key()
[all …]
/linux/net/ceph/
H A Dcrypto.c23 static int set_secret(struct ceph_crypto_key *key, void *buf) in set_secret() argument
28 key->key = NULL; in set_secret()
29 key->tfm = NULL; in set_secret()
31 switch (key->type) { in set_secret()
40 if (!key->len) in set_secret()
43 key->key = kmemdup(buf, key->len, GFP_NOIO); in set_secret()
44 if (!key->key) { in set_secret()
51 key->tfm = crypto_alloc_sync_skcipher("cbc(aes)", 0, 0); in set_secret()
53 if (IS_ERR(key->tfm)) { in set_secret()
54 ret = PTR_ERR(key->tfm); in set_secret()
[all …]

12345678910>>...96