| /linux/tools/testing/selftests/bpf/progs/ |
| H A D | ip_check_defrag.c | 49 iph = bpf_dynptr_slice(&ptr, 0, iph_buf, sizeof(iph_buf)); in handle_v4() 71 ip6h = bpf_dynptr_slice(&ptr, 0, ip6h_buf, sizeof(ip6h_buf)); in handle_v6()
|
| H A D | verifier_netfilter_ctx.c | 100 iph = bpf_dynptr_slice(&ptr, 0, buffer_iph, sizeof(buffer_iph)); in with_valid_ctx_access_test6() 109 th = bpf_dynptr_slice(&ptr, ihl, buffer_th, sizeof(buffer_th)); in with_valid_ctx_access_test6()
|
| H A D | test_l4lb_noinline_dynptr.c | 242 icmp_hdr = bpf_dynptr_slice(skb_ptr, off, buffer, sizeof(buffer)); in parse_icmpv6() 249 ip6h = bpf_dynptr_slice(skb_ptr, off, buffer, sizeof(buffer)); in parse_icmpv6() 267 icmp_hdr = bpf_dynptr_slice(skb_ptr, off, buffer_icmp, sizeof(buffer_icmp)); in parse_icmp() 274 iph = bpf_dynptr_slice(skb_ptr, off, buffer_ip, sizeof(buffer_ip)); in parse_icmp() 290 udp = bpf_dynptr_slice(skb_ptr, off, buffer, sizeof(buffer)); in parse_udp() 310 tcp = bpf_dynptr_slice(skb_ptr, off, buffer, sizeof(buffer)); in parse_tcp() 354 ip6h = bpf_dynptr_slice(skb_ptr, off, buffer, sizeof(buffer)); in process_packet() 377 iph = bpf_dynptr_slice(skb_ptr, off, buffer, sizeof(buffer)); in process_packet()
|
| H A D | test_xdp_dynptr.c | 99 iph = bpf_dynptr_slice(xdp_ptr, ethhdr_sz, iph_buffer_udp, sizeof(iph_buffer_udp)); in handle_ipv4() 101 iph = bpf_dynptr_slice(xdp_ptr, ethhdr_sz, iph_buffer_tcp, sizeof(iph_buffer_tcp)); in handle_ipv4() 178 ip6h = bpf_dynptr_slice(xdp_ptr, ethhdr_sz, ip6h_buffer_udp, sizeof(ip6h_buffer_udp)); in handle_ipv6() 180 ip6h = bpf_dynptr_slice(xdp_ptr, ethhdr_sz, ip6h_buffer_tcp, sizeof(ip6h_buffer_tcp)); in handle_ipv6() 241 eth = bpf_dynptr_slice(&ptr, 0, buffer, sizeof(buffer)); in _xdp_tx_iptunnel()
|
| H A D | test_parse_tcp_hdr_opt_dynptr.c | 39 data = bpf_dynptr_slice(ptr, *off, buffer, sizeof(buffer)); in parse_hdr_opt() 90 tcp_hdr = bpf_dynptr_slice(&ptr, off, buffer, sizeof(buffer)); in xdp_ingress_v6()
|
| H A D | dynptr_fail.c | 1144 hdr = bpf_dynptr_slice(&ptr, 0, buffer, sizeof(buffer)); in skb_invalid_slice_write() 1164 md = bpf_dynptr_slice(&meta, 0, NULL, sizeof(*md)); in skb_meta_invalid_slice_write() 1185 hdr = bpf_dynptr_slice(&ptr, 0, buffer, sizeof(buffer)); in skb_invalid_data_slice1() 1238 hdr = bpf_dynptr_slice(&ptr, 0, buffer, sizeof(buffer)); in skb_invalid_data_slice3() 1288 d = bpf_dynptr_slice(&data, 0, NULL, sizeof(*d)); in ro_skb_slice_invalid_after_metadata_write() 1334 md = bpf_dynptr_slice(&meta, 0, NULL, sizeof(*md)); in ro_skb_meta_slice_invalid_after_payload_write() 1379 md = bpf_dynptr_slice(&meta, 0, NULL, sizeof(*md)); in ro_skb_meta_slice_invalid_after_payload_helper() 1425 md = bpf_dynptr_slice(&meta, 0, NULL, sizeof(*md)); in ro_skb_meta_slice_invalid_after_metadata_write() 1469 hdr = bpf_dynptr_slice(&ptr, 0, buffer, sizeof(buffer)); in xdp_invalid_data_slice1() 1603 hdr = bpf_dynptr_slice(&ptr, 0, buffer, hdr_size); in dynptr_slice_var_len1() [all …]
|
| H A D | test_xdp_meta.c | 101 src = bpf_dynptr_slice(&data, sizeof(struct ethhdr), NULL, META_SIZE); in ing_cls_dynptr_write() 119 meta_have = bpf_dynptr_slice(&meta, 0, NULL, META_SIZE); in ing_cls_dynptr_slice() 139 src = bpf_dynptr_slice(&data, sizeof(struct ethhdr), NULL, META_SIZE); in ing_cls_dynptr_slice_rdwr() 179 src = bpf_dynptr_slice(&meta, 2 * chunk_len, NULL, chunk_len); in ing_cls_dynptr_offset_rd() 260 p = bpf_dynptr_slice(&meta, META_SIZE, NULL, sizeof(*p)); in ing_cls_dynptr_offset_oob()
|
| H A D | verifier_mem_size_reg.c | 24 p = bpf_dynptr_slice(&dptr, 0, NULL, 8); in dynptr_slice_null_buf_size_precise()
|
| H A D | verifier_map_lookup_refine.c | 40 p = bpf_dynptr_slice(&dptr, 0, inner, 4); in mapofmaps_value_as_kfunc_mem_buf()
|
| H A D | mem_rdonly_untrusted.c | 281 p = bpf_dynptr_slice(&dptr, 0, buf, sizeof(buf)); in mixed_rdonly_mem_btf_id_type()
|
| H A D | verifier_global_subprogs.c | 500 d = bpf_dynptr_slice(dptr, 0, &buf, sizeof(long)); in subprog_dynptr()
|
| H A D | dynptr_success.c | 204 /* This should return NULL. Must use bpf_dynptr_slice API */ in test_dynptr_skb_data() 226 /* This should return NULL. Must use bpf_dynptr_slice API */ in test_adjust() 579 data = bpf_dynptr_slice(&ptr, 0, NULL, 1); in bpf_memcmp() 596 data = bpf_dynptr_slice(&ptr, 0, NULL, 10); in test_dynptr_copy()
|
| H A D | test_tunnel_kern.c | 996 iph = bpf_dynptr_slice(&ptr, off, iph_buf, sizeof(iph_buf)); in xfrm_get_state_xdp() 1001 esph = bpf_dynptr_slice(&ptr, off, esph_buf, sizeof(esph_buf)); in xfrm_get_state_xdp()
|
| /linux/tools/testing/selftests/bpf/ |
| H A D | bpf_kfuncs.h | 31 extern void *bpf_dynptr_slice(const struct bpf_dynptr *ptr, __u64 offset,
|
| /linux/kernel/bpf/ |
| H A D | helpers.c | 3051 __bpf_kfunc void *bpf_dynptr_slice(const struct bpf_dynptr *p, u64 offset, in bpf_dynptr_slice() function 3171 return bpf_dynptr_slice(p, offset, buffer__nullable, buffer__szk); in bpf_dynptr_slice_rdwr() 3256 src_slice = bpf_dynptr_slice(src_ptr, src_off, NULL, size); in bpf_dynptr_copy() 4889 BTF_ID_FLAGS(func, bpf_dynptr_slice, KF_RET_NULL) 5019 return bpf_dynptr_slice(p, 0, NULL, len); in __bpf_dynptr_data()
|
| H A D | verifier.c | 11695 BTF_ID(func, bpf_dynptr_slice) in BTF_ID()
|
| /linux/Documentation/bpf/ |
| H A D | kfuncs.rst | 203 __bpf_kfunc void *bpf_dynptr_slice(..., void *buffer__nullable,
|