/linux/tools/testing/selftests/bpf/prog_tests/ |
A D | prog_run_xattr.c | 30 struct bpf_prog_test_run_attr tattr = { in test_prog_run_xattr() local 48 err = bpf_prog_test_run_xattr(&tattr); in test_prog_run_xattr() 59 run_cnt += tattr.repeat; in test_prog_run_xattr() 60 check_run_cnt(tattr.prog_fd, run_cnt); in test_prog_run_xattr() 62 tattr.data_out = NULL; in test_prog_run_xattr() 63 tattr.data_size_out = 0; in test_prog_run_xattr() 64 tattr.repeat = 2; in test_prog_run_xattr() 67 err = bpf_prog_test_run_xattr(&tattr); in test_prog_run_xattr() 71 tattr.data_size_out = 1; in test_prog_run_xattr() 72 err = bpf_prog_test_run_xattr(&tattr); in test_prog_run_xattr() [all …]
|
A D | xdp_adjust_tail.c | 70 struct bpf_prog_test_run_attr tattr = { in test_xdp_adjust_tail_grow2() local 85 tattr.data_size_out = 128; /* Limit copy_size */ in test_xdp_adjust_tail_grow2() 87 err = bpf_prog_test_run_xattr(&tattr); in test_xdp_adjust_tail_grow2() 90 || tattr.retval != XDP_TX in test_xdp_adjust_tail_grow2() 94 err, errno, tattr.retval, tattr.data_size_out); in test_xdp_adjust_tail_grow2() 97 CHECK_ATTR(tattr.data_size_out != 192 in test_xdp_adjust_tail_grow2() 103 err, errno, tattr.retval, tattr.data_size_out); in test_xdp_adjust_tail_grow2() 109 err = bpf_prog_test_run_xattr(&tattr); in test_xdp_adjust_tail_grow2() 113 || tattr.retval != XDP_TX in test_xdp_adjust_tail_grow2() 117 err, errno, tattr.retval, tattr.data_size_out, max_grow); in test_xdp_adjust_tail_grow2() [all …]
|
A D | skb_ctx.c | 23 struct bpf_prog_test_run_attr tattr = { in test_skb_ctx() local 36 &tattr.prog_fd); in test_skb_ctx() 42 tattr.ctx_size_in = 0; in test_skb_ctx() 43 err = bpf_prog_test_run_xattr(&tattr); in test_skb_ctx() 45 tattr.ctx_size_in = sizeof(skb); in test_skb_ctx() 49 tattr.ctx_size_out = 0; in test_skb_ctx() 50 err = bpf_prog_test_run_xattr(&tattr); in test_skb_ctx() 52 tattr.ctx_size_out = sizeof(skb); in test_skb_ctx() 57 err = bpf_prog_test_run_xattr(&tattr); in test_skb_ctx() 79 CHECK_ATTR(err != 0 || tattr.retval, in test_skb_ctx() [all …]
|
A D | check_mtu.c | 87 struct bpf_prog_test_run_attr tattr = { in test_check_mtu_run_xdp() local 96 err = bpf_prog_test_run_xattr(&tattr); in test_check_mtu_run_xdp() 99 prog_name, err, errno, tattr.retval); in test_check_mtu_run_xdp() 101 CHECK(tattr.retval != retval_expect, "retval", in test_check_mtu_run_xdp() 103 prog_name, tattr.retval, retval_expect); in test_check_mtu_run_xdp() 147 struct bpf_prog_test_run_attr tattr = { in test_check_mtu_run_tc() local 156 err = bpf_prog_test_run_xattr(&tattr); in test_check_mtu_run_tc() 159 prog_name, err, errno, tattr.retval); in test_check_mtu_run_tc() 161 CHECK(tattr.retval != retval_expect, "retval", in test_check_mtu_run_tc() 163 prog_name, tattr.retval, retval_expect); in test_check_mtu_run_tc()
|
A D | cls_redirect.c | 166 return tattr->data_size_out < tattr->data_size_in; in was_decapsulated() 370 struct bpf_prog_test_run_attr tattr = {}; in test_cls_redirect_common() local 397 tattr.prog_fd = bpf_program__fd(prog); in test_cls_redirect_common() 410 tattr.data_out = tmp; in test_cls_redirect_common() 411 tattr.data_size_out = sizeof(tmp); in test_cls_redirect_common() 413 tattr.data_in = input; in test_cls_redirect_common() 415 if (CHECK_FAIL(!tattr.data_size_in)) in test_cls_redirect_common() 418 err = bpf_prog_test_run_xattr(&tattr); in test_cls_redirect_common() 422 if (tattr.retval != TC_ACT_REDIRECT) { in test_cls_redirect_common() 424 tattr.retval); in test_cls_redirect_common() [all …]
|
A D | kfree_skb.c | 55 struct bpf_prog_test_run_attr tattr = { in serial_test_kfree_skb() local 78 &obj, &tattr.prog_fd); in serial_test_kfree_skb() 122 err = bpf_prog_test_run_xattr(&tattr); in serial_test_kfree_skb() 123 duration = tattr.duration; in serial_test_kfree_skb() 124 CHECK(err || tattr.retval, "ipv6", in serial_test_kfree_skb() 126 err, errno, tattr.retval, duration); in serial_test_kfree_skb()
|
A D | syscall.c | 23 struct bpf_prog_test_run_attr tattr = { in test_syscall() local 35 tattr.prog_fd = bpf_program__fd(skel->progs.bpf_prog); in test_syscall() 36 err = bpf_prog_test_run_xattr(&tattr); in test_syscall() 38 ASSERT_EQ(tattr.retval, 1, "retval"); in test_syscall()
|
A D | skb_helpers.c | 12 struct bpf_prog_test_run_attr tattr = { in test_skb_helpers() local 24 &tattr.prog_fd); in test_skb_helpers() 27 err = bpf_prog_test_run_xattr(&tattr); in test_skb_helpers()
|
A D | flow_dissector.c | 490 struct bpf_prog_test_run_attr tattr = {}; in run_tests_skb_less() local 576 struct bpf_prog_test_run_attr tattr = { in test_flow_dissector() local 585 tattr.ctx_in = &ctx; in test_flow_dissector() 586 tattr.ctx_size_in = sizeof(ctx); in test_flow_dissector() 590 err = bpf_prog_test_run_xattr(&tattr); in test_flow_dissector() 591 CHECK_ATTR(tattr.data_size_out != sizeof(flow_keys) || in test_flow_dissector() 592 err || tattr.retval != 1, in test_flow_dissector() 595 err, errno, tattr.retval, tattr.duration, in test_flow_dissector() 596 tattr.data_size_out, sizeof(flow_keys)); in test_flow_dissector()
|
A D | sockmap_basic.c | 142 struct bpf_prog_test_run_attr tattr; in test_sockmap_update() local 169 tattr = (struct bpf_prog_test_run_attr){ in test_sockmap_update() 176 err = bpf_prog_test_run_xattr(&tattr); in test_sockmap_update() 177 if (CHECK_ATTR(err || !tattr.retval, "bpf_prog_test_run", in test_sockmap_update() 178 "errno=%u retval=%u\n", errno, tattr.retval)) in test_sockmap_update()
|
/linux/tools/firewire/ |
A D | nosy-dump.c | 875 struct termios tattr; in set_input_mode() local 888 tcgetattr(STDIN_FILENO, &tattr); in set_input_mode() 889 tattr.c_lflag &= ~(ICANON|ECHO); /* Clear ICANON and ECHO. */ in set_input_mode() 890 tattr.c_cc[VMIN] = 1; in set_input_mode() 891 tattr.c_cc[VTIME] = 0; in set_input_mode() 892 tcsetattr(STDIN_FILENO, TCSAFLUSH, &tattr); in set_input_mode()
|
/linux/tools/testing/selftests/bpf/ |
A D | test_progs.h | 165 _CHECK(condition, tag, tattr.duration, format)
|
/linux/security/selinux/ss/ |
A D | services.c | 631 struct ebitmap *sattr, *tattr; in context_struct_compute_av() local 658 tattr = &policydb->type_attr_map_array[tcontext->type - 1]; in context_struct_compute_av() 660 ebitmap_for_each_positive_bit(tattr, tnode, j) { in context_struct_compute_av() 1029 struct ebitmap *sattr, *tattr; in security_compute_xperms_decision() local 1077 tattr = &policydb->type_attr_map_array[tcontext->type - 1]; in security_compute_xperms_decision() 1079 ebitmap_for_each_positive_bit(tattr, tnode, j) { in security_compute_xperms_decision()
|