Home
last modified time | relevance | path

Searched refs:__sk_buff (Results 1 – 25 of 236) sorted by relevance

12345678910

/linux/tools/testing/selftests/bpf/progs/
H A Dverifier_direct_packet_access.c20 : __imm_const(__sk_buff_data, offsetof(struct __sk_buff, data)), in __retval()
21 __imm_const(__sk_buff_data_end, offsetof(struct __sk_buff, data_end)) in __retval()
40 : __imm_const(__sk_buff_data, offsetof(struct __sk_buff, data)), in direct_packet_access_test1()
41 __imm_const(__sk_buff_data_end, offsetof(struct __sk_buff, data_end)) in direct_packet_access_test1()
74 : __imm_const(__sk_buff_data, offsetof(struct __sk_buff, data)), in direct_packet_access_test2()
75 __imm_const(__sk_buff_data_end, offsetof(struct __sk_buff, data_end)), in direct_packet_access_test2()
76 __imm_const(__sk_buff_len, offsetof(struct __sk_buff, len)) in direct_packet_access_test2()
91 : __imm_const(__sk_buff_data, offsetof(struct __sk_buff, data)) in direct_packet_access_test3()
110 : __imm_const(__sk_buff_data, offsetof(struct __sk_buff, data)), in direct_packet_access_test4_write()
111 __imm_const(__sk_buff_data_end, offsetof(struct __sk_buff, data_en in direct_packet_access_test4_write()
[all...]
H A Dverifier_cgroup_skb.c32 : __imm_const(__sk_buff_data, offsetof(struct __sk_buff, data)), in test_1_for_cgroup_skb()
33 __imm_const(__sk_buff_data_end, offsetof(struct __sk_buff, data_end)), in test_1_for_cgroup_skb()
34 __imm_const(__sk_buff_len, offsetof(struct __sk_buff, len)), in test_1_for_cgroup_skb()
35 __imm_const(__sk_buff_mark, offsetof(struct __sk_buff, mark)), in test_1_for_cgroup_skb()
36 __imm_const(__sk_buff_pkt_type, offsetof(struct __sk_buff, pkt_type)), in test_1_for_cgroup_skb()
37 __imm_const(__sk_buff_protocol, offsetof(struct __sk_buff, protocol)), in test_1_for_cgroup_skb()
38 __imm_const(__sk_buff_queue_mapping, offsetof(struct __sk_buff, queue_mapping)), in test_1_for_cgroup_skb()
39 __imm_const(__sk_buff_vlan_present, offsetof(struct __sk_buff, vlan_present)) in test_1_for_cgroup_skb()
59 : __imm_const(__sk_buff_hash, offsetof(struct __sk_buff, hash)), in test_2_for_cgroup_skb()
60 __imm_const(__sk_buff_ingress_ifindex, offsetof(struct __sk_buff, ingress_ifindex)), in test_2_for_cgroup_skb()
[all …]
H A Dverifier_helper_packet_access.c157 __imm_const(__sk_buff_data, offsetof(struct __sk_buff, data)), in cls_valid_packet_ptr_range()
158 __imm_const(__sk_buff_data_end, offsetof(struct __sk_buff, data_end)) in cls_valid_packet_ptr_range()
176 __imm_const(__sk_buff_data, offsetof(struct __sk_buff, data)) in test7_cls_unchecked_packet_ptr()
205 __imm_const(__sk_buff_data, offsetof(struct __sk_buff, data)), in packet_test8_cls_variable_add()
206 __imm_const(__sk_buff_data_end, offsetof(struct __sk_buff, data_end)) in packet_test8_cls_variable_add()
230 __imm_const(__sk_buff_data, offsetof(struct __sk_buff, data)), in packet_ptr_with_bad_range_2()
231 __imm_const(__sk_buff_data_end, offsetof(struct __sk_buff, data_end)) in packet_ptr_with_bad_range_2()
254 __imm_const(__sk_buff_data, offsetof(struct __sk_buff, data)), in ptr_with_too_short_range_2()
255 __imm_const(__sk_buff_data_end, offsetof(struct __sk_buff, data_end)) in ptr_with_too_short_range_2()
279 __imm_const(__sk_buff_data, offsetof(struct __sk_buff, dat in test11_cls_unsuitable_helper_1()
[all...]
H A Dverifier_lwt.c23 : __imm_const(__sk_buff_data, offsetof(struct __sk_buff, data)), in packet_write_for_lwt_in()
24 __imm_const(__sk_buff_data_end, offsetof(struct __sk_buff, data_end)) in packet_write_for_lwt_in()
43 : __imm_const(__sk_buff_data, offsetof(struct __sk_buff, data)), in packet_write_for_lwt_out()
44 __imm_const(__sk_buff_data_end, offsetof(struct __sk_buff, data_end)) in packet_write_for_lwt_out()
63 : __imm_const(__sk_buff_data, offsetof(struct __sk_buff, data)), in packet_write_for_lwt_xmit()
64 __imm_const(__sk_buff_data_end, offsetof(struct __sk_buff, data_end)) in packet_write_for_lwt_xmit()
83 : __imm_const(__sk_buff_data, offsetof(struct __sk_buff, data)), in packet_read_for_lwt_in()
84 __imm_const(__sk_buff_data_end, offsetof(struct __sk_buff, data_end)) in packet_read_for_lwt_in()
103 : __imm_const(__sk_buff_data, offsetof(struct __sk_buff, data)), in packet_read_for_lwt_out()
104 __imm_const(__sk_buff_data_end, offsetof(struct __sk_buff, data_end)) in packet_read_for_lwt_out()
[all …]
H A Dexceptions.c46 int exception_throw_always_1(struct __sk_buff *ctx) in exception_throw_always_1()
57 int exception_throw_always_2(struct __sk_buff *ctx) in exception_throw_always_2()
63 int exception_throw_unwind_1(struct __sk_buff *ctx) in exception_throw_unwind_1()
69 int exception_throw_unwind_2(struct __sk_buff *ctx) in exception_throw_unwind_2()
75 int exception_throw_default(struct __sk_buff *ctx) in exception_throw_default()
82 int exception_throw_default_value(struct __sk_buff *ctx) in exception_throw_default_value()
89 int exception_tail_call_target(struct __sk_buff *ctx) in exception_tail_call_target()
96 int exception_tail_call_subprog(struct __sk_buff *ctx) in exception_tail_call_subprog()
105 int exception_tail_call(struct __sk_buff *ctx) { in exception_tail_call()
119 int exception_throw_from_void_global(struct __sk_buff *ct
[all...]
H A Dirq.c19 int irq_save_bad_arg(struct __sk_buff *ctx) in irq_save_bad_arg()
27 int irq_restore_bad_arg(struct __sk_buff *ctx) in irq_restore_bad_arg()
35 int irq_restore_missing_2(struct __sk_buff *ctx) in irq_restore_missing_2()
47 int irq_restore_missing_3(struct __sk_buff *ctx) in irq_restore_missing_3()
61 int irq_restore_missing_3_minus_2(struct __sk_buff *ctx) in irq_restore_missing_3_minus_2()
87 int irq_restore_missing_1_subprog(struct __sk_buff *ctx) in irq_restore_missing_1_subprog()
97 int irq_restore_missing_2_subprog(struct __sk_buff *ctx) in irq_restore_missing_2_subprog()
109 int irq_restore_missing_3_subprog(struct __sk_buff *ctx) in irq_restore_missing_3_subprog()
123 int irq_restore_missing_3_minus_2_subprog(struct __sk_buff *ctx) in irq_restore_missing_3_minus_2_subprog()
139 int irq_balance(struct __sk_buff *ct in irq_balance()
[all...]
H A Dverifier_sock.c68 : __imm_const(__sk_buff_sk, offsetof(struct __sk_buff, sk)) in skb_sk_no_null_check()
86 : __imm_const(__sk_buff_sk, offsetof(struct __sk_buff, sk)), in sk_family_non_fullsock_field_1()
106 : __imm_const(__sk_buff_sk, offsetof(struct __sk_buff, sk)), in sk_sk_type_fullsock_field_1()
124 __imm_const(__sk_buff_sk, offsetof(struct __sk_buff, sk)) in sk_no_skb_sk_check_1()
145 __imm_const(__sk_buff_sk, offsetof(struct __sk_buff, sk)), in no_null_check_on_ret_1()
169 __imm_const(__sk_buff_sk, offsetof(struct __sk_buff, sk)), in sk_sk_type_fullsock_field_2()
192 __imm_const(__sk_buff_sk, offsetof(struct __sk_buff, sk)), in sk_family_non_fullsock_field_2()
216 __imm_const(__sk_buff_sk, offsetof(struct __sk_buff, sk)), in sk_sk_state_narrow_load()
240 __imm_const(__sk_buff_sk, offsetof(struct __sk_buff, sk)), in port_word_load_backward_compatibility()
264 __imm_const(__sk_buff_sk, offsetof(struct __sk_buff, s in sk_dst_port_half_load()
[all...]
H A Dtest_global_func3.c9 int f1(struct __sk_buff *skb) in f1()
15 int f2(int val, struct __sk_buff *skb) in f2()
21 int f3(int val, struct __sk_buff *skb, int var) in f3()
27 int f4(struct __sk_buff *skb) in f4()
33 int f5(struct __sk_buff *skb) in f5()
39 int f6(struct __sk_buff *skb) in f6()
45 int f7(struct __sk_buff *skb) in f7()
51 int f8(struct __sk_buff *skb) in f8()
57 int f9(struct __sk_buff *skb)
63 int f10(struct __sk_buff *sk
[all...]
H A Dmap_kptr_fail.c25 int size_not_bpf_dw(struct __sk_buff *ctx) in size_not_bpf_dw()
40 int non_const_var_off(struct __sk_buff *ctx) in non_const_var_off()
59 int non_const_var_off_kptr_xchg(struct __sk_buff *ctx) in non_const_var_off_kptr_xchg()
78 int misaligned_access_write(struct __sk_buff *ctx) in misaligned_access_write()
94 int misaligned_access_read(struct __sk_buff *ctx) in misaligned_access_read()
108 int reject_var_off_store(struct __sk_buff *ctx) in reject_var_off_store()
132 int reject_bad_type_match(struct __sk_buff *ctx) in reject_bad_type_match()
153 int marked_as_untrusted_or_null(struct __sk_buff *ctx) in marked_as_untrusted_or_null()
168 int correct_btf_id_check_size(struct __sk_buff *ctx) in correct_btf_id_check_size()
186 int inherit_untrusted_on_walk(struct __sk_buff *ctx) in inherit_untrusted_on_walk()
[all …]
H A Dexceptions_fail.c64 int reject_exception_cb_type_1(struct __sk_buff *ctx) in __exception_cb()
73 int reject_exception_cb_type_2(struct __sk_buff *ctx) in __exception_cb()
82 int reject_exception_cb_type_3(struct __sk_buff *ctx) in __exception_cb()
91 int reject_exception_cb_type_4(struct __sk_buff *ctx) in __exception_cb()
100 int reject_exception_cb_type_5(struct __sk_buff *ctx) in __exception_cb()
115 int reject_async_callback_throw(struct __sk_buff *ctx) in reject_async_callback_throw()
125 __noinline static int subprog_lock(struct __sk_buff *ctx) in subprog_lock()
160 __noinline static int throwing_subprog(struct __sk_buff *ctx) in throwing_subprog()
211 __noinline int global_subprog_may_throw(struct __sk_buff *ctx) in global_subprog_may_throw()
220 int reject_global_subprog_throw_with_reference(struct __sk_buff *ctx) in reject_global_subprog_throw_with_reference()
[all …]
H A Dpreempt_lock.c12 int preempt_lock_missing_1(struct __sk_buff *ctx) in preempt_lock_missing_1()
20 int preempt_lock_missing_2(struct __sk_buff *ctx) in preempt_lock_missing_2()
29 int preempt_lock_missing_3(struct __sk_buff *ctx) in preempt_lock_missing_3()
39 int preempt_lock_missing_3_minus_2(struct __sk_buff *ctx) in preempt_lock_missing_3_minus_2()
61 int preempt_lock_missing_1_subprog(struct __sk_buff *ctx) in preempt_lock_missing_1_subprog()
69 int preempt_lock_missing_2_subprog(struct __sk_buff *ctx) in preempt_lock_missing_2_subprog()
78 int preempt_lock_missing_2_minus_1_subprog(struct __sk_buff *ctx) in preempt_lock_missing_2_minus_1_subprog()
93 __success int preempt_balance(struct __sk_buff *ctx) in preempt_balance()
100 __success int preempt_balance_subprog_test(struct __sk_buff *ctx) in preempt_balance_subprog_test()
138 int preempt_global_subprog_test(struct __sk_buff *ct
[all...]
H A Dtest_global_func4.c9 int f1(struct __sk_buff *skb) in f1()
15 int f2(int val, struct __sk_buff *skb) in f2()
21 int f3(int val, struct __sk_buff *skb, int var) in f3()
27 int f4(struct __sk_buff *skb) in f4()
33 int f5(struct __sk_buff *skb) in f5()
39 int f6(struct __sk_buff *skb) in f6()
45 int f7(struct __sk_buff *skb) in f7()
52 int global_func4(struct __sk_buff *skb) in global_func4()
H A Dtailcall_bpf2bpf_hierarchy2.c7 int classifier_0(struct __sk_buff *skb);
8 int classifier_1(struct __sk_buff *skb);
26 int subprog_tail0(struct __sk_buff *skb) in subprog_tail0()
37 int classifier_0(struct __sk_buff *skb) in classifier_0()
45 int subprog_tail1(struct __sk_buff *skb) in subprog_tail1()
56 int classifier_1(struct __sk_buff *skb)
69 int tailcall_bpf2bpf_hierarchy_2(struct __sk_buff *skb)
H A Dtailcall_bpf2bpf4.c31 int subprog_tail_2(struct __sk_buff *skb) in subprog_tail_2()
40 int subprog_tail_1(struct __sk_buff *skb) in subprog_tail_1()
47 int subprog_tail(struct __sk_buff *skb) in subprog_tail()
54 int classifier_1(struct __sk_buff *skb) in classifier_1()
60 int classifier_2(struct __sk_buff *skb) in classifier_2()
67 int classifier_0(struct __sk_buff *skb) in classifier_0()
73 int entry(struct __sk_buff *skb) in entry()
H A Dtest_tc_peer.c20 int tc_chk(struct __sk_buff *skb) in tc_chk()
26 int tc_dst(struct __sk_buff *skb) in tc_dst()
32 int tc_src(struct __sk_buff *skb) in tc_src()
38 int tc_dst_ing(struct __sk_buff *skb) in tc_dst_ing()
49 int tc_src_ing(struct __sk_buff *skb) in tc_src_ing()
60 int tc_dst_l3(struct __sk_buff *skb) in tc_dst_l3()
66 int tc_src_l3(struct __sk_buff *skb) in tc_src_l3()
H A Dtest_bpf_nf_fail.c18 struct nf_conn *bpf_skb_ct_alloc(struct __sk_buff *, struct bpf_sock_tuple *, u32,
20 struct nf_conn *bpf_skb_ct_lookup(struct __sk_buff *, struct bpf_sock_tuple *, u32,
34 int alloc_release(struct __sk_buff *ctx) in alloc_release()
48 int insert_insert(struct __sk_buff *ctx) in insert_insert()
65 int lookup_insert(struct __sk_buff *ctx) in lookup_insert()
79 int write_not_allowlisted_field(struct __sk_buff *ctx) in write_not_allowlisted_field()
93 int set_timeout_after_insert(struct __sk_buff *ctx) in set_timeout_after_insert()
110 int set_status_after_insert(struct __sk_buff *ctx) in set_status_after_insert()
127 int change_timeout_after_alloc(struct __sk_buff *ctx) in change_timeout_after_alloc()
141 int change_status_after_alloc(struct __sk_buff *ct in change_status_after_alloc()
[all...]
H A Dtest_tc_tunnel.c105 static __always_inline int __encap_ipv4(struct __sk_buff *skb, __u8 encap_proto, in __encap_ipv4()
266 static __always_inline int encap_ipv4(struct __sk_buff *skb, __u8 encap_proto, in encap_ipv4()
272 static __always_inline int __encap_ipv6(struct __sk_buff *skb, __u8 encap_proto, in __encap_ipv6()
383 static int encap_ipv6_ipip6(struct __sk_buff *skb) in encap_ipv6_ipip6()
437 static __always_inline int encap_ipv6(struct __sk_buff *skb, __u8 encap_proto, in encap_ipv6()
444 int __encap_ipip_none(struct __sk_buff *skb) in __encap_ipip_none()
453 int __encap_gre_none(struct __sk_buff *skb) in __encap_gre_none()
462 int __encap_gre_mpls(struct __sk_buff *skb) in __encap_gre_mpls()
471 int __encap_gre_eth(struct __sk_buff *skb) in __encap_gre_eth()
480 int __encap_udp_none(struct __sk_buff *skb) in __encap_udp_none()
[all …]
H A Dkfunc_call_fail.c10 int kfunc_call_test_spin_lock_unsafe(struct __sk_buff *skb) in kfunc_call_test_spin_lock_unsafe()
51 int kfunc_call_test_get_mem_fail_rdonly(struct __sk_buff *skb) in kfunc_call_test_get_mem_fail_rdonly()
72 int kfunc_call_test_get_mem_fail_use_after_free(struct __sk_buff *skb) in kfunc_call_test_get_mem_fail_use_after_free()
98 int kfunc_call_test_get_mem_fail_oob(struct __sk_buff *skb) in kfunc_call_test_get_mem_fail_oob()
119 int kfunc_call_test_get_mem_fail_zero_size(struct __sk_buff *skb) in kfunc_call_test_get_mem_fail_zero_size()
146 int kfunc_call_test_get_mem_fail_oversized(struct __sk_buff *skb) in kfunc_call_test_get_mem_fail_oversized()
181 int kfunc_call_test_get_mem_fail_not_const(struct __sk_buff *skb) in kfunc_call_test_get_mem_fail_not_const()
202 int kfunc_call_test_mem_acquire_fail(struct __sk_buff *skb) in kfunc_call_test_mem_acquire_fail()
226 int kfunc_call_test_pointer_arg_type_mismatch(struct __sk_buff *skb) in kfunc_call_test_pointer_arg_type_mismatch()
H A Dtest_sk_lookup_kern.c56 int sk_lookup_success(struct __sk_buff *skb) in sk_lookup_success()
82 int sk_lookup_success_simple(struct __sk_buff *skb) in sk_lookup_success_simple()
94 int err_use_after_free(struct __sk_buff *skb) in err_use_after_free()
109 int err_modify_sk_pointer(struct __sk_buff *skb) in err_modify_sk_pointer()
123 int err_modify_sk_or_null_pointer(struct __sk_buff *skb) in err_modify_sk_or_null_pointer()
136 int err_no_release(struct __sk_buff *skb) in err_no_release()
145 int err_release_twice(struct __sk_buff *skb) in err_release_twice()
157 int err_release_unchecked(struct __sk_buff *skb) in err_release_unchecked()
167 void lookup_no_release(struct __sk_buff *skb) in lookup_no_release()
174 int err_no_release_subcall(struct __sk_buff *skb) in err_no_release_subcall()
H A Dtailcall2.c14 int classifier_0(struct __sk_buff *skb) in classifier_0()
21 int classifier_1(struct __sk_buff *skb) in classifier_1()
28 int classifier_2(struct __sk_buff *skb) in classifier_2()
34 int classifier_3(struct __sk_buff *skb) in classifier_3()
41 int classifier_4(struct __sk_buff *skb) in classifier_4()
48 int entry(struct __sk_buff *skb) in entry()
H A Dtest_global_func2.c11 int f0(int var, struct __sk_buff *skb) in f0()
17 int f1(struct __sk_buff *skb) in f1()
26 int f3(int, struct __sk_buff *skb, int);
29 int f2(int val, struct __sk_buff *skb) in f2()
35 int f3(int val, struct __sk_buff *skb, int var) in f3()
46 int global_func2(struct __sk_buff *skb) in global_func2()
H A Dtest_xdp_meta.c48 static bool check_skb_metadata(const char *file, int line, struct __sk_buff *skb) in check_skb_metadata()
59 int ing_cls(struct __sk_buff *ctx) in ing_cls()
77 int ing_cls_dynptr_read(struct __sk_buff *ctx) in ing_cls_dynptr_read()
95 int ing_cls_dynptr_write(struct __sk_buff *ctx) in ing_cls_dynptr_write()
113 int ing_cls_dynptr_slice(struct __sk_buff *ctx) in ing_cls_dynptr_slice()
133 int ing_cls_dynptr_slice_rdwr(struct __sk_buff *ctx) in ing_cls_dynptr_slice_rdwr()
155 int ing_cls_dynptr_offset_rd(struct __sk_buff *ctx) in ing_cls_dynptr_offset_rd()
194 int ing_cls_dynptr_offset_wr(struct __sk_buff *ctx) in ing_cls_dynptr_offset_wr()
229 int ing_cls_dynptr_offset_oob(struct __sk_buff *ctx) in ing_cls_dynptr_offset_oob()
292 static bool is_test_packet_tc(struct __sk_buff *ctx) in is_test_packet_tc()
[all …]
/linux/tools/testing/selftests/bpf/verifier/
H A Dctx_skb.c5 offsetof(struct __sk_buff, len)),
8 offsetof(struct __sk_buff, mark)),
11 offsetof(struct __sk_buff, pkt_type)),
14 offsetof(struct __sk_buff, queue_mapping)),
17 offsetof(struct __sk_buff, protocol)),
20 offsetof(struct __sk_buff, vlan_present)),
23 offsetof(struct __sk_buff, vlan_tci)),
26 offsetof(struct __sk_buff, napi_id)),
54 offsetof(struct __sk_buff, pkt_type)),
67 offsetof(struct __sk_buff, pkt_type)),
[all …]
/linux/samples/bpf/
H A Dtcbpf1_kern.c16 static inline void set_dst_mac(struct __sk_buff *skb, char *mac) in set_dst_mac()
24 static inline void set_ip_tos(struct __sk_buff *skb, __u8 new_tos) in set_ip_tos()
37 static inline void set_tcp_ip_src(struct __sk_buff *skb, __u32 new_ip) in set_tcp_ip_src()
47 static inline void set_tcp_dest_port(struct __sk_buff *skb, __u16 new_port) in set_tcp_dest_port()
56 int bpf_prog1(struct __sk_buff *skb) in bpf_prog1()
70 int _redirect_xmit(struct __sk_buff *skb) in _redirect_xmit()
75 int _redirect_recv(struct __sk_buff *skb) in _redirect_recv()
80 int _clone_redirect_xmit(struct __sk_buff *skb) in _clone_redirect_xmit()
86 int _clone_redirect_recv(struct __sk_buff *skb) in _clone_redirect_recv()
H A Dtest_lwt_bpf.c29 int do_nop(struct __sk_buff *skb) in do_nop()
36 int do_test_ctx(struct __sk_buff *skb) in do_test_ctx()
49 int do_test_cb(struct __sk_buff *skb) in do_test_cb()
60 int do_test_data(struct __sk_buff *skb) in do_test_data()
84 static inline int rewrite(struct __sk_buff *skb, uint32_t old_ip, in rewrite()
141 int do_test_rewrite(struct __sk_buff *skb) in do_test_rewrite()
160 static inline int __do_push_ll_and_redirect(struct __sk_buff *skb) in __do_push_ll_and_redirect()
185 int do_push_ll_and_redirect_silent(struct __sk_buff *skb) in do_push_ll_and_redirect_silent()
191 int do_push_ll_and_redirect(struct __sk_buff *skb) in do_push_ll_and_redirect()
202 static inline void __fill_garbage(struct __sk_buff *skb) in __fill_garbage()
[all …]

12345678910