| /tools/testing/selftests/bpf/progs/ |
| A D | exceptions.c | 147 return exception_cb_mod_global(cookie) + cookie + 10; in exception_cb_mod() 203 volatile u64 cookie = c; in assert_nz_gfunc() local 205 bpf_assert(cookie != 0); in assert_nz_gfunc() 211 volatile u64 cookie = c; in assert_zero_gfunc() local 219 volatile s64 cookie = c; in assert_neg_gfunc() local 253 bpf_assert_with(cookie != 0, cookie + 100); in assert_nz_gfunc_with() 261 bpf_assert_with(bpf_cmp_unlikely(cookie, ==, 0), cookie + 100); in assert_zero_gfunc_with() 269 bpf_assert_with(bpf_cmp_unlikely(cookie, <, 0), cookie + 100); in assert_neg_gfunc_with() 277 bpf_assert_with(bpf_cmp_unlikely(cookie, >, 0), cookie + 100); in assert_pos_gfunc_with() 285 bpf_assert_with(bpf_cmp_unlikely(cookie, <=, -1), cookie + 100); in assert_negeq_gfunc_with() [all …]
|
| A D | netns_cookie_prog.c | 37 int *cookie; in get_netns_cookie_sockops() local 48 cookie = bpf_sk_storage_get(&sockops_netns_cookies, sk, 0, in get_netns_cookie_sockops() 50 if (!cookie) in get_netns_cookie_sockops() 53 *cookie = bpf_get_netns_cookie(ctx); in get_netns_cookie_sockops() 69 int *cookie; in get_netns_cookie_sk_msg() local 77 cookie = bpf_sk_storage_get(&sk_msg_netns_cookies, sk, 0, in get_netns_cookie_sk_msg() 79 if (!cookie) in get_netns_cookie_sk_msg() 82 *cookie = bpf_get_netns_cookie(msg); in get_netns_cookie_sk_msg()
|
| A D | uprobe_multi_session_cookie.c | 18 __u64 *cookie; in check_cookie() local 23 cookie = bpf_session_cookie(); in check_cookie() 26 *result = *cookie == val ? val : 0; in check_cookie() 28 *cookie = val; in check_cookie()
|
| A D | kprobe_multi_session_cookie.c | 28 __u64 *cookie; in check_cookie() local 33 cookie = bpf_session_cookie(); in check_cookie() 36 *result = *cookie == val ? val : 0; in check_cookie() 38 *cookie = val; in check_cookie()
|
| A D | sk_storage_omem_uncharge.c | 12 __u64 cookie = 0; variable 31 if (sk->sk_cookie.counter != cookie) in BPF_PROG() 46 if (!cookie || sk->sk_cookie.counter != cookie) in BPF_PROG()
|
| A D | uprobe_multi_session_recursive.c | 21 __u64 *cookie = bpf_session_cookie(); in check_cookie() local 26 test_uprobe_cookie_return[idx_return++] = *cookie; in check_cookie() 32 *cookie = test_uprobe_cookie_entry[idx_entry]; in check_cookie()
|
| A D | exceptions_ext.c | 19 __noinline int exception_cb(u64 cookie) in exception_cb() argument 21 return cookie + 64; in exception_cb() 32 int throwing_exception_cb_extension(u64 cookie) in __exception_cb()
|
| A D | test_migrate_reuseport.c | 101 __u64 cookie; in migrate_reuseport() local 107 cookie = bpf_get_socket_cookie(reuse_md->sk); in migrate_reuseport() 109 key = bpf_map_lookup_elem(&migrate_map, &cookie); in migrate_reuseport()
|
| A D | xdp_synproxy_kern.c | 292 u32 cookie; in tscookie_init() local 299 cookie = tcp_clock_ms() & ~TSMASK; in tscookie_init() 302 cookie |= TS_OPT_SACK; in tscookie_init() 304 cookie |= TS_OPT_ECN; in tscookie_init() 305 *tsval = bpf_htonl(cookie); in tscookie_init() 515 __u32 cookie, __be32 *tsopt, in tcp_gen_synack() argument 526 tcp_header->seq = bpf_htonl(cookie); in tcp_gen_synack() 536 __u32 cookie, __be32 *tsopt) in tcpv4_gen_synack() argument 559 __u32 cookie, __be32 *tsopt) in tcpv6_gen_synack() argument 604 __u32 cookie; in syncookie_handle_syn() local [all …]
|
| A D | test_tcp_custom_syncookie.c | 67 u32 cookie; member 363 ctx->cookie = hash; in tcp_prepare_cookie() 419 ctx->tcp->seq = bpf_htonl(ctx->cookie); in tcp_handle_syn() 466 u32 cookie = bpf_ntohl(ctx->tcp->ack_seq) - 1; in tcp_validate_cookie() local 486 hash -= cookie & ~COOKIE_MASK; in tcp_validate_cookie() 490 mssind = (cookie & (3 << 6)) >> 6; in tcp_validate_cookie() 496 ctx->attrs.snd_wscale = cookie & BPF_SYNCOOKIE_WSCALE_MASK; in tcp_validate_cookie() 499 ctx->attrs.sack_ok = cookie & BPF_SYNCOOKIE_SACK; in tcp_validate_cookie() 500 ctx->attrs.ecn_ok = cookie & BPF_SYNCOOKIE_ECN; in tcp_validate_cookie()
|
| A D | uprobe_multi.c | 59 __u64 cookie = test_cookie ? bpf_get_attach_cookie(ctx) : 0; in uprobe_multi_check() local 64 (!test_cookie || (cookie == __cookie))) \ in uprobe_multi_check()
|
| A D | net_timestamping.c | 23 u64 cookie; member 136 key.cookie = bpf_get_socket_cookie(skops); in bpf_test_delay() 137 if (!key.cookie) in bpf_test_delay()
|
| A D | kprobe_multi.c | 44 __u64 cookie = test_cookie ? bpf_get_attach_cookie(ctx) : 0; in kprobe_multi_check() local 49 (!test_cookie || (cookie == __cookie))) \ in kprobe_multi_check()
|
| /tools/testing/selftests/bpf/prog_tests/ |
| A D | custom_sec_handlers.c | 13 static int custom_setup_prog(struct bpf_program *prog, long cookie) in custom_setup_prog() argument 15 if (cookie == COOKIE_ABC1) in custom_setup_prog() 22 struct bpf_prog_load_opts *opts, long cookie) in custom_prepare_load_prog() argument 24 if (cookie == COOKIE_FALLBACK) in custom_prepare_load_prog() 26 else if (cookie == COOKIE_ABC1) in custom_prepare_load_prog() 35 switch (cookie) { in custom_attach_prog() 63 .cookie = COOKIE_ABC1, in register_sec_handlers() 69 .cookie = COOKIE_ABC2, in register_sec_handlers() 75 .cookie = COOKIE_CUSTOM, in register_sec_handlers() 112 opts.cookie = COOKIE_KPROBE; in test_custom_sec_handlers() [all …]
|
| A D | bpf_cookie.c | 505 ASSERT_EQ(info.tracing.cookie, cookie, "tracing_cookie"); in verify_tracing_link_info() 512 __u64 cookie; in tracing_subtest() local 523 link_opts.tracing.cookie = cookie; in tracing_subtest() 534 link_opts.tracing.cookie = cookie; in tracing_subtest() 541 link_opts.tracing.cookie = cookie; in tracing_subtest() 579 link_opts.tracing.cookie = cookie; in lsm_subtest() 615 raw_tp_opts.cookie = cookie = 0x11000000000000L; in tp_btf_subtest() 629 link_opts.tracing.cookie = cookie = 0x22000000000000L; in tp_btf_subtest() 643 trace_opts.cookie = cookie = 0x33000000000000L; in tp_btf_subtest() 694 raw_tp_opts.cookie = cookie = 0x55000000000000L; in raw_tp_subtest() [all …]
|
| A D | assign_reuse.c | 22 static __u64 cookie(int fd) in cookie() function 24 __u64 cookie = 0; in cookie() local 25 socklen_t cookie_len = sizeof(cookie); in cookie() 28 ret = getsockopt(fd, SOL_SOCKET, SO_COOKIE, &cookie, &cookie_len); in cookie() 30 ASSERT_GT(cookie, 0, "cookie_invalid"); in cookie() 32 return cookie; in cookie() 157 ASSERT_EQ(skel->bss->sk_cookie_seen, cookie(*fd_sv), in run_assign_reuse()
|
| A D | sock_iter_batch.c | 17 __u64 cookie; member 21 __u64 cookie; member 31 if (!counts[i].cookie) { in insert() 33 } else if (counts[i].cookie == cookie) { in insert() 41 counts[insert].cookie = cookie; in insert() 68 __u64 cookie; in socket_cookie() local 74 return cookie; in socket_cookie() 79 __u64 cookie = socket_cookie(fd); in was_seen() local 83 if (cookie == counts[i].cookie) in was_seen() 126 __u64 cookie = socket_cookie(fd); in destroy() local [all …]
|
| A D | sk_storage_omem_uncharge.c | 27 optlen = sizeof(skel->bss->cookie); in test_sk_storage_omem_uncharge() 28 err = getsockopt(sk_fd, SOL_SOCKET, SO_COOKIE, &skel->bss->cookie, &optlen); in test_sk_storage_omem_uncharge()
|
| /tools/bpf/bpftool/ |
| A D | net.c | 154 void *cookie) in netlink_recv() argument 199 ret = _fn(nh, fn, cookie); in netlink_recv() 212 void *cookie) in __dump_class_nlmsg() argument 223 return dump_class_nlmsg(cookie, t, tb); in __dump_class_nlmsg() 246 dump_class_nlmsg, cookie); in netlink_get_class() 251 void *cookie) in __dump_qdisc_nlmsg() argument 285 dump_qdisc_nlmsg, cookie); in netlink_get_qdisc() 290 void *cookie) in __dump_filter_nlmsg() argument 325 dump_filter_nlmsg, cookie); in netlink_get_filter() 362 dump_link_nlmsg, cookie); in netlink_get_link() [all …]
|
| A D | link.c | 254 __u64 cookie; member 279 data[i].cookie = cookies[i]; in get_addr_cookie_array() 322 jsonw_uint_field(json_wtr, "cookie", data[j].cookie); in show_kprobe_multi_json() 809 if (info->perf_event.kprobe.cookie) in show_perf_event_kprobe_plain() 827 if (info->perf_event.uprobe.cookie) in show_perf_event_uprobe_plain() 842 if (info->perf_event.tracepoint.cookie) in show_perf_event_tracepoint_plain() 865 if (info->perf_event.event.cookie) in show_perf_event_event_plain() 884 if (info->raw_tracepoint.cookie) in show_link_close_plain() 885 printf("cookie %llu ", info->raw_tracepoint.cookie); in show_link_close_plain() 904 if (info->tracing.cookie) in show_link_close_plain() [all …]
|
| /tools/testing/selftests/net/af_unix/ |
| A D | diag_uid.c | 24 __u64 cookie; in FIXTURE() local 65 optlen = sizeof(self->cookie); in FIXTURE_SETUP() 66 ret = getsockopt(self->unix_fd, SOL_SOCKET, SO_COOKIE, &self->cookie, &optlen); in FIXTURE_SETUP() 93 (__u32)self->cookie, in send_request() 94 (__u32)(self->cookie >> 32) in send_request()
|
| /tools/lib/bpf/ |
| A D | netlink.c | 29 void *cookie); 134 void *cookie) in libbpf_netlink_recv() argument 201 ret = _fn(nh, fn, cookie); in libbpf_netlink_recv() 225 void *cookie) in libbpf_netlink_send_recv() argument 243 parse_msg, parse_attr, cookie); in libbpf_netlink_send_recv() 250 void *cookie) in parse_genl_family_id() argument 255 __u16 *id = cookie; in parse_genl_family_id() 363 struct xdp_id_md *xdp_id = cookie; in get_xdp_info() 406 void *cookie) in parse_xdp_features() argument 674 struct bpf_cb_ctx *info = cookie; in __get_tc_info() [all …]
|
| /tools/perf/util/intel-pt-decoder/ |
| A D | intel-pt-log.c | 96 static ssize_t log_buf__write(void *cookie, const char *buf, size_t size) in log_buf__write() argument 98 struct log_buf *b = cookie; in log_buf__write() 120 static int log_buf__close(void *cookie) in log_buf__close() argument 122 struct log_buf *b = cookie; in log_buf__close()
|
| /tools/testing/selftests/net/ |
| A D | msg_zerocopy.c | 173 static void add_zcopy_cookie(struct msghdr *msg, uint32_t cookie) in add_zcopy_cookie() argument 180 cm->cmsg_len = CMSG_LEN(sizeof(cookie)); in add_zcopy_cookie() 183 memcpy(CMSG_DATA(cm), &cookie, sizeof(cookie)); in add_zcopy_cookie() 189 static uint32_t cookie; in do_sendmsg() local 190 char ckbuf[CMSG_SPACE(sizeof(cookie))]; in do_sendmsg() 201 msg->msg_controllen = CMSG_SPACE(sizeof(cookie)); in do_sendmsg() 203 add_zcopy_cookie(msg, ++cookie); in do_sendmsg()
|
| /tools/testing/selftests/net/packetdrill/ |
| A D | tcp_zerocopy_fastopen-client.pkt | 7 // Fastopen requires a stored cookie. Create two sockets. The first 13 // Send a FastOpen request, no cookie yet so no data in SYN
|