Home
last modified time | relevance | path

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

12345678910>>...93

/Linux-v5.4/tools/testing/selftests/bpf/progs/
Dtest_tunnel_kern.c50 struct bpf_tunnel_key key; in _gre_set_tunnel() local
52 __builtin_memset(&key, 0x0, sizeof(key)); in _gre_set_tunnel()
53 key.remote_ipv4 = 0xac100164; /* 172.16.1.100 */ in _gre_set_tunnel()
54 key.tunnel_id = 2; in _gre_set_tunnel()
55 key.tunnel_tos = 0; in _gre_set_tunnel()
56 key.tunnel_ttl = 64; in _gre_set_tunnel()
58 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in _gre_set_tunnel()
72 struct bpf_tunnel_key key; in _gre_get_tunnel() local
75 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), 0); in _gre_get_tunnel()
81 bpf_trace_printk(fmt, sizeof(fmt), key.tunnel_id, key.remote_ipv4); in _gre_get_tunnel()
[all …]
/Linux-v5.4/crypto/
Dtestmgr.h38 const char *key; member
65 const char *key; member
100 const char *key; member
117 const char *key; member
144 const unsigned char *key; member
179 .key =
209 .key =
253 .key =
318 .key =
362 .key =
[all …]
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-v5.4/security/keys/
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 …]
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
42 t->cached_requested_key = key_get(key); in cache_requested_key()
56 void complete_request_key(struct key *authkey, int error) in complete_request_key()
59 struct key *key = rka->target_key; in complete_request_key() local
[all …]
Dgc.c125 struct key *key = in key_gc_unused_keys() local
126 list_entry(keys->next, struct key, graveyard_link); in key_gc_unused_keys()
127 short state = key->state; in key_gc_unused_keys()
129 list_del(&key->graveyard_link); in key_gc_unused_keys()
131 kdebug("- %u", key->serial); in key_gc_unused_keys()
132 key_check(key); in key_gc_unused_keys()
135 if (state == KEY_IS_POSITIVE && key->type->destroy) in key_gc_unused_keys()
136 key->type->destroy(key); in key_gc_unused_keys()
138 security_key_free(key); in key_gc_unused_keys()
141 if (test_bit(KEY_FLAG_IN_QUOTA, &key->flags)) { in key_gc_unused_keys()
[all …]
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-v5.4/tools/testing/selftests/bpf/
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
50 BPF_LD_IMM64(BPF_REG_3, key), in bpf_map_lookup_elem_with_ref_bit()
161 unsigned long long key, value[nr_cpus]; in test_lru_sanity0() local
183 key = 1; in test_lru_sanity0()
184 assert(!bpf_map_update_elem(lru_map_fd, &key, value, BPF_NOEXIST)); in test_lru_sanity0()
185 assert(!bpf_map_update_elem(expected_map_fd, &key, value, in test_lru_sanity0()
189 assert(bpf_map_update_elem(lru_map_fd, &key, value, BPF_NOEXIST) == -1 in test_lru_sanity0()
193 assert(bpf_map_update_elem(lru_map_fd, &key, value, -1) == -1 && in test_lru_sanity0()
199 key = 2; in test_lru_sanity0()
200 assert(bpf_map_lookup_elem(lru_map_fd, &key, value) == -1 && in test_lru_sanity0()
[all …]
/Linux-v5.4/kernel/
Djump_label.c72 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()
116 void static_key_slow_inc_cpuslocked(struct static_key *key) in static_key_slow_inc_cpuslocked() argument
120 STATIC_KEY_CHECK_USE(key); in static_key_slow_inc_cpuslocked()
135 for (v = atomic_read(&key->enabled); v > 0; v = v1) { in static_key_slow_inc_cpuslocked()
136 v1 = atomic_cmpxchg(&key->enabled, v, v + 1); in static_key_slow_inc_cpuslocked()
142 if (atomic_read(&key->enabled) == 0) { in static_key_slow_inc_cpuslocked()
[all …]
/Linux-v5.4/include/linux/
Dkey.h33 struct key;
132 static inline key_ref_t make_key_ref(const struct key *key, in make_key_ref() argument
135 return (key_ref_t) ((unsigned long) key | possession); in make_key_ref()
138 static inline struct key *key_ref_to_ptr(const key_ref_t key_ref) in key_ref_to_ptr()
140 return (struct key *) ((unsigned long) key_ref & ~1UL); in key_ref_to_ptr()
148 typedef int (*key_restrict_link_func_t)(struct key *dest_keyring,
151 struct key *restriction_key);
155 struct key *key; member
172 struct key { struct
257 extern struct key *key_alloc(struct key_type *type,
[all …]
Djump_label.h81 #define STATIC_KEY_CHECK_USE(key) WARN(!static_key_initialized, \ argument
83 __func__, (key))
125 long key; // key may be far away from the core kernel under KASLR member
140 long offset = entry->key & ~3L; in jump_entry_key()
142 return (struct static_key *)((unsigned long)&entry->key + offset); in jump_entry_key()
159 return (struct static_key *)((unsigned long)entry->key & ~3UL); in jump_entry_key()
166 return (unsigned long)entry->key & 1UL; in jump_entry_is_branch()
171 return (unsigned long)entry->key & 2UL; in jump_entry_is_init()
176 entry->key |= 2; in jump_entry_set_init()
198 static __always_inline bool static_key_false(struct static_key *key) in static_key_false() argument
[all …]
Dkey-type.h40 typedef int (*request_key_actor_t)(struct key *auth_key, void *aux);
50 bool (*cmp)(const struct key *key,
93 int (*instantiate)(struct key *key, struct key_preparsed_payload *prep);
100 int (*update)(struct key *key, struct key_preparsed_payload *prep);
115 void (*revoke)(struct key *key);
118 void (*destroy)(struct key *key);
121 void (*describe)(const struct key *key, struct seq_file *p);
130 long (*read)(const struct key *key, char __user *buffer, size_t buflen);
168 extern int key_payload_reserve(struct key *key, size_t datalen);
169 extern int key_instantiate_and_link(struct key *key,
[all …]
Dsiphash.h21 u64 key[2]; member
24 static inline bool siphash_key_is_zero(const siphash_key_t *key) in siphash_key_is_zero() argument
26 return !(key->key[0] | key->key[1]); in siphash_key_is_zero()
29 u64 __siphash_aligned(const void *data, size_t len, const siphash_key_t *key);
31 u64 __siphash_unaligned(const void *data, size_t len, const siphash_key_t *key);
34 u64 siphash_1u64(const u64 a, const siphash_key_t *key);
35 u64 siphash_2u64(const u64 a, const u64 b, const siphash_key_t *key);
37 const siphash_key_t *key);
39 const siphash_key_t *key);
40 u64 siphash_1u32(const u32 a, const siphash_key_t *key);
[all …]
/Linux-v5.4/net/mac80211/
Dkey.c125 static int ieee80211_key_enable_hw_accel(struct ieee80211_key *key) in ieee80211_key_enable_hw_accel() argument
127 struct ieee80211_sub_if_data *sdata = key->sdata; in ieee80211_key_enable_hw_accel()
133 if (key->flags & KEY_FLAG_TAINTED) { in ieee80211_key_enable_hw_accel()
141 if (key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE && in ieee80211_key_enable_hw_accel()
142 !(key->conf.flags & (IEEE80211_KEY_FLAG_GENERATE_MMIC | in ieee80211_key_enable_hw_accel()
147 key->flags &= ~KEY_FLAG_UPLOADED_TO_HARDWARE; in ieee80211_key_enable_hw_accel()
151 if (!key->local->ops->set_key) in ieee80211_key_enable_hw_accel()
154 assert_key_lock(key->local); in ieee80211_key_enable_hw_accel()
156 sta = key->sta; in ieee80211_key_enable_hw_accel()
162 if (sta && !(key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE) && in ieee80211_key_enable_hw_accel()
[all …]
/Linux-v5.4/net/openvswitch/
Dflow.c242 static int parse_ipv6hdr(struct sk_buff *skb, struct sw_flow_key *key) in parse_ipv6hdr() argument
257 key->ip.proto = NEXTHDR_NONE; in parse_ipv6hdr()
258 key->ip.tos = ipv6_get_dsfield(nh); in parse_ipv6hdr()
259 key->ip.ttl = nh->hop_limit; in parse_ipv6hdr()
260 key->ipv6.label = *(__be32 *)nh & htonl(IPV6_FLOWINFO_FLOWLABEL); in parse_ipv6hdr()
261 key->ipv6.addr.src = nh->saddr; in parse_ipv6hdr()
262 key->ipv6.addr.dst = nh->daddr; in parse_ipv6hdr()
267 key->ip.frag = OVS_FRAG_TYPE_LATER; in parse_ipv6hdr()
268 key->ip.proto = nexthdr; in parse_ipv6hdr()
271 key->ip.frag = OVS_FRAG_TYPE_FIRST; in parse_ipv6hdr()
[all …]
/Linux-v5.4/security/selinux/ss/
Davtab.c71 struct avtab_key *key, struct avtab_datum *datum) in avtab_insert_node() argument
78 newnode->key = *key; in avtab_insert_node()
80 if (key->specified & AVTAB_XPERMS) { in avtab_insert_node()
106 static int avtab_insert(struct avtab *h, struct avtab_key *key, struct avtab_datum *datum) in avtab_insert() argument
110 u16 specified = key->specified & ~(AVTAB_ENABLED|AVTAB_ENABLED_OLD); in avtab_insert()
115 hvalue = avtab_hash(key, h->mask); in avtab_insert()
119 if (key->source_type == cur->key.source_type && in avtab_insert()
120 key->target_type == cur->key.target_type && in avtab_insert()
121 key->target_class == cur->key.target_class && in avtab_insert()
122 (specified & cur->key.specified)) { in avtab_insert()
[all …]
/Linux-v5.4/drivers/s390/crypto/
Dzcrypt_cca_key.h115 } __packed *key = p; in zcrypt_type6_mex_key_en() local
128 memset(key, 0, sizeof(*key)); in zcrypt_type6_mex_key_en()
130 key->pubHdr = static_pub_hdr; in zcrypt_type6_mex_key_en()
131 key->pubSec = static_pub_sec; in zcrypt_type6_mex_key_en()
134 temp = key->exponent; in zcrypt_type6_mex_key_en()
149 key->pubSec.modulus_bit_len = 8 * mex->inputdatalength; in zcrypt_type6_mex_key_en()
150 key->pubSec.modulus_byte_len = mex->inputdatalength; in zcrypt_type6_mex_key_en()
151 key->pubSec.exponent_len = mex->inputdatalength - i; in zcrypt_type6_mex_key_en()
152 key->pubSec.section_length = sizeof(key->pubSec) + in zcrypt_type6_mex_key_en()
154 key->pubHdr.token_length = in zcrypt_type6_mex_key_en()
[all …]
/Linux-v5.4/lib/
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-v5.4/net/ceph/
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 …]
/Linux-v5.4/fs/ubifs/
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-v5.4/fs/nilfs2/
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-v5.4/drivers/nvdimm/
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-v5.4/drivers/input/
Dsparse-keymap.c25 struct key_entry *key; in sparse_keymap_get_key_index() local
28 for (key = dev->keycode; key->type != KE_END; key++) { in sparse_keymap_get_key_index()
29 if (key->type == KE_KEY) { in sparse_keymap_get_key_index()
30 if (key == k) in sparse_keymap_get_key_index()
42 struct key_entry *key; in sparse_keymap_entry_by_index() local
45 for (key = dev->keycode; key->type != KE_END; key++) in sparse_keymap_entry_by_index()
46 if (key->type == KE_KEY) in sparse_keymap_entry_by_index()
48 return key; in sparse_keymap_entry_by_index()
64 struct key_entry *key; in sparse_keymap_entry_from_scancode() local
66 for (key = dev->keycode; key->type != KE_END; key++) in sparse_keymap_entry_from_scancode()
[all …]
/Linux-v5.4/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_net(&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()
51 struct key *afs_request_key_rcu(struct afs_cell *cell) in afs_request_key_rcu()
[all …]
/Linux-v5.4/fs/btrfs/
Dfree-space-tree.c30 num_bitmaps = div_u64(cache->key.offset + bitmap_range - 1, in set_free_space_tree_thresholds()
53 struct btrfs_key key; in add_new_free_space_info() local
57 key.objectid = block_group->key.objectid; in add_new_free_space_info()
58 key.type = BTRFS_FREE_SPACE_INFO_KEY; in add_new_free_space_info()
59 key.offset = block_group->key.offset; in add_new_free_space_info()
61 ret = btrfs_insert_empty_item(trans, root, path, &key, sizeof(*info)); in add_new_free_space_info()
86 struct btrfs_key key; in search_free_space_info() local
89 key.objectid = block_group->key.objectid; in search_free_space_info()
90 key.type = BTRFS_FREE_SPACE_INFO_KEY; in search_free_space_info()
91 key.offset = block_group->key.offset; in search_free_space_info()
[all …]

12345678910>>...93