Home
last modified time | relevance | path

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

12345678910>>...51

/linux-3.4.99/security/keys/
Dkey.c43 void __key_check(const struct key *key) in __key_check() argument
46 key, key->magic, KEY_DEBUG_MAGIC); in __key_check()
144 static inline void key_alloc_serial(struct key *key) in key_alloc_serial() argument
147 struct key *xkey; in key_alloc_serial()
152 get_random_bytes(&key->serial, sizeof(key->serial)); in key_alloc_serial()
154 key->serial >>= 1; /* negative numbers are not permitted */ in key_alloc_serial()
155 } while (key->serial < 3); in key_alloc_serial()
165 xkey = rb_entry(parent, struct key, serial_node); in key_alloc_serial()
167 if (key->serial < xkey->serial) in key_alloc_serial()
169 else if (key->serial > xkey->serial) in key_alloc_serial()
[all …]
Drequest_key.c53 kenter("{%d,%d},%d", cons->key->serial, cons->authkey->serial, error); in complete_request_key()
56 key_negate_and_link(cons->key, key_negative_timeout, NULL, in complete_request_key()
61 key_put(cons->key); in complete_request_key()
76 struct key *keyring = info->data; in umh_keys_init()
86 struct key *keyring = info->data; in umh_keys_cleanup()
94 struct key *session_keyring, int wait) in call_usermodehelper_keys()
118 struct key *key = cons->key, *authkey = cons->authkey, *keyring, in call_sbin_request_key() local
125 kenter("{%d},{%d},%s", key->serial, authkey->serial, op); in call_sbin_request_key()
132 sprintf(desc, "_req.%u", key->serial); in call_sbin_request_key()
153 sprintf(key_str, "%d", key->serial); in call_sbin_request_key()
[all …]
Dgc.c131 static void key_gc_keyring(struct key *keyring, time_t limit) in key_gc_keyring()
134 struct key *key; in key_gc_keyring() local
151 key = klist->keys[loop]; in key_gc_keyring()
152 if (test_bit(KEY_FLAG_DEAD, &key->flags) || in key_gc_keyring()
153 (key->expiry > 0 && key->expiry <= limit)) in key_gc_keyring()
173 static noinline void key_gc_unused_key(struct key *key) in key_gc_unused_key() argument
175 key_check(key); in key_gc_unused_key()
177 security_key_free(key); in key_gc_unused_key()
180 if (test_bit(KEY_FLAG_IN_QUOTA, &key->flags)) { in key_gc_unused_key()
181 spin_lock(&key->user->lock); in key_gc_unused_key()
[all …]
Dproc.c97 struct key *key = rb_entry(n, struct key, serial_node); in key_serial_next() local
98 if (key->user->user_ns == user_ns) in key_serial_next()
110 static struct key *find_ge_key(key_serial_t id) in find_ge_key()
114 struct key *minkey = NULL; in find_ge_key()
117 struct key *key = rb_entry(n, struct key, serial_node); in find_ge_key() local
118 if (id < key->serial) { in find_ge_key()
119 if (!minkey || minkey->serial > key->serial) in find_ge_key()
120 minkey = key; in find_ge_key()
122 } else if (id > key->serial) { in find_ge_key()
125 minkey = key; in find_ge_key()
[all …]
Dpermission.c33 struct key *key; in key_task_permission() local
37 key = key_ref_to_ptr(key_ref); in key_task_permission()
39 if (key->user->user_ns != cred->user->user_ns) in key_task_permission()
43 if (key->uid == cred->fsuid) { in key_task_permission()
44 kperm = key->perm >> 16; in key_task_permission()
50 if (key->gid != -1 && key->perm & KEY_GRP_ALL) { in key_task_permission()
51 if (key->gid == cred->fsgid) { in key_task_permission()
52 kperm = key->perm >> 8; in key_task_permission()
56 ret = groups_search(cred->group_info, key->gid); in key_task_permission()
58 kperm = key->perm >> 8; in key_task_permission()
[all …]
Duser_defined.c61 int user_instantiate(struct key *key, const void *data, size_t datalen) in user_instantiate() argument
70 ret = key_payload_reserve(key, datalen); in user_instantiate()
82 rcu_assign_keypointer(key, upayload); in user_instantiate()
95 int user_update(struct key *key, const void *data, size_t datalen) in user_update() argument
116 ret = key_payload_reserve(key, datalen); in user_update()
120 zap = key->payload.data; in user_update()
121 rcu_assign_keypointer(key, upayload); in user_update()
122 key->expiry = 0; in user_update()
137 int user_match(const struct key *key, const void *description) in user_match() argument
139 return strcmp(key->description, description) == 0; in user_match()
[all …]
Dkeyring.c59 static int keyring_instantiate(struct key *keyring,
61 static int keyring_match(const struct key *keyring, const void *criterion);
62 static void keyring_revoke(struct key *keyring);
63 static void keyring_destroy(struct key *keyring);
64 static void keyring_describe(const struct key *keyring, struct seq_file *m);
65 static long keyring_read(const struct key *keyring,
90 static void keyring_publish_name(struct key *keyring) in keyring_publish_name()
114 static int keyring_instantiate(struct key *keyring, in keyring_instantiate()
132 static int keyring_match(const struct key *keyring, const void *description) in keyring_match()
142 static void keyring_destroy(struct key *keyring) in keyring_destroy()
[all …]
Dinternal.h90 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 *keyring, struct key *key,
97 extern void __key_link_end(struct key *keyring,
106 extern struct key *keyring_search_instkey(struct key *keyring,
109 typedef int (*key_match_func_t)(const struct key *, const void *);
128 extern struct key *find_keyring_by_name(const char *name, bool skip_perm_check);
133 extern int install_session_keyring_to_cred(struct cred *, struct key *);
135 extern struct key *request_key_and_link(struct key_type *type,
140 struct key *dest_keyring,
[all …]
/linux-3.4.99/crypto/
Dtestmgr.h40 char *key; member
50 char *key; member
64 char *key; member
83 char *key; member
1049 .key = "\xdf\xa6\xbf\x4d\xed\x81\xdb\x03\xff\xca\xff\x95\xf8\x30\xf0\x61",
1067 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
1074 .key = "Jefe",
1083 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1093 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1105 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
[all …]
/linux-3.4.99/net/mac80211/
Dkey.c88 static int ieee80211_key_enable_hw_accel(struct ieee80211_key *key) in ieee80211_key_enable_hw_accel() argument
96 if (!key->local->ops->set_key) in ieee80211_key_enable_hw_accel()
99 assert_key_lock(key->local); in ieee80211_key_enable_hw_accel()
101 sta = key->sta; in ieee80211_key_enable_hw_accel()
107 if (sta && !(key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE) && in ieee80211_key_enable_hw_accel()
108 !(key->local->hw.flags & IEEE80211_HW_SUPPORTS_PER_STA_GTK)) in ieee80211_key_enable_hw_accel()
114 sdata = key->sdata; in ieee80211_key_enable_hw_accel()
120 if (!(key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE)) in ieee80211_key_enable_hw_accel()
124 ret = drv_set_key(key->local, SET_KEY, sdata, in ieee80211_key_enable_hw_accel()
125 sta ? &sta->sta : NULL, &key->conf); in ieee80211_key_enable_hw_accel()
[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 …]
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()
97 pn = atomic64_read(&key->u.ccmp.tx_pn); in key_tx_spec_read()
103 pn = atomic64_read(&key->u.aes_cmac.tx_pn); in key_tx_spec_read()
[all …]
/linux-3.4.99/security/selinux/ss/
Davtab.c37 struct avtab_key *key, struct avtab_datum *datum) in avtab_insert_node() argument
43 newnode->key = *key; in avtab_insert_node()
57 static int avtab_insert(struct avtab *h, struct avtab_key *key, struct avtab_datum *datum) in avtab_insert() argument
61 u16 specified = key->specified & ~(AVTAB_ENABLED|AVTAB_ENABLED_OLD); in avtab_insert()
66 hvalue = avtab_hash(key, h->mask); in avtab_insert()
70 if (key->source_type == cur->key.source_type && in avtab_insert()
71 key->target_type == cur->key.target_type && in avtab_insert()
72 key->target_class == cur->key.target_class && in avtab_insert()
73 (specified & cur->key.specified)) in avtab_insert()
75 if (key->source_type < cur->key.source_type) in avtab_insert()
[all …]
/linux-3.4.99/include/linux/
Dkey-type.h24 struct key *key; /* key being constructed */ member
25 struct key *authkey;/* authorisation for key being constructed */
28 typedef int (*request_key_actor_t)(struct key_construction *key,
51 int (*instantiate)(struct key *key, const void *data, size_t datalen);
58 int (*update)(struct key *key, const void *data, size_t datalen);
61 int (*match)(const struct key *key, const void *desc);
66 void (*revoke)(struct key *key);
69 void (*destroy)(struct key *key);
72 void (*describe)(const struct key *key, struct seq_file *p);
81 long (*read)(const struct key *key, char __user *buffer, size_t buflen);
[all …]
Dkey.h34 struct key;
100 static inline key_ref_t make_key_ref(const struct key *key, in make_key_ref() argument
103 return (key_ref_t) ((unsigned long) key | possession); in make_key_ref()
106 static inline struct key *key_ref_to_ptr(const key_ref_t key_ref) in key_ref_to_ptr()
108 return (struct key *) ((unsigned long) key_ref & ~1UL); in key_ref_to_ptr()
124 struct key { struct
189 extern struct key *key_alloc(struct key_type *type, argument
201 extern void key_revoke(struct key *key);
202 extern void key_put(struct key *key);
204 static inline struct key *key_get(struct key *key) in key_get() argument
[all …]
Djump_label.h66 struct static_key key; member
87 inline struct jump_entry *jump_label_get_entries(struct static_key *key) in jump_label_get_entries() argument
89 return (struct jump_entry *)((unsigned long)key->entries in jump_label_get_entries()
93 static inline bool jump_label_get_branch_default(struct static_key *key) in jump_label_get_branch_default() argument
95 if ((unsigned long)key->entries & JUMP_LABEL_TRUE_BRANCH) in jump_label_get_branch_default()
100 static __always_inline bool static_key_false(struct static_key *key) in static_key_false() argument
102 return arch_static_branch(key); in static_key_false()
105 static __always_inline bool static_key_true(struct static_key *key) in static_key_true() argument
107 return !static_key_false(key); in static_key_true()
111 static __always_inline bool static_branch(struct static_key *key) in static_branch() argument
[all …]
/linux-3.4.99/drivers/s390/crypto/
Dzcrypt_cca_key.h162 } __attribute__((packed)) *key = p; in zcrypt_type6_mex_key_de() local
165 memset(key, 0, sizeof(*key)); in zcrypt_type6_mex_key_de()
168 key->t6_hdr.blen = cpu_to_be16(0x189); in zcrypt_type6_mex_key_de()
169 key->t6_hdr.ulen = cpu_to_be16(0x189 - 2); in zcrypt_type6_mex_key_de()
171 key->t6_hdr.blen = cpu_to_le16(0x189); in zcrypt_type6_mex_key_de()
172 key->t6_hdr.ulen = cpu_to_le16(0x189 - 2); in zcrypt_type6_mex_key_de()
174 key->pvtMeHdr = static_pvt_me_hdr; in zcrypt_type6_mex_key_de()
175 key->pvtMeSec = static_pvt_me_sec; in zcrypt_type6_mex_key_de()
176 key->pubMeSec = static_pub_me_sec; in zcrypt_type6_mex_key_de()
182 memcpy(key->exponent, pk_exponent, 3); in zcrypt_type6_mex_key_de()
[all …]
/linux-3.4.99/kernel/
Djump_label.c37 if (jea->key < jeb->key) in jump_label_cmp()
40 if (jea->key > jeb->key) in jump_label_cmp()
56 static void jump_label_update(struct static_key *key, int enable);
58 void static_key_slow_inc(struct static_key *key) in static_key_slow_inc() argument
60 if (atomic_inc_not_zero(&key->enabled)) in static_key_slow_inc()
64 if (atomic_read(&key->enabled) == 0) { in static_key_slow_inc()
65 if (!jump_label_get_branch_default(key)) in static_key_slow_inc()
66 jump_label_update(key, JUMP_LABEL_ENABLE); in static_key_slow_inc()
68 jump_label_update(key, JUMP_LABEL_DISABLE); in static_key_slow_inc()
70 atomic_inc(&key->enabled); in static_key_slow_inc()
[all …]
/linux-3.4.99/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 …]
/linux-3.4.99/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()
139 keynum, keylen, key[0], key[1], key[2], key[3], key[4], key[5], in wep_change_key()
140 key[6], key[7]); in wep_change_key()
144 memcpy(wlandev->wep_keys[keynum], key, keylen); in wep_change_key()
157 u8 s[256], key[64], c_crc[4]; in wep_decrypt() local
165 key[0] = iv[0]; in wep_decrypt()
166 key[1] = iv[1]; in wep_decrypt()
167 key[2] = iv[2]; in wep_decrypt()
182 memcpy(key + 3, wlandev->wep_keys[keyidx], keylen); in wep_decrypt()
[all …]
/linux-3.4.99/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 …]
/linux-3.4.99/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 …]
/linux-3.4.99/fs/btrfs/
Droot-tree.c30 struct btrfs_root_item *item, struct btrfs_key *key) in btrfs_find_last_root() argument
66 if (key) in btrfs_find_last_root()
67 memcpy(key, &found_key, sizeof(found_key)); in btrfs_find_last_root()
86 *root, struct btrfs_key *key, struct btrfs_root_item in btrfs_update_root() argument
99 ret = btrfs_search_slot(trans, root, key, path, 0, 1); in btrfs_update_root()
108 (unsigned long long)key->objectid, key->type, in btrfs_update_root()
109 (unsigned long long)key->offset); in btrfs_update_root()
124 struct btrfs_key *key, struct btrfs_root_item *item) in btrfs_insert_root() argument
126 return btrfs_insert_item(trans, root, key, item, sizeof(*item)); in btrfs_insert_root()
139 struct btrfs_key key; in btrfs_find_dead_roots() local
[all …]
/linux-3.4.99/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 …]
/linux-3.4.99/net/ceph/
Dcrypto.c18 dst->key = kmemdup(src->key, src->len, GFP_NOFS); in ceph_crypto_key_clone()
19 if (!dst->key) in ceph_crypto_key_clone()
24 int ceph_crypto_key_encode(struct ceph_crypto_key *key, void **p, void *end) in ceph_crypto_key_encode() argument
26 if (*p + sizeof(u16) + sizeof(key->created) + in ceph_crypto_key_encode()
27 sizeof(u16) + key->len > end) in ceph_crypto_key_encode()
29 ceph_encode_16(p, key->type); in ceph_crypto_key_encode()
30 ceph_encode_copy(p, &key->created, sizeof(key->created)); in ceph_crypto_key_encode()
31 ceph_encode_16(p, key->len); in ceph_crypto_key_encode()
32 ceph_encode_copy(p, key->key, key->len); in ceph_crypto_key_encode()
36 int ceph_crypto_key_decode(struct ceph_crypto_key *key, void **p, void *end) in ceph_crypto_key_decode() argument
[all …]

12345678910>>...51