/net/ceph/ |
D | cls_lock_client.c | 36 void *p, *end; in ceph_cls_lock() local 57 end = p + lock_op_buf_size; in ceph_cls_lock() 62 ceph_encode_string(&p, end, lock_name, name_len); in ceph_cls_lock() 64 ceph_encode_string(&p, end, cookie, cookie_len); in ceph_cls_lock() 65 ceph_encode_string(&p, end, tag, tag_len); in ceph_cls_lock() 66 ceph_encode_string(&p, end, desc, desc_len); in ceph_cls_lock() 101 void *p, *end; in ceph_cls_unlock() local 116 end = p + unlock_op_buf_size; in ceph_cls_unlock() 121 ceph_encode_string(&p, end, lock_name, name_len); in ceph_cls_unlock() 122 ceph_encode_string(&p, end, cookie, cookie_len); in ceph_cls_unlock() [all …]
|
D | osdmap.c | 55 static int crush_decode_uniform_bucket(void **p, void *end, in crush_decode_uniform_bucket() argument 58 dout("crush_decode_uniform_bucket %p to %p\n", *p, end); in crush_decode_uniform_bucket() 59 ceph_decode_need(p, end, (1+b->h.size) * sizeof(u32), bad); in crush_decode_uniform_bucket() 66 static int crush_decode_list_bucket(void **p, void *end, in crush_decode_list_bucket() argument 70 dout("crush_decode_list_bucket %p to %p\n", *p, end); in crush_decode_list_bucket() 77 ceph_decode_need(p, end, 2 * b->h.size * sizeof(u32), bad); in crush_decode_list_bucket() 87 static int crush_decode_tree_bucket(void **p, void *end, in crush_decode_tree_bucket() argument 91 dout("crush_decode_tree_bucket %p to %p\n", *p, end); in crush_decode_tree_bucket() 92 ceph_decode_8_safe(p, end, b->num_nodes, bad); in crush_decode_tree_bucket() 96 ceph_decode_need(p, end, b->num_nodes * sizeof(u32), bad); in crush_decode_tree_bucket() [all …]
|
D | decode.c | 10 ceph_decode_entity_addr_versioned(void **p, void *end, in ceph_decode_entity_addr_versioned() argument 18 ret = ceph_start_decoding(p, end, 1, "entity_addr_t", &struct_v, in ceph_decode_entity_addr_versioned() 26 ceph_decode_copy_safe(p, end, &addr->type, sizeof(addr->type), bad); in ceph_decode_entity_addr_versioned() 28 ceph_decode_copy_safe(p, end, &addr->nonce, sizeof(addr->nonce), bad); in ceph_decode_entity_addr_versioned() 30 ceph_decode_32_safe(p, end, addr_len, bad); in ceph_decode_entity_addr_versioned() 36 ceph_decode_copy_safe(p, end, &addr->in_addr, addr_len, bad); in ceph_decode_entity_addr_versioned() 50 ceph_decode_entity_addr_legacy(void **p, void *end, in ceph_decode_entity_addr_legacy() argument 56 ceph_decode_skip_n(p, end, 3, bad); in ceph_decode_entity_addr_legacy() 63 ceph_decode_copy_safe(p, end, &addr->nonce, sizeof(addr->nonce), bad); in ceph_decode_entity_addr_legacy() 65 ceph_decode_copy_safe(p, end, &addr->in_addr, in ceph_decode_entity_addr_legacy() [all …]
|
D | auth.c | 105 int ceph_auth_entity_name_encode(const char *name, void **p, void *end) in ceph_auth_entity_name_encode() argument 109 if (*p + 2*sizeof(u32) + len > end) in ceph_auth_entity_name_encode() 124 void *p = monhdr + 1, *end = buf + len, *lenp; in ceph_auth_build_hello() local 139 ceph_decode_need(&p, end, 1 + sizeof(u32), bad); in ceph_auth_build_hello() 143 ceph_decode_need(&p, end, num * sizeof(u32), bad); in ceph_auth_build_hello() 147 ret = ceph_auth_entity_name_encode(ac->name, &p, end); in ceph_auth_build_hello() 150 ceph_decode_need(&p, end, sizeof(u64), bad); in ceph_auth_build_hello() 167 void *end = buf + buf_len; in build_request() local 174 ceph_encode_64_safe(&p, end, 0, e_range); in build_request() 175 ceph_encode_16_safe(&p, end, -1, e_range); in build_request() [all …]
|
D | auth_x.c | 97 static int ceph_x_decrypt(struct ceph_crypto_key *secret, void **p, void *end) in ceph_x_decrypt() argument 102 ceph_decode_32_safe(p, end, ciphertext_len, e_inval); in ceph_x_decrypt() 103 ceph_decode_need(p, end, ciphertext_len, e_inval); in ceph_x_decrypt() 162 void **p, void *end) in process_one_ticket() argument 180 ceph_decode_need(p, end, sizeof(u32) + 1, bad); in process_one_ticket() 197 ret = ceph_x_decrypt(secret, p, end); in process_one_ticket() 220 ceph_decode_8_safe(p, end, is_enc, bad); in process_one_ticket() 224 ret = ceph_x_decrypt(&th->session_key, p, end); in process_one_ticket() 233 tpend = end; in process_one_ticket() 272 void **p, void *end) in ceph_x_proc_ticket_reply() argument [all …]
|
D | armor.c | 5 int ceph_armor(char *dst, const char *src, const char *end); 6 int ceph_unarmor(char *dst, const char *src, const char *end); 37 int ceph_armor(char *dst, const char *src, const char *end) in ceph_armor() argument 42 while (src < end) { in ceph_armor() 47 if (src < end) { in ceph_armor() 50 if (src < end) { in ceph_armor() 75 int ceph_unarmor(char *dst, const char *src, const char *end) in ceph_unarmor() argument 79 while (src < end) { in ceph_unarmor() 86 if (src + 4 > end) in ceph_unarmor()
|
D | auth_none.c | 46 void *const end = p + sizeof(au->buf); in ceph_auth_none_build_authorizer() local 49 ceph_encode_8_safe(&p, end, 1, e_range); in ceph_auth_none_build_authorizer() 50 ret = ceph_auth_entity_name_encode(ac->name, &p, end); in ceph_auth_none_build_authorizer() 54 ceph_encode_64_safe(&p, end, ac->global_id, e_range); in ceph_auth_none_build_authorizer() 63 static int build_request(struct ceph_auth_client *ac, void *buf, void *end) in build_request() argument 73 void *buf, void *end, u8 *session_key, in handle_reply() argument
|
D | osd_client.c | 1767 static int decode_hoid(void **p, void *end, struct ceph_hobject_id *hoid) in decode_hoid() argument 1773 ret = ceph_start_decoding(p, end, 4, "hobject_t", &struct_v, in decode_hoid() 1783 hoid->key = ceph_extract_encoded_string(p, end, &hoid->key_len, in decode_hoid() 1791 hoid->oid = ceph_extract_encoded_string(p, end, &hoid->oid_len, in decode_hoid() 1799 ceph_decode_64_safe(p, end, hoid->snapid, e_inval); in decode_hoid() 1800 ceph_decode_32_safe(p, end, hoid->hash, e_inval); in decode_hoid() 1801 ceph_decode_8_safe(p, end, hoid->is_max, e_inval); in decode_hoid() 1803 hoid->nspace = ceph_extract_encoded_string(p, end, &hoid->nspace_len, in decode_hoid() 1811 ceph_decode_64_safe(p, end, hoid->pool, e_inval); in decode_hoid() 1826 static void encode_hoid(void **p, void *end, const struct ceph_hobject_id *hoid) in encode_hoid() argument [all …]
|
D | crypto.h | 24 int ceph_crypto_key_encode(struct ceph_crypto_key *key, void **p, void *end); 25 int ceph_crypto_key_decode(struct ceph_crypto_key *key, void **p, void *end); 36 int ceph_armor(char *dst, const char *src, const char *end); 37 int ceph_unarmor(char *dst, const char *src, const char *end);
|
D | messenger_v2.c | 922 void *end = buf + buf_len; in init_sgs() local 934 len = min_t(int, end - p, PAGE_SIZE); in init_sgs() 939 } while (p != end); in init_sgs() 1844 void *end = con->v2.in_kvecs[0].iov_base + con->v2.in_kvecs[0].iov_len; in process_banner_payload() local 1852 ceph_decode_64_safe(&p, end, server_feat, bad); in process_banner_payload() 1853 ceph_decode_64_safe(&p, end, server_req_feat, bad); in process_banner_payload() 1887 static int process_hello(struct ceph_connection *con, void *p, void *end) in process_hello() argument 1899 ceph_decode_8_safe(&p, end, entity_type, bad); in process_hello() 1900 ret = ceph_decode_entity_addr(&p, end, &addr_for_me); in process_hello() 1955 void *p, void *end) in process_auth_bad_method() argument [all …]
|
D | mon_client.c | 39 static int decode_mon_info(void **p, void *end, bool msgr2, in decode_mon_info() argument 47 ret = ceph_start_decoding(p, end, 1, "mon_info_t", &struct_v, in decode_mon_info() 53 ceph_decode_skip_string(p, end, e_inval); /* skip mon name */ in decode_mon_info() 54 ret = ceph_decode_entity_addrvec(p, end, msgr2, addr); in decode_mon_info() 70 static struct ceph_monmap *ceph_monmap_decode(void **p, void *end, bool msgr2) in ceph_monmap_decode() argument 82 ceph_decode_32_safe(p, end, blob_len, e_inval); in ceph_monmap_decode() 83 ceph_decode_need(p, end, blob_len, e_inval); in ceph_monmap_decode() 85 ret = ceph_start_decoding(p, end, 6, "monmap", &struct_v, &struct_len); in ceph_monmap_decode() 90 ceph_decode_copy_safe(p, end, &fsid, sizeof(fsid), e_inval); in ceph_monmap_decode() 91 ceph_decode_32_safe(p, end, epoch, e_inval); in ceph_monmap_decode() [all …]
|
/net/sunrpc/auth_gss/ |
D | gss_krb5_mech.c | 149 get_key(const void *p, const void *end, in get_key() argument 155 p = simple_get_bytes(p, end, &alg, sizeof(alg)); in get_key() 174 p = simple_get_netobj(p, end, &key); in get_key() 204 gss_import_v1_context(const void *p, const void *end, struct krb5_ctx *ctx) in gss_import_v1_context() argument 210 p = simple_get_bytes(p, end, &ctx->initiate, sizeof(ctx->initiate)); in gss_import_v1_context() 227 if (unlikely(p + 20 > end || p + 20 < p)) { in gss_import_v1_context() 232 p = simple_get_bytes(p, end, &tmp, sizeof(tmp)); in gss_import_v1_context() 239 p = simple_get_bytes(p, end, &tmp, sizeof(tmp)); in gss_import_v1_context() 246 p = simple_get_bytes(p, end, &time32, sizeof(time32)); in gss_import_v1_context() 251 p = simple_get_bytes(p, end, &seq_send, sizeof(seq_send)); in gss_import_v1_context() [all …]
|
D | auth_gss_internal.h | 16 simple_get_bytes(const void *p, const void *end, void *res, size_t len) in simple_get_bytes() argument 19 if (unlikely(q > end || q < p)) in simple_get_bytes() 26 simple_get_netobj(const void *p, const void *end, struct xdr_netobj *dest) in simple_get_netobj() argument 31 p = simple_get_bytes(p, end, &len, sizeof(len)); in simple_get_netobj() 35 if (unlikely(q > end || q < p)) in simple_get_netobj()
|
/net/ipv6/ |
D | calipso.c | 847 unsigned int *end) in calipso_opt_find() argument 886 *end = offset_e + calipso_tlv_len(hop, offset_e); in calipso_opt_find() 888 *end = opt_len; in calipso_opt_find() 912 unsigned int start, end, buf_len, pad, hop_len; in calipso_opt_insert() local 918 ret_val = calipso_opt_find(hop, &start, &end); in calipso_opt_insert() 924 end = 0; in calipso_opt_insert() 927 buf_len = hop_len + start - end + CALIPSO_OPT_LEN_MAX_WITH_PAD; in calipso_opt_insert() 943 pad = ((buf_len & 4) + (end & 7)) & 7; in calipso_opt_insert() 947 if (end != hop_len) { in calipso_opt_insert() 948 memcpy((char *)new + buf_len, (char *)hop + end, hop_len - end); in calipso_opt_insert() [all …]
|
D | reassembly.c | 111 int offset, end, fragsize; in ip6_frag_queue() local 122 end = offset + (ntohs(ipv6_hdr(skb)->payload_len) - in ip6_frag_queue() 125 if ((unsigned int)end > IPV6_MAXPLEN) { in ip6_frag_queue() 147 if (end < fq->q.len || in ip6_frag_queue() 148 ((fq->q.flags & INET_FRAG_LAST_IN) && end != fq->q.len)) in ip6_frag_queue() 151 fq->q.len = end; in ip6_frag_queue() 156 if (end & 0x7) { in ip6_frag_queue() 163 if (end > fq->q.len) { in ip6_frag_queue() 167 fq->q.len = end; in ip6_frag_queue() 171 if (end == offset) in ip6_frag_queue() [all …]
|
/net/netfilter/ |
D | nf_conntrack_sip.c | 147 const char *end; in sip_parse_addr() local 156 ret = in4_pton(cp, limit - cp, (u8 *)&addr->ip, -1, &end); in sip_parse_addr() 166 ret = in6_pton(cp, limit - cp, (u8 *)&addr->ip6, -1, &end); in sip_parse_addr() 170 if (end < limit && *end == ']') in sip_parse_addr() 171 end++; in sip_parse_addr() 180 *endp = end; in sip_parse_addr() 242 const char *start = dptr, *limit = dptr + datalen, *end; in ct_sip_parse_request() local 268 if (!sip_parse_addr(ct, dptr, &end, addr, limit, true)) in ct_sip_parse_request() 270 if (end < limit && *end == ':') { in ct_sip_parse_request() 271 end++; in ct_sip_parse_request() [all …]
|
/net/sctp/ |
D | tsnmap.c | 31 __u16 len, __u16 *start, __u16 *end); 154 __u16 *start, __u16 *end) in sctp_tsnmap_next_gap_ack() argument 179 *end = end_ + 1; in sctp_tsnmap_next_gap_ack() 182 iter->start = map->cumulative_tsn_ack_point + *end + 1; in sctp_tsnmap_next_gap_ack() 273 __u16 len, __u16 *start, __u16 *end) in sctp_tsnmap_find_gap_ack() argument 295 *end = i - 1; in sctp_tsnmap_find_gap_ack() 325 __u16 start = 0, end = 0; in sctp_tsnmap_num_gabs() local 329 &end)) { in sctp_tsnmap_num_gabs() 332 gabs[ngaps].end = htons(end); in sctp_tsnmap_num_gabs()
|
/net/core/ |
D | datagram.c | 436 int end; in __skb_datagram_iter() local 441 end = start + skb_frag_size(frag); in __skb_datagram_iter() 442 if ((copy = end - offset) > 0) { in __skb_datagram_iter() 458 start = end; in __skb_datagram_iter() 462 int end; in __skb_datagram_iter() local 466 end = start + frag_iter->len; in __skb_datagram_iter() 467 if ((copy = end - offset) > 0) { in __skb_datagram_iter() 477 start = end; in __skb_datagram_iter() 568 int end; in skb_copy_datagram_from_iter() local 573 end = start + skb_frag_size(frag); in skb_copy_datagram_from_iter() [all …]
|
D | skmsg.c | 14 if (msg->sg.end > msg->sg.start && in sk_msg_try_coalesce_ok() 15 elem_first_coalesce < msg->sg.end) in sk_msg_try_coalesce_ok() 18 if (msg->sg.end < msg->sg.start && in sk_msg_try_coalesce_ok() 20 elem_first_coalesce < msg->sg.end)) in sk_msg_try_coalesce_ok() 51 i = msg->sg.end; in sk_msg_alloc() 65 sge = &msg->sg.data[msg->sg.end]; in sk_msg_alloc() 69 sk_msg_iter_next(msg, end); in sk_msg_alloc() 99 if (i == src->sg.end && off) in sk_msg_clone() 109 if (dst->sg.end) in sk_msg_clone() 110 sgd = sk_msg_elem(dst, dst->sg.end - 1); in sk_msg_clone() [all …]
|
/net/ipv4/ |
D | bpf_tcp_ca.c | 107 size_t end; in bpf_tcp_ca_btf_struct_access() local 119 end = offsetofend(struct inet_connection_sock, icsk_ca_priv); in bpf_tcp_ca_btf_struct_access() 122 end = offsetofend(struct inet_connection_sock, in bpf_tcp_ca_btf_struct_access() 126 end = offsetofend(struct tcp_sock, snd_cwnd); in bpf_tcp_ca_btf_struct_access() 129 end = offsetofend(struct tcp_sock, snd_cwnd_cnt); in bpf_tcp_ca_btf_struct_access() 132 end = offsetofend(struct tcp_sock, snd_ssthresh); in bpf_tcp_ca_btf_struct_access() 135 end = offsetofend(struct tcp_sock, ecn_flags); in bpf_tcp_ca_btf_struct_access() 142 if (off + size > end) { in bpf_tcp_ca_btf_struct_access() 145 off, size, end); in bpf_tcp_ca_btf_struct_access()
|
D | ip_fragment.c | 229 unsigned int start, end; in ip_frag_too_far() local 237 end = atomic_inc_return(&peer->rid); in ip_frag_too_far() 238 qp->rid = end; in ip_frag_too_far() 240 rc = qp->q.fragments_tail && (end - start) > max; in ip_frag_too_far() 276 int ihl, end, flags, offset; in ip_frag_queue() local 301 end = offset + skb->len - skb_network_offset(skb) - ihl; in ip_frag_queue() 309 if (end < qp->q.len || in ip_frag_queue() 310 ((qp->q.flags & INET_FRAG_LAST_IN) && end != qp->q.len)) in ip_frag_queue() 313 qp->q.len = end; in ip_frag_queue() 315 if (end&7) { in ip_frag_queue() [all …]
|
/net/ipv6/netfilter/ |
D | nf_conntrack_reasm.c | 172 int offset, end, err; in nf_ct_frag6_queue() local 183 end = offset + (payload_len - in nf_ct_frag6_queue() 186 if ((unsigned int)end > IPV6_MAXPLEN) { in nf_ct_frag6_queue() 205 if (end < fq->q.len || in nf_ct_frag6_queue() 206 ((fq->q.flags & INET_FRAG_LAST_IN) && end != fq->q.len)) { in nf_ct_frag6_queue() 211 fq->q.len = end; in nf_ct_frag6_queue() 216 if (end & 0x7) { in nf_ct_frag6_queue() 224 if (end > fq->q.len) { in nf_ct_frag6_queue() 230 fq->q.len = end; in nf_ct_frag6_queue() 234 if (end == offset) in nf_ct_frag6_queue() [all …]
|
/net/netfilter/ipvs/ |
D | ip_vs_ftp.c | 100 __u16 af, char **start, char **end) in ip_vs_ftp_get_addrport() argument 161 *end = data; in ip_vs_ftp_get_addrport() 229 *end = s; in ip_vs_ftp_get_addrport() 253 char *start, *end; in ip_vs_ftp_out() local 285 &start, &end) != 1) in ip_vs_ftp_out() 306 &start, &end) != 1) in ip_vs_ftp_out() 377 end - start, in ip_vs_ftp_out() 423 char *start, *end; in ip_vs_ftp_in() local 497 &start, &end) == 1) { in ip_vs_ftp_in() 511 &start, &end) == 1) { in ip_vs_ftp_in()
|
/net/ethtool/ |
D | bitset.c | 34 static void ethnl_bitmap32_clear(u32 *dst, unsigned int start, unsigned int end, in ethnl_bitmap32_clear() argument 38 unsigned int end_word = end / 32; in ethnl_bitmap32_clear() 42 if (end <= start) in ethnl_bitmap32_clear() 48 mask &= ethnl_lower_bits(end); in ethnl_bitmap32_clear() 68 if (end % 32) { in ethnl_bitmap32_clear() 69 mask = ethnl_lower_bits(end); in ethnl_bitmap32_clear() 87 unsigned int end) in ethnl_bitmap32_not_zero() argument 90 unsigned int end_word = end / 32; in ethnl_bitmap32_not_zero() 93 if (end <= start) in ethnl_bitmap32_not_zero() 99 mask &= ethnl_lower_bits(end); in ethnl_bitmap32_not_zero() [all …]
|
/net/rose/ |
D | rose_out.c | 49 unsigned short start, end; in rose_kick() local 61 end = (rose->va + sysctl_rose_window_size) % ROSE_MODULUS; in rose_kick() 63 if (start == end) in rose_kick() 95 } while (rose->vs != end && in rose_kick()
|