Home
last modified time | relevance | path

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

12345678910>>...90

/Linux-v4.19/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 short state = key->state; in key_gc_unused_keys()
134 list_del(&key->graveyard_link); in key_gc_unused_keys()
136 kdebug("- %u", key->serial); in key_gc_unused_keys()
137 key_check(key); in key_gc_unused_keys()
140 if (state == KEY_IS_POSITIVE && 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()
146 if (test_bit(KEY_FLAG_IN_QUOTA, &key->flags)) { 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()
101 struct key *key = cons->key, *authkey = cons->authkey, *keyring, in call_sbin_request_key() local
108 kenter("{%d},{%d},%s", key->serial, authkey->serial, op); in call_sbin_request_key()
115 sprintf(desc, "_req.%u", key->serial); in call_sbin_request_key()
137 sprintf(key_str, "%d", key->serial); in call_sbin_request_key()
[all …]
/Linux-v4.19/tools/testing/selftests/bpf/
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 …]
Dtest_lru_map.c100 unsigned long long key, value[nr_cpus]; in test_lru_sanity0() local
122 key = 1; in test_lru_sanity0()
123 assert(!bpf_map_update_elem(lru_map_fd, &key, value, BPF_NOEXIST)); in test_lru_sanity0()
124 assert(!bpf_map_update_elem(expected_map_fd, &key, value, in test_lru_sanity0()
128 assert(bpf_map_update_elem(lru_map_fd, &key, value, BPF_NOEXIST) == -1 in test_lru_sanity0()
132 assert(bpf_map_update_elem(lru_map_fd, &key, value, -1) == -1 && in test_lru_sanity0()
138 key = 2; in test_lru_sanity0()
139 assert(bpf_map_lookup_elem(lru_map_fd, &key, value) == -1 && in test_lru_sanity0()
143 assert(bpf_map_update_elem(lru_map_fd, &key, value, BPF_EXIST) == -1 && in test_lru_sanity0()
147 assert(!bpf_map_update_elem(lru_map_fd, &key, value, BPF_NOEXIST)); in test_lru_sanity0()
[all …]
/Linux-v4.19/kernel/
Djump_label.c41 if (jea->key < jeb->key) in jump_label_cmp()
44 if (jea->key > jeb->key) in jump_label_cmp()
60 static void jump_label_update(struct static_key *key);
71 int static_key_count(struct static_key *key) in static_key_count() argument
77 int n = atomic_read(&key->enabled); in static_key_count()
83 void static_key_slow_inc_cpuslocked(struct static_key *key) in static_key_slow_inc_cpuslocked() argument
87 STATIC_KEY_CHECK_USE(key); in static_key_slow_inc_cpuslocked()
101 for (v = atomic_read(&key->enabled); v > 0; v = v1) { in static_key_slow_inc_cpuslocked()
102 v1 = atomic_cmpxchg(&key->enabled, v, v + 1); in static_key_slow_inc_cpuslocked()
108 if (atomic_read(&key->enabled) == 0) { in static_key_slow_inc_cpuslocked()
[all …]
/Linux-v4.19/include/linux/
Dkey.h38 struct key;
115 static inline key_ref_t make_key_ref(const struct key *key, in make_key_ref() argument
118 return (key_ref_t) ((unsigned long) key | possession); in make_key_ref()
121 static inline struct key *key_ref_to_ptr(const key_ref_t key_ref) in key_ref_to_ptr()
123 return (struct key *) ((unsigned long) key_ref & ~1UL); in key_ref_to_ptr()
131 typedef int (*key_restrict_link_func_t)(struct key *dest_keyring,
134 struct key *restriction_key);
138 struct key *key; member
155 struct key { struct
237 extern struct key *key_alloc(struct key_type *type,
[all …]
Djump_label.h85 #define STATIC_KEY_CHECK_USE(key) WARN(!static_key_initialized, \ argument
87 __func__, (key))
140 static __always_inline bool static_key_false(struct static_key *key) in static_key_false() argument
142 return arch_static_branch(key, false); in static_key_false()
145 static __always_inline bool static_key_true(struct static_key *key) in static_key_true() argument
147 return !arch_static_branch(key, true); in static_key_true()
162 extern void static_key_slow_inc(struct static_key *key);
163 extern void static_key_slow_dec(struct static_key *key);
164 extern void static_key_slow_inc_cpuslocked(struct static_key *key);
165 extern void static_key_slow_dec_cpuslocked(struct static_key *key);
[all …]
Dkey-type.h25 struct key *key; /* key being constructed */ member
26 struct key *authkey;/* authorisation for key being constructed */
50 typedef int (*request_key_actor_t)(struct key_construction *key,
61 bool (*cmp)(const struct key *key,
101 int (*instantiate)(struct key *key, struct key_preparsed_payload *prep);
108 int (*update)(struct key *key, struct key_preparsed_payload *prep);
123 void (*revoke)(struct key *key);
126 void (*destroy)(struct key *key);
129 void (*describe)(const struct key *key, struct seq_file *p);
138 long (*read)(const struct key *key, char __user *buffer, size_t buflen);
[all …]
Dsiphash.h21 u64 key[2]; member
24 u64 __siphash_aligned(const void *data, size_t len, const siphash_key_t *key);
26 u64 __siphash_unaligned(const void *data, size_t len, const siphash_key_t *key);
29 u64 siphash_1u64(const u64 a, const siphash_key_t *key);
30 u64 siphash_2u64(const u64 a, const u64 b, const siphash_key_t *key);
32 const siphash_key_t *key);
34 const siphash_key_t *key);
35 u64 siphash_1u32(const u32 a, const siphash_key_t *key);
37 const siphash_key_t *key);
40 const siphash_key_t *key) in siphash_2u32() argument
[all …]
/Linux-v4.19/crypto/
Dtestmgr.h37 const char *key; member
66 const char *key; member
82 const char *key; member
101 const char *key; member
128 const unsigned char *key; member
160 .key =
190 .key =
234 .key =
299 .key =
343 .key =
[all …]
Drsa_helper.c24 struct rsa_key *key = context; in rsa_get_n() local
45 key->n = value; in rsa_get_n()
46 key->n_sz = vlen; in rsa_get_n()
54 struct rsa_key *key = context; in rsa_get_e() local
57 if (!value || !key->n_sz || !vlen || vlen > key->n_sz) in rsa_get_e()
60 key->e = value; in rsa_get_e()
61 key->e_sz = vlen; in rsa_get_e()
69 struct rsa_key *key = context; in rsa_get_d() local
72 if (!value || !key->n_sz || !vlen || vlen > key->n_sz) in rsa_get_d()
75 key->d = value; in rsa_get_d()
[all …]
/Linux-v4.19/net/mac80211/
Dkey.c127 static int ieee80211_key_enable_hw_accel(struct ieee80211_key *key) in ieee80211_key_enable_hw_accel() argument
129 struct ieee80211_sub_if_data *sdata = key->sdata; in ieee80211_key_enable_hw_accel()
135 if (key->flags & KEY_FLAG_TAINTED) { 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 assert_key_lock(key->local); in ieee80211_key_enable_hw_accel()
152 sta = key->sta; in ieee80211_key_enable_hw_accel()
158 if (sta && !(key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE) && in ieee80211_key_enable_hw_accel()
159 !ieee80211_hw_check(&key->local->hw, SUPPORTS_PER_STA_GTK)) in ieee80211_key_enable_hw_accel()
170 if (!(key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE)) in ieee80211_key_enable_hw_accel()
[all …]
/Linux-v4.19/net/openvswitch/
Dflow.c255 static int parse_ipv6hdr(struct sk_buff *skb, struct sw_flow_key *key) in parse_ipv6hdr() argument
273 key->ip.proto = NEXTHDR_NONE; in parse_ipv6hdr()
274 key->ip.tos = ipv6_get_dsfield(nh); in parse_ipv6hdr()
275 key->ip.ttl = nh->hop_limit; in parse_ipv6hdr()
276 key->ipv6.label = *(__be32 *)nh & htonl(IPV6_FLOWINFO_FLOWLABEL); in parse_ipv6hdr()
277 key->ipv6.addr.src = nh->saddr; in parse_ipv6hdr()
278 key->ipv6.addr.dst = nh->daddr; in parse_ipv6hdr()
284 key->ip.frag = OVS_FRAG_TYPE_LATER; in parse_ipv6hdr()
286 key->ip.frag = OVS_FRAG_TYPE_FIRST; in parse_ipv6hdr()
288 key->ip.frag = OVS_FRAG_TYPE_NONE; in parse_ipv6hdr()
[all …]
/Linux-v4.19/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()
108 static int avtab_insert(struct avtab *h, struct avtab_key *key, struct avtab_datum *datum) in avtab_insert() argument
112 u16 specified = key->specified & ~(AVTAB_ENABLED|AVTAB_ENABLED_OLD); in avtab_insert()
117 hvalue = avtab_hash(key, h->mask); in avtab_insert()
121 if (key->source_type == cur->key.source_type && in avtab_insert()
122 key->target_type == cur->key.target_type && in avtab_insert()
123 key->target_class == cur->key.target_class && in avtab_insert()
124 (specified & cur->key.specified)) { in avtab_insert()
[all …]
/Linux-v4.19/drivers/s390/crypto/
Dzcrypt_cca_key.h117 } __packed *key = p; in zcrypt_type6_mex_key_en() local
130 memset(key, 0, sizeof(*key)); in zcrypt_type6_mex_key_en()
132 key->pubHdr = static_pub_hdr; in zcrypt_type6_mex_key_en()
133 key->pubSec = static_pub_sec; in zcrypt_type6_mex_key_en()
136 temp = key->exponent; in zcrypt_type6_mex_key_en()
151 key->pubSec.modulus_bit_len = 8 * mex->inputdatalength; in zcrypt_type6_mex_key_en()
152 key->pubSec.modulus_byte_len = mex->inputdatalength; in zcrypt_type6_mex_key_en()
153 key->pubSec.exponent_len = mex->inputdatalength - i; in zcrypt_type6_mex_key_en()
154 key->pubSec.section_length = sizeof(key->pubSec) + in zcrypt_type6_mex_key_en()
156 key->pubHdr.token_length = in zcrypt_type6_mex_key_en()
[all …]
/Linux-v4.19/lib/
Dtest_static_keys.c45 struct static_key *key; member
49 #define test_key_func(key, branch) \ argument
50 static bool key ## _ ## branch(void) \
52 return branch(&key); \
55 static void invert_key(struct static_key *key) in invert_key() argument
57 if (static_key_enabled(key)) in invert_key()
58 static_key_disable(key); in invert_key()
60 static_key_enable(key); in invert_key()
69 if (previous != keys[i].key) { in invert_keys()
70 invert_key(keys[i].key); in invert_keys()
[all …]
/Linux-v4.19/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_skcipher("cbc(aes)", 0, CRYPTO_ALG_ASYNC); in set_secret()
53 if (IS_ERR(key->tfm)) { in set_secret()
54 ret = PTR_ERR(key->tfm); in set_secret()
[all …]
/Linux-v4.19/fs/ubifs/
Dkey.h103 union ubifs_key *key, ino_t inum) in ino_key_init() argument
105 key->u32[0] = inum; in ino_key_init()
106 key->u32[1] = UBIFS_INO_KEY << UBIFS_S_KEY_BLOCK_BITS; in ino_key_init()
118 union ubifs_key *key = k; in ino_key_init_flash() local
120 key->j32[0] = cpu_to_le32(inum); in ino_key_init_flash()
121 key->j32[1] = cpu_to_le32(UBIFS_INO_KEY << UBIFS_S_KEY_BLOCK_BITS); in ino_key_init_flash()
132 union ubifs_key *key, ino_t inum) in lowest_ino_key() argument
134 key->u32[0] = inum; in lowest_ino_key()
135 key->u32[1] = 0; in lowest_ino_key()
145 union ubifs_key *key, ino_t inum) in highest_ino_key() argument
[all …]
/Linux-v4.19/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-v4.19/drivers/input/
Dsparse-keymap.c28 struct key_entry *key; in sparse_keymap_get_key_index() local
31 for (key = dev->keycode; key->type != KE_END; key++) { in sparse_keymap_get_key_index()
32 if (key->type == KE_KEY) { in sparse_keymap_get_key_index()
33 if (key == k) in sparse_keymap_get_key_index()
45 struct key_entry *key; in sparse_keymap_entry_by_index() local
48 for (key = dev->keycode; key->type != KE_END; key++) in sparse_keymap_entry_by_index()
49 if (key->type == KE_KEY) in sparse_keymap_entry_by_index()
51 return key; in sparse_keymap_entry_by_index()
67 struct key_entry *key; in sparse_keymap_entry_from_scancode() local
69 for (key = dev->keycode; key->type != KE_END; key++) in sparse_keymap_entry_from_scancode()
[all …]
/Linux-v4.19/fs/btrfs/
Dfree-space-tree.c29 num_bitmaps = div_u64(cache->key.offset + bitmap_range - 1, in set_free_space_tree_thresholds()
52 struct btrfs_key key; in add_new_free_space_info() local
56 key.objectid = block_group->key.objectid; in add_new_free_space_info()
57 key.type = BTRFS_FREE_SPACE_INFO_KEY; in add_new_free_space_info()
58 key.offset = block_group->key.offset; in add_new_free_space_info()
60 ret = btrfs_insert_empty_item(trans, root, path, &key, sizeof(*info)); in add_new_free_space_info()
84 struct btrfs_key key; in search_free_space_info() local
87 key.objectid = block_group->key.objectid; in search_free_space_info()
88 key.type = BTRFS_FREE_SPACE_INFO_KEY; in search_free_space_info()
89 key.offset = block_group->key.offset; in search_free_space_info()
[all …]
/Linux-v4.19/drivers/crypto/qat/qat_common/
Dqat_crypto.c165 char key[ADF_CFG_MAX_KEY_LEN_IN_BYTES]; in qat_crypto_dev_config() local
175 snprintf(key, sizeof(key), ADF_CY "%d" ADF_RING_BANK_NUM, i); in qat_crypto_dev_config()
177 key, (void *)&val, ADF_DEC)) in qat_crypto_dev_config()
180 snprintf(key, sizeof(key), ADF_CY "%d" ADF_ETRMGR_CORE_AFFINITY, in qat_crypto_dev_config()
183 key, (void *)&val, ADF_DEC)) in qat_crypto_dev_config()
186 snprintf(key, sizeof(key), ADF_CY "%d" ADF_RING_ASYM_SIZE, i); in qat_crypto_dev_config()
189 key, (void *)&val, ADF_DEC)) in qat_crypto_dev_config()
193 snprintf(key, sizeof(key), ADF_CY "%d" ADF_RING_SYM_SIZE, i); in qat_crypto_dev_config()
195 key, (void *)&val, ADF_DEC)) in qat_crypto_dev_config()
199 snprintf(key, sizeof(key), ADF_CY "%d" ADF_RING_ASYM_TX, i); in qat_crypto_dev_config()
[all …]
/Linux-v4.19/security/integrity/
Ddigsig_asymmetric.c28 static struct key *request_asymmetric_key(struct key *keyring, uint32_t keyid) in request_asymmetric_key()
30 struct key *key; in request_asymmetric_key() local
37 key = get_ima_blacklist_keyring(); in request_asymmetric_key()
38 if (key) { in request_asymmetric_key()
41 kref = keyring_search(make_key_ref(key, 1), in request_asymmetric_key()
56 key = ERR_CAST(kref); in request_asymmetric_key()
58 key = key_ref_to_ptr(kref); in request_asymmetric_key()
60 key = request_key(&key_type_asymmetric, name, NULL); in request_asymmetric_key()
63 if (IS_ERR(key)) { in request_asymmetric_key()
65 name, PTR_ERR(key)); in request_asymmetric_key()
[all …]
/Linux-v4.19/fs/nfs/
Dfscache.c57 struct nfs_server_key key; in nfs_fscache_get_client_cookie() local
58 uint16_t len = sizeof(key.hdr); in nfs_fscache_get_client_cookie()
60 memset(&key, 0, sizeof(key)); in nfs_fscache_get_client_cookie()
61 key.hdr.nfsversion = clp->rpc_ops->version; in nfs_fscache_get_client_cookie()
62 key.hdr.family = clp->cl_addr.ss_family; in nfs_fscache_get_client_cookie()
66 key.hdr.port = sin->sin_port; in nfs_fscache_get_client_cookie()
67 key.ipv4_addr = sin->sin_addr; in nfs_fscache_get_client_cookie()
68 len += sizeof(key.ipv4_addr); in nfs_fscache_get_client_cookie()
72 key.hdr.port = sin6->sin6_port; in nfs_fscache_get_client_cookie()
73 key.ipv6_addr = sin6->sin6_addr; in nfs_fscache_get_client_cookie()
[all …]

12345678910>>...90