| /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 | 1091 /* bpf_dynptr_slice()s are read-only and cannot be written to */ 1102 hdr = bpf_dynptr_slice(&ptr, 0, buffer, sizeof(buffer)); in skb_invalid_data_slice1() 1112 /* bpf_dynptr_slice()s are read-only and cannot be written to */ in skb_invalid_data_slice1() 1122 md = bpf_dynptr_slice(&meta, 0, NULL, sizeof(*md)); in skb_invalid_data_slice2() 1143 hdr = bpf_dynptr_slice(&ptr, 0, buffer, sizeof(buffer)); 1196 hdr = bpf_dynptr_slice(&ptr, 0, buffer, sizeof(buffer)); 1246 d = bpf_dynptr_slice(&data, 0, NULL, sizeof(*d)); 1292 md = bpf_dynptr_slice(&meta, 0, NULL, sizeof(*md)); in uninit_write_into_slot() 1337 md = bpf_dynptr_slice(&meta, 0, NULL, sizeof(*md)); in dynptr_slice_var_len2() 1383 md = bpf_dynptr_slice( in invalid_data_slices() [all...] |
| H A D | verifier_global_subprogs.c | 371 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 | 997 iph = bpf_dynptr_slice(&ptr, off, iph_buf, sizeof(iph_buf)); in xfrm_get_state_xdp() 1002 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 | 2736 __bpf_kfunc void *bpf_dynptr_slice(const struct bpf_dynptr *p, u64 offset, in bpf_dynptr_slice() function 2856 return bpf_dynptr_slice(p, offset, buffer__opt, buffer__szk); in bpf_dynptr_slice_rdwr() 2941 src_slice = bpf_dynptr_slice(src_ptr, src_off, NULL, size); in bpf_dynptr_copy() 4461 BTF_ID_FLAGS(func, bpf_dynptr_slice, KF_RET_NULL) 4588 return bpf_dynptr_slice(p, 0, NULL, len); in __bpf_dynptr_data()
|
| H A D | verifier.c | 12416 BTF_ID(func, bpf_dynptr_slice) in BTF_ID()
|