Home
last modified time | relevance | path

Searched refs:dynptr (Results 1 – 10 of 10) sorted by relevance

/linux-6.12.1/tools/testing/selftests/bpf/progs/
Duser_ringbuf_fail.c30 bad_access1(struct bpf_dynptr *dynptr, void *context) in bad_access1() argument
34 sample = bpf_dynptr_data(dynptr - 1, 0, sizeof(*sample)); in bad_access1()
35 bpf_printk("Was able to pass bad pointer %lx\n", (__u64)dynptr - 1); in bad_access1()
53 bad_access2(struct bpf_dynptr *dynptr, void *context) in bad_access2() argument
57 sample = bpf_dynptr_data(dynptr + 1, 0, sizeof(*sample)); in bad_access2()
58 bpf_printk("Was able to pass bad pointer %lx\n", (__u64)dynptr + 1); in bad_access2()
76 write_forbidden(struct bpf_dynptr *dynptr, void *context) in write_forbidden() argument
78 *((long *)dynptr) = 0; in write_forbidden()
96 null_context_write(struct bpf_dynptr *dynptr, void *context) in null_context_write() argument
116 null_context_read(struct bpf_dynptr *dynptr, void *context) in null_context_read() argument
[all …]
Dtest_cls_redirect_dynptr.c125 static int pkt_parse_ipv4(struct bpf_dynptr *dynptr, __u64 *offset, struct iphdr *iphdr) in pkt_parse_ipv4() argument
127 if (bpf_dynptr_read(iphdr, sizeof(*iphdr), dynptr, *offset, 0)) in pkt_parse_ipv4()
142 static bool pkt_parse_icmp_l4_ports(struct bpf_dynptr *dynptr, __u64 *offset, flow_ports_t *ports) in pkt_parse_icmp_l4_ports() argument
144 if (bpf_dynptr_read(ports, sizeof(*ports), dynptr, *offset, 0)) in pkt_parse_icmp_l4_ports()
187 static bool pkt_skip_ipv6_extension_headers(struct bpf_dynptr *dynptr, __u64 *offset, in pkt_skip_ipv6_extension_headers() argument
215 if (bpf_dynptr_read(&exthdr, sizeof(exthdr), dynptr, *offset, 0)) in pkt_skip_ipv6_extension_headers()
244 static int pkt_parse_ipv6(struct bpf_dynptr *dynptr, __u64 *offset, struct ipv6hdr *ipv6, in pkt_parse_ipv6() argument
247 if (bpf_dynptr_read(ipv6, sizeof(*ipv6), dynptr, *offset, 0)) in pkt_parse_ipv6()
252 if (!pkt_skip_ipv6_extension_headers(dynptr, offset, ipv6, proto, is_fragment)) in pkt_parse_ipv6()
293 static ret_t forward_with_gre(struct __sk_buff *skb, struct bpf_dynptr *dynptr, in forward_with_gre() argument
[all …]
Duser_ringbuf_success.c38 record_sample(struct bpf_dynptr *dynptr, void *context) in record_sample() argument
46 status = bpf_dynptr_read(&stack_sample, sizeof(stack_sample), dynptr, 0, 0); in record_sample()
53 sample = bpf_dynptr_data(dynptr, 0, sizeof(*sample)); in record_sample()
89 read_protocol_msg(struct bpf_dynptr *dynptr, void *context) in read_protocol_msg() argument
93 msg = bpf_dynptr_data(dynptr, 0, sizeof(*msg)); in read_protocol_msg()
193 do_nothing_cb(struct bpf_dynptr *dynptr, void *context) in do_nothing_cb() argument
Dverifier_iterating_callbacks.c134 static __u64 ringbuf_drain_cb(struct bpf_dynptr *dynptr, void *data) in ringbuf_drain_cb() argument
Ddynptr_fail.c1715 __noinline long global_call_bpf_dynptr(const struct bpf_dynptr *dynptr) in global_call_bpf_dynptr() argument
/linux-6.12.1/kernel/bpf/
Dringbuf.c767 struct bpf_dynptr_kern dynptr; in BPF_CALL_4() local
782 bpf_dynptr_init(&dynptr, sample, BPF_DYNPTR_TYPE_LOCAL, 0, size); in BPF_CALL_4()
783 ret = callback((uintptr_t)&dynptr, (uintptr_t)callback_ctx, 0, 0, 0); in BPF_CALL_4()
Dlog.c737 verbose_a("type=%s", dynptr_type_str(reg->dynptr.type)); in print_reg_state()
816 verbose(env, "=dynptr_%s(", dynptr_type_str(reg->dynptr.type)); in print_verifier_state()
Dverifier.c814 if (!dynptr_type_refcounted(state->stack[spi].spilled_ptr.dynptr.type)) { in unmark_stack_slots_dynptr()
844 if (state->stack[i].spilled_ptr.dynptr.first_slot) in unmark_stack_slots_dynptr()
878 if (!state->stack[spi].spilled_ptr.dynptr.first_slot) in destroy_if_dynptr_stack_slot()
881 if (dynptr_type_refcounted(state->stack[spi].spilled_ptr.dynptr.type)) { in destroy_if_dynptr_stack_slot()
963 if (!state->stack[spi].spilled_ptr.dynptr.first_slot) in is_dynptr_reg_valid_init()
988 return reg->dynptr.type == dynptr_type; in is_dynptr_type_expected()
993 return state->stack[spi].spilled_ptr.dynptr.type == dynptr_type; in is_dynptr_type_expected()
1832 reg->dynptr.type = type; in __mark_dynptr_reg()
1833 reg->dynptr.first_slot = first_slot; in __mark_dynptr_reg()
8729 return reg->dynptr.type; in dynptr_get_type()
[all …]
/linux-6.12.1/include/linux/
Dbpf_verifier.h120 } dynptr; member
/linux-6.12.1/Documentation/bpf/
Dkfuncs.rst114 Here, the dynptr will be treated as an uninitialized dynptr. Without this
115 annotation, the verifier will reject the program if the dynptr passed in is