/net/mac80211/ |
D | key.c | 125 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 …]
|
D | debugfs_key.c | 21 struct ieee80211_key *key = file->private_data; \ 23 format_string, key->prop); \ 74 struct ieee80211_key *key = file->private_data; in key_algorithm_read() local 75 u32 c = key->conf.cipher; in key_algorithm_read() 86 struct ieee80211_key *key = file->private_data; in key_tx_spec_write() local 90 switch (key->conf.cipher) { in key_tx_spec_write() 111 atomic64_set(&key->conf.tx_pn, pn); in key_tx_spec_write() 124 struct ieee80211_key *key = file->private_data; in key_tx_spec_read() local 126 switch (key->conf.cipher) { in key_tx_spec_read() 132 pn = atomic64_read(&key->conf.tx_pn); in key_tx_spec_read() [all …]
|
D | tkip.c | 152 static void ieee80211_compute_tkip_p1k(struct ieee80211_key *key, u32 iv32) in ieee80211_compute_tkip_p1k() argument 154 struct ieee80211_sub_if_data *sdata = key->sdata; in ieee80211_compute_tkip_p1k() 155 struct tkip_ctx *ctx = &key->u.tkip.tx; in ieee80211_compute_tkip_p1k() 156 const u8 *tk = &key->conf.key[NL80211_TKIP_DATA_OFFSET_ENCR_KEY]; in ieee80211_compute_tkip_p1k() 158 lockdep_assert_held(&key->u.tkip.txlock); in ieee80211_compute_tkip_p1k() 174 struct ieee80211_key *key = (struct ieee80211_key *) in ieee80211_get_tkip_p1k_iv() local 176 struct tkip_ctx *ctx = &key->u.tkip.tx; in ieee80211_get_tkip_p1k_iv() 178 spin_lock_bh(&key->u.tkip.txlock); in ieee80211_get_tkip_p1k_iv() 179 ieee80211_compute_tkip_p1k(key, iv32); in ieee80211_get_tkip_p1k_iv() 181 spin_unlock_bh(&key->u.tkip.txlock); in ieee80211_get_tkip_p1k_iv() [all …]
|
D | wpa.c | 31 u8 *data, *key, *mic; in ieee80211_tx_h_michael_mic_add() local 40 if (!tx->key || tx->key->conf.cipher != WLAN_CIPHER_SUITE_TKIP || in ieee80211_tx_h_michael_mic_add() 59 !(tx->key->conf.flags & (IEEE80211_KEY_FLAG_GENERATE_MMIC | in ieee80211_tx_h_michael_mic_add() 78 if (tx->key->conf.flags & IEEE80211_KEY_FLAG_PUT_MIC_SPACE) { in ieee80211_tx_h_michael_mic_add() 84 key = &tx->key->conf.key[NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY]; in ieee80211_tx_h_michael_mic_add() 85 michael_mic(key, hdr, data, data_len, mic); in ieee80211_tx_h_michael_mic_add() 96 u8 *data, *key = NULL; in ieee80211_rx_h_michael_mic_verify() local 121 if (!(status->flag & RX_FLAG_IV_STRIPPED) && rx->key && in ieee80211_rx_h_michael_mic_verify() 122 rx->key->conf.cipher == WLAN_CIPHER_SUITE_TKIP) in ieee80211_rx_h_michael_mic_verify() 133 if (!rx->key || rx->key->conf.cipher != WLAN_CIPHER_SUITE_TKIP || in ieee80211_rx_h_michael_mic_verify() [all …]
|
D | wep.c | 96 struct ieee80211_key *key) in ieee80211_wep_remove_iv() argument 135 const u8 *key, int keylen, int keyidx) in ieee80211_wep_encrypt() argument 154 memcpy(rc4key + 3, key, keylen); in ieee80211_wep_encrypt() 195 struct ieee80211_key *key) in ieee80211_wep_decrypt() argument 216 if (!key || keyidx != key->conf.keyidx) in ieee80211_wep_decrypt() 219 klen = 3 + key->conf.keylen; in ieee80211_wep_decrypt() 225 memcpy(rc4key + 3, key->conf.key, key->conf.keylen); in ieee80211_wep_decrypt() 256 if (ieee80211_wep_decrypt(rx->local, rx->skb, rx->key)) in ieee80211_crypto_wep_decrypt() 262 ieee80211_wep_remove_iv(rx->local, rx->skb, rx->key); in ieee80211_crypto_wep_decrypt() 278 if (ieee80211_wep_encrypt(tx->local, skb, tx->key->conf.key, in wep_encrypt_skb() [all …]
|
/net/openvswitch/ |
D | flow.c | 242 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 …]
|
D | actions.c | 71 struct sw_flow_key key[OVS_DEFERRED_ACTION_THRESHOLD]; member 85 struct sw_flow_key *key = NULL; in clone_key() local 88 key = &keys->key[level - 1]; in clone_key() 89 *key = *key_; in clone_key() 92 return key; in clone_key() 124 const struct sw_flow_key *key, in add_deferred_actions() argument 137 da->pkt_key = *key; in add_deferred_actions() 143 static void invalidate_flow_key(struct sw_flow_key *key) in invalidate_flow_key() argument 145 key->mac_proto |= SW_FLOW_KEY_INVALID; in invalidate_flow_key() 148 static bool is_flow_key_valid(const struct sw_flow_key *key) in is_flow_key_valid() argument [all …]
|
D | conntrack.h | 26 int ovs_ct_clear(struct sk_buff *skb, struct sw_flow_key *key); 28 void ovs_ct_fill_key(const struct sk_buff *skb, struct sw_flow_key *key); 50 const struct sw_flow_key *key, in ovs_ct_copy_action() argument 63 struct sw_flow_key *key, in ovs_ct_execute() argument 71 struct sw_flow_key *key) in ovs_ct_clear() argument 77 struct sw_flow_key *key) in ovs_ct_fill_key() argument 79 key->ct_state = 0; in ovs_ct_fill_key() 80 key->ct_zone = 0; in ovs_ct_fill_key() 81 key->ct.mark = 0; in ovs_ct_fill_key() 82 memset(&key->ct.labels, 0, sizeof(key->ct.labels)); in ovs_ct_fill_key() [all …]
|
D | flow.h | 152 static inline bool sw_flow_key_is_nd(const struct sw_flow_key *key) in sw_flow_key_is_nd() argument 154 return key->eth.type == htons(ETH_P_IPV6) && in sw_flow_key_is_nd() 155 key->ip.proto == NEXTHDR_ICMP && in sw_flow_key_is_nd() 156 key->tp.dst == 0 && in sw_flow_key_is_nd() 157 (key->tp.src == htons(NDISC_NEIGHBOUR_SOLICITATION) || in sw_flow_key_is_nd() 158 key->tp.src == htons(NDISC_NEIGHBOUR_ADVERTISEMENT)); in sw_flow_key_is_nd() 171 struct sw_flow_key key; member 175 struct sw_flow_key *key; member 214 struct sw_flow_key key; member 240 static inline u8 ovs_key_mac_proto(const struct sw_flow_key *key) in ovs_key_mac_proto() argument [all …]
|
D | conntrack.c | 105 static u16 key_to_nfproto(const struct sw_flow_key *key) in key_to_nfproto() argument 107 switch (ntohs(key->eth.type)) { in key_to_nfproto() 175 static void __ovs_ct_update_key_orig_tp(struct sw_flow_key *key, in __ovs_ct_update_key_orig_tp() argument 179 key->ct_orig_proto = orig->dst.protonum; in __ovs_ct_update_key_orig_tp() 181 key->ct.orig_tp.src = htons(orig->dst.u.icmp.type); in __ovs_ct_update_key_orig_tp() 182 key->ct.orig_tp.dst = htons(orig->dst.u.icmp.code); in __ovs_ct_update_key_orig_tp() 184 key->ct.orig_tp.src = orig->src.u.all; in __ovs_ct_update_key_orig_tp() 185 key->ct.orig_tp.dst = orig->dst.u.all; in __ovs_ct_update_key_orig_tp() 189 static void __ovs_ct_update_key(struct sw_flow_key *key, u8 state, in __ovs_ct_update_key() argument 193 key->ct_state = state; in __ovs_ct_update_key() [all …]
|
D | flow_netlink.c | 117 sizeof((match)->key->field), is_mask); \ 119 (match)->mask->key.field = value; \ 121 (match)->key->field = value; \ 128 memcpy((u8 *)&(match)->mask->key + offset, value_p, \ 131 memcpy((u8 *)(match)->key + offset, value_p, len); \ 141 sizeof((match)->key->field), is_mask); \ 143 memset((u8 *)&(match)->mask->key.field, value, \ 144 sizeof((match)->mask->key.field)); \ 146 memset((u8 *)&(match)->key->field, value, \ 147 sizeof((match)->key->field)); \ [all …]
|
/net/ceph/ |
D | crypto.c | 23 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 …]
|
D | ceph_common.c | 155 if (opt1->key && !opt2->key) in ceph_compare_options() 157 if (!opt1->key && opt2->key) in ceph_compare_options() 159 if (opt1->key && opt2->key) { in ceph_compare_options() 160 if (opt1->key->type != opt2->key->type) in ceph_compare_options() 162 if (opt1->key->created.tv_sec != opt2->key->created.tv_sec) in ceph_compare_options() 164 if (opt1->key->created.tv_nsec != opt2->key->created.tv_nsec) in ceph_compare_options() 166 if (opt1->key->len != opt2->key->len) in ceph_compare_options() 168 if (opt1->key->key && !opt2->key->key) in ceph_compare_options() 170 if (!opt1->key->key && opt2->key->key) in ceph_compare_options() 172 if (opt1->key->key && opt2->key->key) { in ceph_compare_options() [all …]
|
/net/sched/ |
D | cls_flower.c | 73 struct fl_flow_key key; member 108 struct fl_flow_key key; member 125 .key_offset = offsetof(struct fl_flow_mask, key), 138 const u8 *bytes = (const u8 *) &mask->key; in fl_mask_update_range() 139 size_t size = sizeof(mask->key); in fl_mask_update_range() 159 static void *fl_key_get_start(struct fl_flow_key *key, in fl_key_get_start() argument 162 return (u8 *) key + mask->range.start; in fl_key_get_start() 165 static void fl_set_masked_key(struct fl_flow_key *mkey, struct fl_flow_key *key, in fl_set_masked_key() argument 168 const long *lkey = fl_key_get_start(key, mask); in fl_set_masked_key() 169 const long *lmask = fl_key_get_start(&mask->key, mask); in fl_set_masked_key() [all …]
|
/net/mac802154/ |
D | llsec.c | 21 static void llsec_key_put(struct mac802154_llsec_key *key); 45 struct ieee802154_llsec_key_entry *key, *kn; in mac802154_llsec_destroy() local 63 list_for_each_entry_safe(key, kn, &sec->table.keys, list) { in mac802154_llsec_destroy() 66 mkey = container_of(key->key, struct mac802154_llsec_key, key); in mac802154_llsec_destroy() 67 list_del(&key->list); in mac802154_llsec_destroy() 69 kzfree(key); in mac802154_llsec_destroy() 117 struct mac802154_llsec_key *key; in llsec_key_alloc() local 120 key = kzalloc(sizeof(*key), GFP_KERNEL); in llsec_key_alloc() 121 if (!key) in llsec_key_alloc() 124 kref_init(&key->ref); in llsec_key_alloc() [all …]
|
/net/wireless/ |
D | lib80211_crypt_ccmp.c | 40 u8 key[CCMP_TK_LEN]; member 156 struct lib80211_ccmp_data *key = priv; in lib80211_ccmp_hdr() local 164 memcpy(aeskey, key->key, CCMP_TK_LEN); in lib80211_ccmp_hdr() 172 key->tx_pn[i]++; in lib80211_ccmp_hdr() 173 if (key->tx_pn[i] != 0) in lib80211_ccmp_hdr() 178 *pos++ = key->tx_pn[5]; in lib80211_ccmp_hdr() 179 *pos++ = key->tx_pn[4]; in lib80211_ccmp_hdr() 181 *pos++ = (key->key_idx << 6) | (1 << 5) /* Ext IV included */ ; in lib80211_ccmp_hdr() 182 *pos++ = key->tx_pn[3]; in lib80211_ccmp_hdr() 183 *pos++ = key->tx_pn[2]; in lib80211_ccmp_hdr() [all …]
|
D | lib80211_crypt_wep.c | 32 u8 key[WEP_KEY_LEN + 1]; member 64 u8 *key, int keylen, void *priv) in lib80211_wep_build_iv() argument 110 u8 key[WEP_KEY_LEN + 3]; in lib80211_wep_encrypt() local 121 skb_copy_from_linear_data_offset(skb, hdr_len, key, 3); in lib80211_wep_encrypt() 124 memcpy(key + 3, wep->key, wep->key_len); in lib80211_wep_encrypt() 138 arc4_setkey(&wep->tx_ctx, key, klen); in lib80211_wep_encrypt() 155 u8 key[WEP_KEY_LEN + 3]; in lib80211_wep_decrypt() local 162 key[0] = *pos++; in lib80211_wep_decrypt() 163 key[1] = *pos++; in lib80211_wep_decrypt() 164 key[2] = *pos++; in lib80211_wep_decrypt() [all …]
|
/net/sunrpc/auth_gss/ |
D | gss_krb5_keys.c | 246 static void mit_des_fixup_key_parity(u8 key[8]) in mit_des_fixup_key_parity() 250 key[i] &= 0xfe; in mit_des_fixup_key_parity() 251 key[i] |= 1^parity_char(key[i]); in mit_des_fixup_key_parity() 260 struct xdr_netobj *key) in gss_krb5_des3_make_key() argument 265 if (key->len != 24) { in gss_krb5_des3_make_key() 266 dprintk("%s: key->len is %d\n", __func__, key->len); in gss_krb5_des3_make_key() 279 memcpy(key->data + i*8, randombits->data + i*7, 7); in gss_krb5_des3_make_key() 280 key->data[i*8+7] = (((key->data[i*8]&1)<<1) | in gss_krb5_des3_make_key() 281 ((key->data[i*8+1]&1)<<2) | in gss_krb5_des3_make_key() 282 ((key->data[i*8+2]&1)<<3) | in gss_krb5_des3_make_key() [all …]
|
/net/sctp/ |
D | auth.c | 46 void sctp_auth_key_put(struct sctp_auth_bytes *key) in sctp_auth_key_put() argument 48 if (!key) in sctp_auth_key_put() 51 if (refcount_dec_and_test(&key->refcnt)) { in sctp_auth_key_put() 52 kzfree(key); in sctp_auth_key_put() 60 struct sctp_auth_bytes *key; in sctp_auth_create_key() local 67 key = kmalloc(sizeof(struct sctp_auth_bytes) + key_len, gfp); in sctp_auth_create_key() 68 if (!key) in sctp_auth_create_key() 71 key->len = key_len; in sctp_auth_create_key() 72 refcount_set(&key->refcnt, 1); in sctp_auth_create_key() 75 return key; in sctp_auth_create_key() [all …]
|
/net/ipv4/ |
D | fib_trie.c | 121 t_key key; member 218 #define get_cindex(key, kv) (((key) ^ (kv)->key) >> (kv)->pos) argument 220 static inline unsigned long get_index(t_key key, struct key_vector *kv) in get_index() argument 222 unsigned long index = key ^ kv->key; in get_index() 355 static struct key_vector *leaf_new(t_key key, struct fib_alias *fa) in leaf_new() argument 366 l->key = key; in leaf_new() 378 static struct key_vector *tnode_new(t_key key, int pos, int bits) in tnode_new() argument 400 tn->key = (shift < KEYLENGTH) ? (key >> shift) << shift : 0; in tnode_new() 470 static inline void put_child_root(struct key_vector *tp, t_key key, in put_child_root() argument 476 put_child(tp, get_index(key, tp), n); in put_child_root() [all …]
|
D | ip_tunnel_core.c | 138 dst->key.tun_id = src->key.tun_id; in iptunnel_metadata_reply() 140 memcpy(&dst->key.u.ipv6.dst, &src->key.u.ipv6.src, in iptunnel_metadata_reply() 143 dst->key.u.ipv4.dst = src->key.u.ipv4.src; in iptunnel_metadata_reply() 144 dst->key.tun_flags = src->key.tun_flags; in iptunnel_metadata_reply() 254 tun_info->key.tun_id = nla_get_be64(tb[LWTUNNEL_IP_ID]); in ip_tun_build_state() 257 tun_info->key.u.ipv4.dst = nla_get_in_addr(tb[LWTUNNEL_IP_DST]); in ip_tun_build_state() 260 tun_info->key.u.ipv4.src = nla_get_in_addr(tb[LWTUNNEL_IP_SRC]); in ip_tun_build_state() 263 tun_info->key.ttl = nla_get_u8(tb[LWTUNNEL_IP_TTL]); in ip_tun_build_state() 266 tun_info->key.tos = nla_get_u8(tb[LWTUNNEL_IP_TOS]); in ip_tun_build_state() 269 tun_info->key.tun_flags = nla_get_be16(tb[LWTUNNEL_IP_FLAGS]); in ip_tun_build_state() [all …]
|
D | tcp_diag.c | 39 const struct tcp_md5sig_key *key) in tcp_diag_md5sig_fill() argument 41 info->tcpm_family = key->family; in tcp_diag_md5sig_fill() 42 info->tcpm_prefixlen = key->prefixlen; in tcp_diag_md5sig_fill() 43 info->tcpm_keylen = key->keylen; in tcp_diag_md5sig_fill() 44 memcpy(info->tcpm_key, key->key, key->keylen); in tcp_diag_md5sig_fill() 46 if (key->family == AF_INET) in tcp_diag_md5sig_fill() 47 info->tcpm_addr[0] = key->addr.a4.s_addr; in tcp_diag_md5sig_fill() 49 else if (key->family == AF_INET6) in tcp_diag_md5sig_fill() 50 memcpy(&info->tcpm_addr, &key->addr.a6, in tcp_diag_md5sig_fill() 58 const struct tcp_md5sig_key *key; in tcp_diag_put_md5sig() local [all …]
|
/net/rxrpc/ |
D | key.c | 31 static void rxrpc_destroy(struct key *); 32 static void rxrpc_destroy_s(struct key *); 33 static void rxrpc_describe(const struct key *, struct seq_file *); 34 static long rxrpc_read(const struct key *, char __user *, size_t); 872 static void rxrpc_destroy(struct key *key) in rxrpc_destroy() argument 874 rxrpc_free_token_list(key->payload.data[0]); in rxrpc_destroy() 880 static void rxrpc_destroy_s(struct key *key) in rxrpc_destroy_s() argument 882 if (key->payload.data[0]) { in rxrpc_destroy_s() 883 crypto_free_skcipher(key->payload.data[0]); in rxrpc_destroy_s() 884 key->payload.data[0] = NULL; in rxrpc_destroy_s() [all …]
|
/net/netfilter/ |
D | nft_tunnel.c | 16 enum nft_tunnel_keys key:8; member 31 switch (priv->key) { in nft_tunnel_get_eval() 56 *dest = ntohl(tunnel_id_to_key32(tun_info->key.tun_id)); in nft_tunnel_get_eval() 83 priv->key = ntohl(nla_get_be32(tb[NFTA_TUNNEL_KEY])); in nft_tunnel_get_init() 84 switch (priv->key) { in nft_tunnel_get_init() 114 if (nla_put_be32(skb, NFTA_TUNNEL_KEY, htonl(priv->key))) in nft_tunnel_get_dump() 178 info->key.u.ipv4.src = nla_get_be32(tb[NFTA_TUNNEL_KEY_IP_SRC]); in nft_tunnel_obj_ip_init() 180 info->key.u.ipv4.dst = nla_get_be32(tb[NFTA_TUNNEL_KEY_IP_DST]); in nft_tunnel_obj_ip_init() 207 memcpy(&info->key.u.ipv6.src, in nft_tunnel_obj_ip6_init() 212 memcpy(&info->key.u.ipv6.dst, in nft_tunnel_obj_ip6_init() [all …]
|
/net/core/ |
D | sock_map.c | 264 static struct sock *__sock_map_lookup_elem(struct bpf_map *map, u32 key) in __sock_map_lookup_elem() argument 270 if (unlikely(key >= map->max_entries)) in __sock_map_lookup_elem() 272 return READ_ONCE(stab->sks[key]); in __sock_map_lookup_elem() 275 static void *sock_map_lookup(struct bpf_map *map, void *key) in sock_map_lookup() argument 308 static int sock_map_delete_elem(struct bpf_map *map, void *key) in sock_map_delete_elem() argument 311 u32 i = *(u32 *)key; in sock_map_delete_elem() 321 static int sock_map_get_next_key(struct bpf_map *map, void *key, void *next) in sock_map_get_next_key() argument 324 u32 i = key ? *(u32 *)key : U32_MAX; in sock_map_get_next_key() 402 static int sock_map_update_elem(struct bpf_map *map, void *key, in sock_map_update_elem() argument 406 u32 idx = *(u32 *)key; in sock_map_update_elem() [all …]
|