Home
last modified time | relevance | path

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

/linux-6.15/tools/testing/selftests/bpf/progs/
H A 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()
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()
78 *((long *)dynptr) = 0; in write_forbidden()
140 bpf_ringbuf_discard_dynptr(dynptr, 0); in try_discard_dynptr()
160 bpf_ringbuf_submit_dynptr(dynptr, 0); in try_submit_dynptr()
198 bpf_dynptr_from_mem(&map_value, 4, 0, dynptr); in try_reinit_dynptr_mem()
205 bpf_ringbuf_reserve_dynptr(&ringbuf, 8, 0, dynptr); in try_reinit_dynptr_ringbuf()
227 bpf_dynptr_data(dynptr, 0xA, 0xA); in global_call_bpf_dynptr_data()
[all …]
H A Dtest_cls_redirect_dynptr.c632 if (pkt_parse_ipv4(dynptr, offset, &ipv4)) { in process_icmpv4()
759 if (pkt_parse_ipv4(dynptr, offset, &ipv4)) { in process_ipv4()
776 return process_icmpv4(skb, dynptr, offset, metrics); in process_ipv4()
779 return process_tcp(dynptr, offset, skb, &info, metrics); in process_ipv4()
782 return process_udp(dynptr, offset, skb, &info, metrics); in process_ipv4()
820 return process_icmpv6(dynptr, offset, skb, metrics); in process_ipv6()
823 return process_tcp(dynptr, offset, skb, &info, metrics); in process_ipv6()
838 struct bpf_dynptr dynptr; in cls_redirect() local
846 bpf_dynptr_from_skb(skb, 0, &dynptr); in cls_redirect()
933 verdict = process_ipv4(skb, &dynptr, &off, metrics); in cls_redirect()
[all …]
H A 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
H A Dverifier_iterating_callbacks.c134 static __u64 ringbuf_drain_cb(struct bpf_dynptr *dynptr, void *data) in ringbuf_drain_cb() argument
H A Ddynptr_fail.c1715 __noinline long global_call_bpf_dynptr(const struct bpf_dynptr *dynptr) in global_call_bpf_dynptr() argument
/linux-6.15/kernel/bpf/
H A Dringbuf.c760 struct bpf_dynptr_kern dynptr; in BPF_CALL_4() local
775 bpf_dynptr_init(&dynptr, sample, BPF_DYNPTR_TYPE_LOCAL, 0, size); in BPF_CALL_4()
776 ret = callback((uintptr_t)&dynptr, (uintptr_t)callback_ctx, 0, 0, 0); in BPF_CALL_4()
H A Dlog.c738 verbose_a("type=%s", dynptr_type_str(reg->dynptr.type)); in print_reg_state()
818 verbose(env, "=dynptr_%s(", dynptr_type_str(reg->dynptr.type)); in print_verifier_state()
H A Dverifier.c860 if (state->stack[i].spilled_ptr.dynptr.first_slot) in unmark_stack_slots_dynptr()
894 if (!state->stack[spi].spilled_ptr.dynptr.first_slot) in destroy_if_dynptr_stack_slot()
979 if (!state->stack[spi].spilled_ptr.dynptr.first_slot) in is_dynptr_reg_valid_init()
1004 return reg->dynptr.type == dynptr_type; in is_dynptr_type_expected()
1009 return state->stack[spi].spilled_ptr.dynptr.type == dynptr_type; in is_dynptr_type_expected()
2149 reg->dynptr.type = type; in __mark_dynptr_reg()
2150 reg->dynptr.first_slot = first_slot; in __mark_dynptr_reg()
9392 return reg->dynptr.type; in dynptr_get_type()
9400 return state->stack[spi].spilled_ptr.dynptr.type; in dynptr_get_type()
18565 if (old_reg->dynptr.type != cur_reg->dynptr.type || in stacksafe()
[all …]
/linux-6.15/include/linux/
H A Dbpf_verifier.h104 } dynptr; member
/linux-6.15/Documentation/bpf/
H A 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