Searched refs:bpf_dynptr_slice (Results 1 - 12 of 12) sorted by relevance

/linux-master/tools/testing/selftests/bpf/progs/
H A Dverifier_netfilter_ctx.c84 extern void *bpf_dynptr_slice(const struct bpf_dynptr *ptr, uint32_t offset,
105 iph = bpf_dynptr_slice(&ptr, 0, buffer_iph, sizeof(buffer_iph));
114 th = bpf_dynptr_slice(&ptr, ihl, buffer_th, sizeof(buffer_th));
H A Dip_check_defrag.c17 extern void *bpf_dynptr_slice(const struct bpf_dynptr *ptr, uint32_t offset,
54 iph = bpf_dynptr_slice(&ptr, 0, iph_buf, sizeof(iph_buf));
76 ip6h = bpf_dynptr_slice(&ptr, 0, ip6h_buf, sizeof(ip6h_buf));
H A Dtest_parse_tcp_hdr_opt_dynptr.c39 data = bpf_dynptr_slice(ptr, *off, buffer, sizeof(buffer));
90 tcp_hdr = bpf_dynptr_slice(&ptr, off, buffer, sizeof(buffer));
H A Dtest_xdp_dynptr.c99 iph = bpf_dynptr_slice(xdp_ptr, ethhdr_sz, iph_buffer_udp, sizeof(iph_buffer_udp));
101 iph = bpf_dynptr_slice(xdp_ptr, ethhdr_sz, iph_buffer_tcp, sizeof(iph_buffer_tcp));
178 ip6h = bpf_dynptr_slice(xdp_ptr, ethhdr_sz, ip6h_buffer_udp, sizeof(ip6h_buffer_udp));
180 ip6h = bpf_dynptr_slice(xdp_ptr, ethhdr_sz, ip6h_buffer_tcp, sizeof(ip6h_buffer_tcp));
241 eth = bpf_dynptr_slice(&ptr, 0, buffer, sizeof(buffer));
H A Dtest_l4lb_noinline_dynptr.c242 icmp_hdr = bpf_dynptr_slice(skb_ptr, off, buffer, sizeof(buffer));
249 ip6h = bpf_dynptr_slice(skb_ptr, off, buffer, sizeof(buffer));
267 icmp_hdr = bpf_dynptr_slice(skb_ptr, off, buffer_icmp, sizeof(buffer_icmp));
274 iph = bpf_dynptr_slice(skb_ptr, off, buffer_ip, sizeof(buffer_ip));
290 udp = bpf_dynptr_slice(skb_ptr, off, buffer, sizeof(buffer));
310 tcp = bpf_dynptr_slice(skb_ptr, off, buffer, sizeof(buffer));
354 ip6h = bpf_dynptr_slice(skb_ptr, off, buffer, sizeof(buffer));
377 iph = bpf_dynptr_slice(skb_ptr, off, buffer, sizeof(buffer));
H A Ddynptr_success.c202 /* This should return NULL. Must use bpf_dynptr_slice API */
522 data = bpf_dynptr_slice(&ptr, 0, NULL, 1);
539 data = bpf_dynptr_slice(&ptr, 0, NULL, 10);
H A Ddynptr_fail.c1070 /* bpf_dynptr_slice()s are read-only and cannot be written to */
1081 hdr = bpf_dynptr_slice(&ptr, 0, buffer, sizeof(buffer));
1102 hdr = bpf_dynptr_slice(&ptr, 0, buffer, sizeof(buffer));
1155 hdr = bpf_dynptr_slice(&ptr, 0, buffer, sizeof(buffer));
1204 hdr = bpf_dynptr_slice(&ptr, 0, buffer, sizeof(buffer));
1288 /* Can't pass in variable-sized len to bpf_dynptr_slice */
1300 hdr = bpf_dynptr_slice(&ptr, 0, buffer, hdr_size);
1307 /* Can't pass in variable-sized len to bpf_dynptr_slice */
1685 data = bpf_dynptr_slice(&ptr, 0, buffer, 9);
H A Dverifier_global_subprogs.c359 d = bpf_dynptr_slice(dptr, 0, &buf, sizeof(long));
H A Dtest_tunnel_kern.c975 iph = bpf_dynptr_slice(&ptr, off, iph_buf, sizeof(iph_buf));
980 esph = bpf_dynptr_slice(&ptr, off, esph_buf, sizeof(esph_buf));
/linux-master/tools/testing/selftests/bpf/
H A Dbpf_kfuncs.h28 extern void *bpf_dynptr_slice(const struct bpf_dynptr *ptr, __u32 offset,
/linux-master/kernel/bpf/
H A Dhelpers.c1660 /* skb and xdp dynptrs should use bpf_dynptr_slice / bpf_dynptr_slice_rdwr */
2291 * bpf_dynptr_slice() - Obtain a read-only pointer to the dynptr data.
2299 * bpf_dynptr_slice and bpf_dynptr_data.
2308 * Please note that in the case of skb and xdp dynptrs, bpf_dynptr_slice
2310 * bpf_dynptr_slice will not invalidate any ctx->data/data_end pointers in
2318 __bpf_kfunc void *bpf_dynptr_slice(const struct bpf_dynptr_kern *ptr, u32 offset, function
2369 * bpf_dynptr_slice and bpf_dynptr_data.
2408 /* bpf_dynptr_slice_rdwr is the same logic as bpf_dynptr_slice.
2430 return bpf_dynptr_slice(ptr, offset, buffer__opt, buffer__szk);
2600 BTF_ID_FLAGS(func, bpf_dynptr_slice, KF_RET_NUL
[all...]
H A Dverifier.c11005 BTF_ID(func, bpf_dynptr_slice)
11033 BTF_ID(func, bpf_dynptr_slice)
12381 verbose(env, "verifier internal error: bpf_dynptr_slice(_rdwr) no constant size\n");

Completed in 251 milliseconds