In particular these include: 1) Remove output of inv for scalars in print_verifier_state 2) Replace inv with scalar in verifier error messages 3) Remove _value suffixes for umin/umax/s32_min/etc (except map_value) 4) Remove output of id=0 5) Remove output of ref_obj_id=0
Unified · Split
| @@ -539,7 +539,7 @@ static const char *reg_type_str(struct bpf_verifier_env *env, · 538 unmodified lines | ||
| 539 | 539 | char postfix[16] = {0}, prefix[32] = {0}; |
| 540 | 540 | static const char * const str[] = { |
| 541 | 541 | [NOT_INIT] = "?", |
| 542 | − [SCALAR_VALUE] = "inv", | |
| 542 | + [SCALAR_VALUE] = "scalar", | |
| 543 | 543 | [PTR_TO_CTX] = "ctx", |
| 544 | 544 | [CONST_PTR_TO_MAP] = "map_ptr", |
| 545 | 545 | [PTR_TO_MAP_VALUE] = "map_value", |
| @@ -685,74 +685,80 @@ static void print_verifier_state(struct bpf_verifier_env *env, · 139 unmodified lines | ||
| 685 | 685 | continue; |
| 686 | 686 | verbose(env, " R%d", i); |
| 687 | 687 | print_liveness(env, reg->live); |
| 688 | − verbose(env, "=%s", reg_type_str(env, t)); | |
| 688 | + verbose(env, "="); | |
| 689 | 689 | if (t == SCALAR_VALUE && reg->precise) |
| 690 | 690 | verbose(env, "P"); |
| 691 | 691 | if ((t == SCALAR_VALUE || t == PTR_TO_STACK) && |
| 692 | 692 | tnum_is_const(reg->var_off)) { |
| 693 | 693 | /* reg->off should be 0 for SCALAR_VALUE */ |
| 694 | + verbose(env, "%s", t == SCALAR_VALUE ? "" : reg_type_str(env, t)); | |
| 694 | 695 | verbose(env, "%lld", reg->var_off.value + reg->off); |
| 695 | 696 | } else { |
| 697 | + const char *sep = ""; | |
| 698 | + | |
| 699 | + verbose(env, "%s", reg_type_str(env, t)); | |
| 696 | 700 | if (base_type(t) == PTR_TO_BTF_ID || |
| 697 | 701 | base_type(t) == PTR_TO_PERCPU_BTF_ID) |
| 698 | 702 | verbose(env, "%s", kernel_type_name(reg->btf, reg->btf_id)); |
| 699 | − verbose(env, "(id=%d", reg->id); | |
| 700 | − if (reg_type_may_be_refcounted_or_null(t)) | |
| 701 | − verbose(env, ",ref_obj_id=%d", reg->ref_obj_id); | |
| 703 | + verbose(env, "("); | |
| 704 | +/* | |
| 705 | + * _a stands for append, was shortened to avoid multiline statements below. | |
| 706 | + * This macro is used to output a comma separated list of attributes. | |
| 707 | + */ | |
| 708 | +#define verbose_a(fmt, ...) ({ verbose(env, "%s" fmt, sep, __VA_ARGS__); sep = ","; }) | |
| 709 | + | |
| 710 | + if (reg->id) | |
| 711 | + verbose_a("id=%d", reg->id); | |
| 712 | + if (reg_type_may_be_refcounted_or_null(t) && reg->ref_obj_id) | |
| 713 | + verbose_a("ref_obj_id=%d", reg->ref_obj_id); | |
| 702 | 714 | if (t != SCALAR_VALUE) |
| 703 | − verbose(env, ",off=%d", reg->off); | |
| 715 | + verbose_a("off=%d", reg->off); | |
| 704 | 716 | if (type_is_pkt_pointer(t)) |
| 705 | − verbose(env, ",r=%d", reg->range); | |
| 717 | + verbose_a("r=%d", reg->range); | |
| 706 | 718 | else if (base_type(t) == CONST_PTR_TO_MAP || |
| 707 | 719 | base_type(t) == PTR_TO_MAP_KEY || |
| 708 | 720 | base_type(t) == PTR_TO_MAP_VALUE) |
| 709 | − verbose(env, ",ks=%d,vs=%d", | |
| 710 | − reg->map_ptr->key_size, | |
| 711 | − reg->map_ptr->value_size); | |
| 721 | + verbose_a("ks=%d,vs=%d", | |
| 722 | + reg->map_ptr->key_size, | |
| 723 | + reg->map_ptr->value_size); | |
| 712 | 724 | if (tnum_is_const(reg->var_off)) { |
| 713 | 725 | /* Typically an immediate SCALAR_VALUE, but |
| 714 | 726 | * could be a pointer whose offset is too big |
| 715 | 727 | * for reg->off |
| 716 | 728 | */ |
| 717 | − verbose(env, ",imm=%llx", reg->var_off.value); | |
| 729 | + verbose_a("imm=%llx", reg->var_off.value); | |
| 718 | 730 | } else { |
| 719 | 731 | if (reg->smin_value != reg->umin_value && |
| 720 | 732 | reg->smin_value != S64_MIN) |
| 721 | − verbose(env, ",smin_value=%lld", | |
| 722 | − (long long)reg->smin_value); | |
| 733 | + verbose_a("smin=%lld", (long long)reg->smin_value); | |
| 723 | 734 | if (reg->smax_value != reg->umax_value && |
| 724 | 735 | reg->smax_value != S64_MAX) |
| 725 | − verbose(env, ",smax_value=%lld", | |
| 726 | − (long long)reg->smax_value); | |
| 736 | + verbose_a("smax=%lld", (long long)reg->smax_value); | |
| 727 | 737 | if (reg->umin_value != 0) |
| 728 | − verbose(env, ",umin_value=%llu", | |
| 729 | − (unsigned long long)reg->umin_value); | |
| 738 | + verbose_a("umin=%llu", (unsigned long long)reg->umin_value); | |
| 730 | 739 | if (reg->umax_value != U64_MAX) |
| 731 | − verbose(env, ",umax_value=%llu", | |
| 732 | − (unsigned long long)reg->umax_value); | |
| 740 | + verbose_a("umax=%llu", (unsigned long long)reg->umax_value); | |
| 733 | 741 | if (!tnum_is_unknown(reg->var_off)) { |
| 734 | 742 | char tn_buf[48]; |
| 735 | 743 | |
| 736 | 744 | tnum_strn(tn_buf, sizeof(tn_buf), reg->var_off); |
| 737 | − verbose(env, ",var_off=%s", tn_buf); | |
| 745 | + verbose_a("var_off=%s", tn_buf); | |
| 738 | 746 | } |
| 739 | 747 | if (reg->s32_min_value != reg->smin_value && |
| 740 | 748 | reg->s32_min_value != S32_MIN) |
| 741 | − verbose(env, ",s32_min_value=%d", | |
| 742 | − (int)(reg->s32_min_value)); | |
| 749 | + verbose_a("s32_min=%d", (int)(reg->s32_min_value)); | |
| 743 | 750 | if (reg->s32_max_value != reg->smax_value && |
| 744 | 751 | reg->s32_max_value != S32_MAX) |
| 745 | − verbose(env, ",s32_max_value=%d", | |
| 746 | − (int)(reg->s32_max_value)); | |
| 752 | + verbose_a("s32_max=%d", (int)(reg->s32_max_value)); | |
| 747 | 753 | if (reg->u32_min_value != reg->umin_value && |
| 748 | 754 | reg->u32_min_value != U32_MIN) |
| 749 | − verbose(env, ",u32_min_value=%d", | |
| 750 | − (int)(reg->u32_min_value)); | |
| 755 | + verbose_a("u32_min=%d", (int)(reg->u32_min_value)); | |
| 751 | 756 | if (reg->u32_max_value != reg->umax_value && |
| 752 | 757 | reg->u32_max_value != U32_MAX) |
| 753 | − verbose(env, ",u32_max_value=%d", | |
| 754 | − (int)(reg->u32_max_value)); | |
| 758 | + verbose_a("u32_max=%d", (int)(reg->u32_max_value)); | |
| 755 | 759 | } |
| 760 | +#undef verbose_a | |
| 761 | + | |
| 756 | 762 | verbose(env, ")"); |
| 757 | 763 | } |
| 758 | 764 | } |
| @@ -777,7 +783,7 @@ static void print_verifier_state(struct bpf_verifier_env *env, · 18 unmodified lines | ||
| 777 | 783 | if (is_spilled_reg(&state->stack[i])) { |
| 778 | 784 | reg = &state->stack[i].spilled_ptr; |
| 779 | 785 | t = reg->type; |
| 780 | − verbose(env, "=%s", reg_type_str(env, t)); | |
| 786 | + verbose(env, "=%s", t == SCALAR_VALUE ? "" : reg_type_str(env, t)); | |
| 781 | 787 | if (t == SCALAR_VALUE && reg->precise) |
| 782 | 788 | verbose(env, "P"); |
| 783 | 789 | if (t == SCALAR_VALUE && tnum_is_const(reg->var_off)) |
| @@ -39,13 +39,13 @@ static struct bpf_align_test tests[] = { · 38 unmodified lines | ||
| 39 | 39 | }, |
| 40 | 40 | .prog_type = BPF_PROG_TYPE_SCHED_CLS, |
| 41 | 41 | .matches = { |
| 42 | − {0, "R1=ctx(id=0,off=0,imm=0)"}, | |
| 42 | + {0, "R1=ctx(off=0,imm=0)"}, | |
| 43 | 43 | {0, "R10=fp0"}, |
| 44 | − {0, "R3_w=inv2"}, | |
| 45 | − {1, "R3_w=inv4"}, | |
| 46 | − {2, "R3_w=inv8"}, | |
| 47 | − {3, "R3_w=inv16"}, | |
| 48 | − {4, "R3_w=inv32"}, | |
| 44 | + {0, "R3_w=2"}, | |
| 45 | + {1, "R3_w=4"}, | |
| 46 | + {2, "R3_w=8"}, | |
| 47 | + {3, "R3_w=16"}, | |
| 48 | + {4, "R3_w=32"}, | |
| 49 | 49 | }, |
| 50 | 50 | }, |
| 51 | 51 | { |
| @@ -67,19 +67,19 @@ static struct bpf_align_test tests[] = { · 15 unmodified lines | ||
| 67 | 67 | }, |
| 68 | 68 | .prog_type = BPF_PROG_TYPE_SCHED_CLS, |
| 69 | 69 | .matches = { |
| 70 | − {0, "R1=ctx(id=0,off=0,imm=0)"}, | |
| 70 | + {0, "R1=ctx(off=0,imm=0)"}, | |
| 71 | 71 | {0, "R10=fp0"}, |
| 72 | − {0, "R3_w=inv1"}, | |
| 73 | − {1, "R3_w=inv2"}, | |
| 74 | − {2, "R3_w=inv4"}, | |
| 75 | − {3, "R3_w=inv8"}, | |
| 76 | − {4, "R3_w=inv16"}, | |
| 77 | − {5, "R3_w=inv1"}, | |
| 78 | − {6, "R4_w=inv32"}, | |
| 79 | − {7, "R4_w=inv16"}, | |
| 80 | − {8, "R4_w=inv8"}, | |
| 81 | − {9, "R4_w=inv4"}, | |
| 82 | − {10, "R4_w=inv2"}, | |
| 72 | + {0, "R3_w=1"}, | |
| 73 | + {1, "R3_w=2"}, | |
| 74 | + {2, "R3_w=4"}, | |
| 75 | + {3, "R3_w=8"}, | |
| 76 | + {4, "R3_w=16"}, | |
| 77 | + {5, "R3_w=1"}, | |
| 78 | + {6, "R4_w=32"}, | |
| 79 | + {7, "R4_w=16"}, | |
| 80 | + {8, "R4_w=8"}, | |
| 81 | + {9, "R4_w=4"}, | |
| 82 | + {10, "R4_w=2"}, | |
| 83 | 83 | }, |
| 84 | 84 | }, |
| 85 | 85 | { |
| @@ -96,14 +96,14 @@ static struct bpf_align_test tests[] = { · 10 unmodified lines | ||
| 96 | 96 | }, |
| 97 | 97 | .prog_type = BPF_PROG_TYPE_SCHED_CLS, |
| 98 | 98 | .matches = { |
| 99 | − {0, "R1=ctx(id=0,off=0,imm=0)"}, | |
| 99 | + {0, "R1=ctx(off=0,imm=0)"}, | |
| 100 | 100 | {0, "R10=fp0"}, |
| 101 | − {0, "R3_w=inv4"}, | |
| 102 | − {1, "R3_w=inv8"}, | |
| 103 | − {2, "R3_w=inv10"}, | |
| 104 | − {3, "R4_w=inv8"}, | |
| 105 | − {4, "R4_w=inv12"}, | |
| 106 | − {5, "R4_w=inv14"}, | |
| 101 | + {0, "R3_w=4"}, | |
| 102 | + {1, "R3_w=8"}, | |
| 103 | + {2, "R3_w=10"}, | |
| 104 | + {3, "R4_w=8"}, | |
| 105 | + {4, "R4_w=12"}, | |
| 106 | + {5, "R4_w=14"}, | |
| 107 | 107 | }, |
| 108 | 108 | }, |
| 109 | 109 | { |
| @@ -118,12 +118,12 @@ static struct bpf_align_test tests[] = { · 8 unmodified lines | ||
| 118 | 118 | }, |
| 119 | 119 | .prog_type = BPF_PROG_TYPE_SCHED_CLS, |
| 120 | 120 | .matches = { |
| 121 | − {0, "R1=ctx(id=0,off=0,imm=0)"}, | |
| 121 | + {0, "R1=ctx(off=0,imm=0)"}, | |
| 122 | 122 | {0, "R10=fp0"}, |
| 123 | − {0, "R3_w=inv7"}, | |
| 124 | − {1, "R3_w=inv7"}, | |
| 125 | − {2, "R3_w=inv14"}, | |
| 126 | − {3, "R3_w=inv56"}, | |
| 123 | + {0, "R3_w=7"}, | |
| 124 | + {1, "R3_w=7"}, | |
| 125 | + {2, "R3_w=14"}, | |
| 126 | + {3, "R3_w=56"}, | |
| 127 | 127 | }, |
| 128 | 128 | }, |
| 129 | 129 | |
| @@ -161,19 +161,19 @@ static struct bpf_align_test tests[] = { · 31 unmodified lines | ||
| 161 | 161 | }, |
| 162 | 162 | .prog_type = BPF_PROG_TYPE_SCHED_CLS, |
| 163 | 163 | .matches = { |
| 164 | − {6, "R0_w=pkt(id=0,off=8,r=8,imm=0)"}, | |
| 165 | − {6, "R3_w=inv(id=0,umax_value=255,var_off=(0x0; 0xff))"}, | |
| 166 | − {7, "R3_w=inv(id=0,umax_value=510,var_off=(0x0; 0x1fe))"}, | |
| 167 | − {8, "R3_w=inv(id=0,umax_value=1020,var_off=(0x0; 0x3fc))"}, | |
| 168 | − {9, "R3_w=inv(id=0,umax_value=2040,var_off=(0x0; 0x7f8))"}, | |
| 169 | − {10, "R3_w=inv(id=0,umax_value=4080,var_off=(0x0; 0xff0))"}, | |
| 170 | − {12, "R3_w=pkt_end(id=0,off=0,imm=0)"}, | |
| 171 | − {17, "R4_w=inv(id=0,umax_value=255,var_off=(0x0; 0xff))"}, | |
| 172 | − {18, "R4_w=inv(id=0,umax_value=8160,var_off=(0x0; 0x1fe0))"}, | |
| 173 | − {19, "R4_w=inv(id=0,umax_value=4080,var_off=(0x0; 0xff0))"}, | |
| 174 | − {20, "R4_w=inv(id=0,umax_value=2040,var_off=(0x0; 0x7f8))"}, | |
| 175 | − {21, "R4_w=inv(id=0,umax_value=1020,var_off=(0x0; 0x3fc))"}, | |
| 176 | − {22, "R4_w=inv(id=0,umax_value=510,var_off=(0x0; 0x1fe))"}, | |
| 164 | + {6, "R0_w=pkt(off=8,r=8,imm=0)"}, | |
| 165 | + {6, "R3_w=scalar(umax=255,var_off=(0x0; 0xff))"}, | |
| 166 | + {7, "R3_w=scalar(umax=510,var_off=(0x0; 0x1fe))"}, | |
| 167 | + {8, "R3_w=scalar(umax=1020,var_off=(0x0; 0x3fc))"}, | |
| 168 | + {9, "R3_w=scalar(umax=2040,var_off=(0x0; 0x7f8))"}, | |
| 169 | + {10, "R3_w=scalar(umax=4080,var_off=(0x0; 0xff0))"}, | |
| 170 | + {12, "R3_w=pkt_end(off=0,imm=0)"}, | |
| 171 | + {17, "R4_w=scalar(umax=255,var_off=(0x0; 0xff))"}, | |
| 172 | + {18, "R4_w=scalar(umax=8160,var_off=(0x0; 0x1fe0))"}, | |
| 173 | + {19, "R4_w=scalar(umax=4080,var_off=(0x0; 0xff0))"}, | |
| 174 | + {20, "R4_w=scalar(umax=2040,var_off=(0x0; 0x7f8))"}, | |
| 175 | + {21, "R4_w=scalar(umax=1020,var_off=(0x0; 0x3fc))"}, | |
| 176 | + {22, "R4_w=scalar(umax=510,var_off=(0x0; 0x1fe))"}, | |
| 177 | 177 | }, |
| 178 | 178 | }, |
| 179 | 179 | { |
| @@ -194,16 +194,16 @@ static struct bpf_align_test tests[] = { · 14 unmodified lines | ||
| 194 | 194 | }, |
| 195 | 195 | .prog_type = BPF_PROG_TYPE_SCHED_CLS, |
| 196 | 196 | .matches = { |
| 197 | − {6, "R3_w=inv(id=0,umax_value=255,var_off=(0x0; 0xff))"}, | |
| 198 | − {7, "R4_w=inv(id=1,umax_value=255,var_off=(0x0; 0xff))"}, | |
| 199 | − {8, "R4_w=inv(id=0,umax_value=255,var_off=(0x0; 0xff))"}, | |
| 200 | − {9, "R4_w=inv(id=1,umax_value=255,var_off=(0x0; 0xff))"}, | |
| 201 | − {10, "R4_w=inv(id=0,umax_value=510,var_off=(0x0; 0x1fe))"}, | |
| 202 | − {11, "R4_w=inv(id=1,umax_value=255,var_off=(0x0; 0xff))"}, | |
| 203 | − {12, "R4_w=inv(id=0,umax_value=1020,var_off=(0x0; 0x3fc))"}, | |
| 204 | − {13, "R4_w=inv(id=1,umax_value=255,var_off=(0x0; 0xff))"}, | |
| 205 | − {14, "R4_w=inv(id=0,umax_value=2040,var_off=(0x0; 0x7f8))"}, | |
| 206 | − {15, "R4_w=inv(id=0,umax_value=4080,var_off=(0x0; 0xff0))"}, | |
| 197 | + {6, "R3_w=scalar(umax=255,var_off=(0x0; 0xff))"}, | |
| 198 | + {7, "R4_w=scalar(id=1,umax=255,var_off=(0x0; 0xff))"}, | |
| 199 | + {8, "R4_w=scalar(umax=255,var_off=(0x0; 0xff))"}, | |
| 200 | + {9, "R4_w=scalar(id=1,umax=255,var_off=(0x0; 0xff))"}, | |
| 201 | + {10, "R4_w=scalar(umax=510,var_off=(0x0; 0x1fe))"}, | |
| 202 | + {11, "R4_w=scalar(id=1,umax=255,var_off=(0x0; 0xff))"}, | |
| 203 | + {12, "R4_w=scalar(umax=1020,var_off=(0x0; 0x3fc))"}, | |
| 204 | + {13, "R4_w=scalar(id=1,umax=255,var_off=(0x0; 0xff))"}, | |
| 205 | + {14, "R4_w=scalar(umax=2040,var_off=(0x0; 0x7f8))"}, | |
| 206 | + {15, "R4_w=scalar(umax=4080,var_off=(0x0; 0xff0))"}, | |
| 207 | 207 | }, |
| 208 | 208 | }, |
| 209 | 209 | { |
| @@ -234,14 +234,14 @@ static struct bpf_align_test tests[] = { · 24 unmodified lines | ||
| 234 | 234 | }, |
| 235 | 235 | .prog_type = BPF_PROG_TYPE_SCHED_CLS, |
| 236 | 236 | .matches = { |
| 237 | − {2, "R5_w=pkt(id=0,off=0,r=0,imm=0)"}, | |
| 238 | − {4, "R5_w=pkt(id=0,off=14,r=0,imm=0)"}, | |
| 239 | − {5, "R4_w=pkt(id=0,off=14,r=0,imm=0)"}, | |
| 240 | − {9, "R2=pkt(id=0,off=0,r=18,imm=0)"}, | |
| 241 | − {10, "R5=pkt(id=0,off=14,r=18,imm=0)"}, | |
| 242 | − {10, "R4_w=inv(id=0,umax_value=255,var_off=(0x0; 0xff))"}, | |
| 243 | − {13, "R4_w=inv(id=0,umax_value=65535,var_off=(0x0; 0xffff))"}, | |
| 244 | − {14, "R4_w=inv(id=0,umax_value=65535,var_off=(0x0; 0xffff))"}, | |
| 237 | + {2, "R5_w=pkt(off=0,r=0,imm=0)"}, | |
| 238 | + {4, "R5_w=pkt(off=14,r=0,imm=0)"}, | |
| 239 | + {5, "R4_w=pkt(off=14,r=0,imm=0)"}, | |
| 240 | + {9, "R2=pkt(off=0,r=18,imm=0)"}, | |
| 241 | + {10, "R5=pkt(off=14,r=18,imm=0)"}, | |
| 242 | + {10, "R4_w=scalar(umax=255,var_off=(0x0; 0xff))"}, | |
| 243 | + {13, "R4_w=scalar(umax=65535,var_off=(0x0; 0xffff))"}, | |
| 244 | + {14, "R4_w=scalar(umax=65535,var_off=(0x0; 0xffff))"}, | |
| 245 | 245 | }, |
| 246 | 246 | }, |
| 247 | 247 | { |
| @@ -296,59 +296,59 @@ static struct bpf_align_test tests[] = { · 48 unmodified lines | ||
| 296 | 296 | /* Calculated offset in R6 has unknown value, but known |
| 297 | 297 | * alignment of 4. |
| 298 | 298 | */ |
| 299 | − {6, "R2_w=pkt(id=0,off=0,r=8,imm=0)"}, | |
| 300 | − {7, "R6_w=inv(id=0,umax_value=1020,var_off=(0x0; 0x3fc))"}, | |
| 299 | + {6, "R2_w=pkt(off=0,r=8,imm=0)"}, | |
| 300 | + {7, "R6_w=scalar(umax=1020,var_off=(0x0; 0x3fc))"}, | |
| 301 | 301 | /* Offset is added to packet pointer R5, resulting in |
| 302 | 302 | * known fixed offset, and variable offset from R6. |
| 303 | 303 | */ |
| 304 | − {11, "R5_w=pkt(id=1,off=14,r=0,umax_value=1020,var_off=(0x0; 0x3fc))"}, | |
| 304 | + {11, "R5_w=pkt(id=1,off=14,r=0,umax=1020,var_off=(0x0; 0x3fc))"}, | |
| 305 | 305 | /* At the time the word size load is performed from R5, |
| 306 | 306 | * it's total offset is NET_IP_ALIGN + reg->off (0) + |
| 307 | 307 | * reg->aux_off (14) which is 16. Then the variable |
| 308 | 308 | * offset is considered using reg->aux_off_align which |
| 309 | 309 | * is 4 and meets the load's requirements. |
| 310 | 310 | */ |
| 311 | − {15, "R4=pkt(id=1,off=18,r=18,umax_value=1020,var_off=(0x0; 0x3fc))"}, | |
| 312 | − {15, "R5=pkt(id=1,off=14,r=18,umax_value=1020,var_off=(0x0; 0x3fc))"}, | |
| 311 | + {15, "R4=pkt(id=1,off=18,r=18,umax=1020,var_off=(0x0; 0x3fc))"}, | |
| 312 | + {15, "R5=pkt(id=1,off=14,r=18,umax=1020,var_off=(0x0; 0x3fc))"}, | |
| 313 | 313 | /* Variable offset is added to R5 packet pointer, |
| 314 | 314 | * resulting in auxiliary alignment of 4. |
| 315 | 315 | */ |
| 316 | − {17, "R5_w=pkt(id=2,off=0,r=0,umax_value=1020,var_off=(0x0; 0x3fc))"}, | |
| 316 | + {17, "R5_w=pkt(id=2,off=0,r=0,umax=1020,var_off=(0x0; 0x3fc))"}, | |
| 317 | 317 | /* Constant offset is added to R5, resulting in |
| 318 | 318 | * reg->off of 14. |
| 319 | 319 | */ |
| 320 | − {18, "R5_w=pkt(id=2,off=14,r=0,umax_value=1020,var_off=(0x0; 0x3fc))"}, | |
| 320 | + {18, "R5_w=pkt(id=2,off=14,r=0,umax=1020,var_off=(0x0; 0x3fc))"}, | |
| 321 | 321 | /* At the time the word size load is performed from R5, |
| 322 | 322 | * its total fixed offset is NET_IP_ALIGN + reg->off |
| 323 | 323 | * (14) which is 16. Then the variable offset is 4-byte |
| 324 | 324 | * aligned, so the total offset is 4-byte aligned and |
| 325 | 325 | * meets the load's requirements. |
| 326 | 326 | */ |
| 327 | − {23, "R4=pkt(id=2,off=18,r=18,umax_value=1020,var_off=(0x0; 0x3fc))"}, | |
| 328 | − {23, "R5=pkt(id=2,off=14,r=18,umax_value=1020,var_off=(0x0; 0x3fc))"}, | |
| 327 | + {23, "R4=pkt(id=2,off=18,r=18,umax=1020,var_off=(0x0; 0x3fc))"}, | |
| 328 | + {23, "R5=pkt(id=2,off=14,r=18,umax=1020,var_off=(0x0; 0x3fc))"}, | |
| 329 | 329 | /* Constant offset is added to R5 packet pointer, |
| 330 | 330 | * resulting in reg->off value of 14. |
| 331 | 331 | */ |
| 332 | − {25, "R5_w=pkt(id=0,off=14,r=8"}, | |
| 332 | + {25, "R5_w=pkt(off=14,r=8"}, | |
| 333 | 333 | /* Variable offset is added to R5, resulting in a |
| 334 | 334 | * variable offset of (4n). |
| 335 | 335 | */ |
| 336 | − {26, "R5_w=pkt(id=3,off=14,r=0,umax_value=1020,var_off=(0x0; 0x3fc))"}, | |
| 336 | + {26, "R5_w=pkt(id=3,off=14,r=0,umax=1020,var_off=(0x0; 0x3fc))"}, | |
| 337 | 337 | /* Constant is added to R5 again, setting reg->off to 18. */ |
| 338 | − {27, "R5_w=pkt(id=3,off=18,r=0,umax_value=1020,var_off=(0x0; 0x3fc))"}, | |
| 338 | + {27, "R5_w=pkt(id=3,off=18,r=0,umax=1020,var_off=(0x0; 0x3fc))"}, | |
| 339 | 339 | /* And once more we add a variable; resulting var_off |
| 340 | 340 | * is still (4n), fixed offset is not changed. |
| 341 | 341 | * Also, we create a new reg->id. |
| 342 | 342 | */ |
| 343 | − {28, "R5_w=pkt(id=4,off=18,r=0,umax_value=2040,var_off=(0x0; 0x7fc)"}, | |
| 343 | + {28, "R5_w=pkt(id=4,off=18,r=0,umax=2040,var_off=(0x0; 0x7fc)"}, | |
| 344 | 344 | /* At the time the word size load is performed from R5, |
| 345 | 345 | * its total fixed offset is NET_IP_ALIGN + reg->off (18) |
| 346 | 346 | * which is 20. Then the variable offset is (4n), so |
| 347 | 347 | * the total offset is 4-byte aligned and meets the |
| 348 | 348 | * load's requirements. |
| 349 | 349 | */ |
| 350 | − {33, "R4=pkt(id=4,off=22,r=22,umax_value=2040,var_off=(0x0; 0x7fc)"}, | |
| 351 | − {33, "R5=pkt(id=4,off=18,r=22,umax_value=2040,var_off=(0x0; 0x7fc)"}, | |
| 350 | + {33, "R4=pkt(id=4,off=22,r=22,umax=2040,var_off=(0x0; 0x7fc)"}, | |
| 351 | + {33, "R5=pkt(id=4,off=18,r=22,umax=2040,var_off=(0x0; 0x7fc)"}, | |
| 352 | 352 | }, |
| 353 | 353 | }, |
| 354 | 354 | { |
| @@ -386,36 +386,36 @@ static struct bpf_align_test tests[] = { · 31 unmodified lines | ||
| 386 | 386 | /* Calculated offset in R6 has unknown value, but known |
| 387 | 387 | * alignment of 4. |
| 388 | 388 | */ |
| 389 | − {6, "R2_w=pkt(id=0,off=0,r=8,imm=0)"}, | |
| 390 | − {7, "R6_w=inv(id=0,umax_value=1020,var_off=(0x0; 0x3fc))"}, | |
| 389 | + {6, "R2_w=pkt(off=0,r=8,imm=0)"}, | |
| 390 | + {7, "R6_w=scalar(umax=1020,var_off=(0x0; 0x3fc))"}, | |
| 391 | 391 | /* Adding 14 makes R6 be (4n+2) */ |
| 392 | − {8, "R6_w=inv(id=0,umin_value=14,umax_value=1034,var_off=(0x2; 0x7fc))"}, | |
| 392 | + {8, "R6_w=scalar(umin=14,umax=1034,var_off=(0x2; 0x7fc))"}, | |
| 393 | 393 | /* Packet pointer has (4n+2) offset */ |
| 394 | − {11, "R5_w=pkt(id=1,off=0,r=0,umin_value=14,umax_value=1034,var_off=(0x2; 0x7fc)"}, | |
| 395 | − {12, "R4=pkt(id=1,off=4,r=0,umin_value=14,umax_value=1034,var_off=(0x2; 0x7fc)"}, | |
| 394 | + {11, "R5_w=pkt(id=1,off=0,r=0,umin=14,umax=1034,var_off=(0x2; 0x7fc)"}, | |
| 395 | + {12, "R4=pkt(id=1,off=4,r=0,umin=14,umax=1034,var_off=(0x2; 0x7fc)"}, | |
| 396 | 396 | /* At the time the word size load is performed from R5, |
| 397 | 397 | * its total fixed offset is NET_IP_ALIGN + reg->off (0) |
| 398 | 398 | * which is 2. Then the variable offset is (4n+2), so |
| 399 | 399 | * the total offset is 4-byte aligned and meets the |
| 400 | 400 | * load's requirements. |
| 401 | 401 | */ |
| 402 | − {15, "R5=pkt(id=1,off=0,r=4,umin_value=14,umax_value=1034,var_off=(0x2; 0x7fc)"}, | |
| 402 | + {15, "R5=pkt(id=1,off=0,r=4,umin=14,umax=1034,var_off=(0x2; 0x7fc)"}, | |
| 403 | 403 | /* Newly read value in R6 was shifted left by 2, so has |
| 404 | 404 | * known alignment of 4. |
| 405 | 405 | */ |
| 406 | − {17, "R6_w=inv(id=0,umax_value=1020,var_off=(0x0; 0x3fc))"}, | |
| 406 | + {17, "R6_w=scalar(umax=1020,var_off=(0x0; 0x3fc))"}, | |
| 407 | 407 | /* Added (4n) to packet pointer's (4n+2) var_off, giving |
| 408 | 408 | * another (4n+2). |
| 409 | 409 | */ |
| 410 | − {19, "R5_w=pkt(id=2,off=0,r=0,umin_value=14,umax_value=2054,var_off=(0x2; 0xffc)"}, | |
| 411 | − {20, "R4=pkt(id=2,off=4,r=0,umin_value=14,umax_value=2054,var_off=(0x2; 0xffc)"}, | |
| 410 | + {19, "R5_w=pkt(id=2,off=0,r=0,umin=14,umax=2054,var_off=(0x2; 0xffc)"}, | |
| 411 | + {20, "R4=pkt(id=2,off=4,r=0,umin=14,umax=2054,var_off=(0x2; 0xffc)"}, | |
| 412 | 412 | /* At the time the word size load is performed from R5, |
| 413 | 413 | * its total fixed offset is NET_IP_ALIGN + reg->off (0) |
| 414 | 414 | * which is 2. Then the variable offset is (4n+2), so |
| 415 | 415 | * the total offset is 4-byte aligned and meets the |
| 416 | 416 | * load's requirements. |
| 417 | 417 | */ |
| 418 | − {23, "R5=pkt(id=2,off=0,r=4,umin_value=14,umax_value=2054,var_off=(0x2; 0xffc)"}, | |
| 418 | + {23, "R5=pkt(id=2,off=0,r=4,umin=14,umax=2054,var_off=(0x2; 0xffc)"}, | |
| 419 | 419 | }, |
| 420 | 420 | }, |
| 421 | 421 | { |
| @@ -448,18 +448,18 @@ static struct bpf_align_test tests[] = { · 26 unmodified lines | ||
| 448 | 448 | .prog_type = BPF_PROG_TYPE_SCHED_CLS, |
| 449 | 449 | .result = REJECT, |
| 450 | 450 | .matches = { |
| 451 | − {3, "R5_w=pkt_end(id=0,off=0,imm=0)"}, | |
| 451 | + {3, "R5_w=pkt_end(off=0,imm=0)"}, | |
| 452 | 452 | /* (ptr - ptr) << 2 == unknown, (4n) */ |
| 453 | − {5, "R5_w=inv(id=0,smax_value=9223372036854775804,umax_value=18446744073709551612,var_off=(0x0; 0xfffffffffffffffc)"}, | |
| 453 | + {5, "R5_w=scalar(smax=9223372036854775804,umax=18446744073709551612,var_off=(0x0; 0xfffffffffffffffc)"}, | |
| 454 | 454 | /* (4n) + 14 == (4n+2). We blow our bounds, because |
| 455 | 455 | * the add could overflow. |
| 456 | 456 | */ |
| 457 | − {6, "R5_w=inv(id=0,smin_value=-9223372036854775806,smax_value=9223372036854775806,umin_value=2,umax_value=18446744073709551614,var_off=(0x2; 0xfffffffffffffffc)"}, | |
| 457 | + {6, "R5_w=scalar(smin=-9223372036854775806,smax=9223372036854775806,umin=2,umax=18446744073709551614,var_off=(0x2; 0xfffffffffffffffc)"}, | |
| 458 | 458 | /* Checked s>=0 */ |
| 459 | − {9, "R5=inv(id=0,umin_value=2,umax_value=9223372036854775806,var_off=(0x2; 0x7ffffffffffffffc)"}, | |
| 459 | + {9, "R5=scalar(umin=2,umax=9223372036854775806,var_off=(0x2; 0x7ffffffffffffffc)"}, | |
| 460 | 460 | /* packet pointer + nonnegative (4n+2) */ |
| 461 | − {11, "R6_w=pkt(id=1,off=0,r=0,umin_value=2,umax_value=9223372036854775806,var_off=(0x2; 0x7ffffffffffffffc)"}, | |
| 462 | − {12, "R4_w=pkt(id=1,off=4,r=0,umin_value=2,umax_value=9223372036854775806,var_off=(0x2; 0x7ffffffffffffffc)"}, | |
| 461 | + {11, "R6_w=pkt(id=1,off=0,r=0,umin=2,umax=9223372036854775806,var_off=(0x2; 0x7ffffffffffffffc)"}, | |
| 462 | + {12, "R4_w=pkt(id=1,off=4,r=0,umin=2,umax=9223372036854775806,var_off=(0x2; 0x7ffffffffffffffc)"}, | |
| 463 | 463 | /* NET_IP_ALIGN + (4n+2) == (4n), alignment is fine. |
| 464 | 464 | * We checked the bounds, but it might have been able |
| 465 | 465 | * to overflow if the packet pointer started in the |
| @@ -467,7 +467,7 @@ static struct bpf_align_test tests[] = { · 1 unmodified line | ||
| 467 | 467 | * So we did not get a 'range' on R6, and the access |
| 468 | 468 | * attempt will fail. |
| 469 | 469 | */ |
| 470 | − {15, "R6_w=pkt(id=1,off=0,r=0,umin_value=2,umax_value=9223372036854775806,var_off=(0x2; 0x7ffffffffffffffc)"}, | |
| 470 | + {15, "R6_w=pkt(id=1,off=0,r=0,umin=2,umax=9223372036854775806,var_off=(0x2; 0x7ffffffffffffffc)"}, | |
| 471 | 471 | } |
| 472 | 472 | }, |
| 473 | 473 | { |
| @@ -502,23 +502,23 @@ static struct bpf_align_test tests[] = { · 28 unmodified lines | ||
| 502 | 502 | /* Calculated offset in R6 has unknown value, but known |
| 503 | 503 | * alignment of 4. |
| 504 | 504 | */ |
| 505 | − {6, "R2_w=pkt(id=0,off=0,r=8,imm=0)"}, | |
| 506 | − {8, "R6_w=inv(id=0,umax_value=1020,var_off=(0x0; 0x3fc))"}, | |
| 505 | + {6, "R2_w=pkt(off=0,r=8,imm=0)"}, | |
| 506 | + {8, "R6_w=scalar(umax=1020,var_off=(0x0; 0x3fc))"}, | |
| 507 | 507 | /* Adding 14 makes R6 be (4n+2) */ |
| 508 | − {9, "R6_w=inv(id=0,umin_value=14,umax_value=1034,var_off=(0x2; 0x7fc))"}, | |
| 508 | + {9, "R6_w=scalar(umin=14,umax=1034,var_off=(0x2; 0x7fc))"}, | |
| 509 | 509 | /* New unknown value in R7 is (4n) */ |
| 510 | − {10, "R7_w=inv(id=0,umax_value=1020,var_off=(0x0; 0x3fc))"}, | |
| 510 | + {10, "R7_w=scalar(umax=1020,var_off=(0x0; 0x3fc))"}, | |
| 511 | 511 | /* Subtracting it from R6 blows our unsigned bounds */ |
| 512 | − {11, "R6=inv(id=0,smin_value=-1006,smax_value=1034,umin_value=2,umax_value=18446744073709551614,var_off=(0x2; 0xfffffffffffffffc)"}, | |
| 512 | + {11, "R6=scalar(smin=-1006,smax=1034,umin=2,umax=18446744073709551614,var_off=(0x2; 0xfffffffffffffffc)"}, | |
| 513 | 513 | /* Checked s>= 0 */ |
| 514 | − {14, "R6=inv(id=0,umin_value=2,umax_value=1034,var_off=(0x2; 0x7fc))"}, | |
| 514 | + {14, "R6=scalar(umin=2,umax=1034,var_off=(0x2; 0x7fc))"}, | |
| 515 | 515 | /* At the time the word size load is performed from R5, |
| 516 | 516 | * its total fixed offset is NET_IP_ALIGN + reg->off (0) |
| 517 | 517 | * which is 2. Then the variable offset is (4n+2), so |
| 518 | 518 | * the total offset is 4-byte aligned and meets the |
| 519 | 519 | * load's requirements. |
| 520 | 520 | */ |
| 521 | − {20, "R5=pkt(id=2,off=0,r=4,umin_value=2,umax_value=1034,var_off=(0x2; 0x7fc)"}, | |
| 521 | + {20, "R5=pkt(id=2,off=0,r=4,umin=2,umax=1034,var_off=(0x2; 0x7fc)"}, | |
| 522 | 522 | |
| 523 | 523 | }, |
| 524 | 524 | }, |
| @@ -556,23 +556,23 @@ static struct bpf_align_test tests[] = { · 31 unmodified lines | ||
| 556 | 556 | /* Calculated offset in R6 has unknown value, but known |
| 557 | 557 | * alignment of 4. |
| 558 | 558 | */ |
| 559 | − {6, "R2_w=pkt(id=0,off=0,r=8,imm=0)"}, | |
| 560 | − {9, "R6_w=inv(id=0,umax_value=60,var_off=(0x0; 0x3c))"}, | |
| 559 | + {6, "R2_w=pkt(off=0,r=8,imm=0)"}, | |
| 560 | + {9, "R6_w=scalar(umax=60,var_off=(0x0; 0x3c))"}, | |
| 561 | 561 | /* Adding 14 makes R6 be (4n+2) */ |
| 562 | − {10, "R6_w=inv(id=0,umin_value=14,umax_value=74,var_off=(0x2; 0x7c))"}, | |
| 562 | + {10, "R6_w=scalar(umin=14,umax=74,var_off=(0x2; 0x7c))"}, | |
| 563 | 563 | /* Subtracting from packet pointer overflows ubounds */ |
| 564 | − {13, "R5_w=pkt(id=2,off=0,r=8,umin_value=18446744073709551542,umax_value=18446744073709551602,var_off=(0xffffffffffffff82; 0x7c)"}, | |
| 564 | + {13, "R5_w=pkt(id=2,off=0,r=8,umin=18446744073709551542,umax=18446744073709551602,var_off=(0xffffffffffffff82; 0x7c)"}, | |
| 565 | 565 | /* New unknown value in R7 is (4n), >= 76 */ |
| 566 | − {14, "R7_w=inv(id=0,umin_value=76,umax_value=1096,var_off=(0x0; 0x7fc))"}, | |
| 566 | + {14, "R7_w=scalar(umin=76,umax=1096,var_off=(0x0; 0x7fc))"}, | |
| 567 | 567 | /* Adding it to packet pointer gives nice bounds again */ |
| 568 | − {16, "R5_w=pkt(id=3,off=0,r=0,umin_value=2,umax_value=1082,var_off=(0x2; 0xfffffffc)"}, | |
| 568 | + {16, "R5_w=pkt(id=3,off=0,r=0,umin=2,umax=1082,var_off=(0x2; 0xfffffffc)"}, | |
| 569 | 569 | /* At the time the word size load is performed from R5, |
| 570 | 570 | * its total fixed offset is NET_IP_ALIGN + reg->off (0) |
| 571 | 571 | * which is 2. Then the variable offset is (4n+2), so |
| 572 | 572 | * the total offset is 4-byte aligned and meets the |
| 573 | 573 | * load's requirements. |
| 574 | 574 | */ |
| 575 | − {20, "R5=pkt(id=3,off=0,r=4,umin_value=2,umax_value=1082,var_off=(0x2; 0xfffffffc)"}, | |
| 575 | + {20, "R5=pkt(id=3,off=0,r=4,umin=2,umax=1082,var_off=(0x2; 0xfffffffc)"}, | |
| 576 | 576 | }, |
| 577 | 577 | }, |
| 578 | 578 | }; |
| @@ -648,8 +648,8 @@ static int do_test_single(struct bpf_align_test *test) · 69 unmodified lines | ||
| 648 | 648 | /* Check the next line as well in case the previous line |
| 649 | 649 | * did not have a corresponding bpf insn. Example: |
| 650 | 650 | * func#0 @0 |
| 651 | − * 0: R1=ctx(id=0,off=0,imm=0) R10=fp0 | |
| 652 | − * 0: (b7) r3 = 2 ; R3_w=inv2 | |
| 651 | + * 0: R1=ctx(off=0,imm=0) R10=fp0 | |
| 652 | + * 0: (b7) r3 = 2 ; R3_w=2 | |
| 653 | 653 | */ |
| 654 | 654 | if (!strstr(line_ptr, m.match)) { |
| 655 | 655 | cur_line = -1; |
| @@ -78,7 +78,7 @@ static void obj_load_log_buf(void) · 77 unmodified lines | ||
| 78 | 78 | ASSERT_OK_PTR(strstr(libbpf_log_buf, "prog 'bad_prog': BPF program load failed"), |
| 79 | 79 | "libbpf_log_not_empty"); |
| 80 | 80 | ASSERT_OK_PTR(strstr(obj_log_buf, "DATASEC license"), "obj_log_not_empty"); |
| 81 | − ASSERT_OK_PTR(strstr(good_log_buf, "0: R1=ctx(id=0,off=0,imm=0) R10=fp0"), | |
| 81 | + ASSERT_OK_PTR(strstr(good_log_buf, "0: R1=ctx(off=0,imm=0) R10=fp0"), | |
| 82 | 82 | "good_log_verbose"); |
| 83 | 83 | ASSERT_OK_PTR(strstr(bad_log_buf, "invalid access to map value, value_size=16 off=16000 size=4"), |
| 84 | 84 | "bad_log_not_empty"); |
| @@ -175,7 +175,7 @@ static void bpf_prog_load_log_buf(void) · 90 unmodified lines | ||
| 175 | 175 | opts.log_level = 2; |
| 176 | 176 | fd = bpf_prog_load(BPF_PROG_TYPE_SOCKET_FILTER, "good_prog", "GPL", |
| 177 | 177 | good_prog_insns, good_prog_insn_cnt, &opts); |
| 178 | − ASSERT_OK_PTR(strstr(log_buf, "0: R1=ctx(id=0,off=0,imm=0) R10=fp0"), "good_log_2"); | |
| 178 | + ASSERT_OK_PTR(strstr(log_buf, "0: R1=ctx(off=0,imm=0) R10=fp0"), "good_log_2"); | |
| 179 | 179 | ASSERT_GE(fd, 0, "good_fd2"); |
| 180 | 180 | if (fd >= 0) |
| 181 | 181 | close(fd); |
| @@ -1,6 +1,6 @@ | ||
| 1 | −#define __INVALID_ATOMIC_ACCESS_TEST(op) \ | |
| 1 | +#define __INVALID_ATOMIC_ACCESS_TEST(op) \ | |
| 2 | 2 | { \ |
| 3 | − "atomic " #op " access through non-pointer ", \ | |
| 3 | + "atomic " #op " access through non-pointer ", \ | |
| 4 | 4 | .insns = { \ |
| 5 | 5 | BPF_MOV64_IMM(BPF_REG_0, 1), \ |
| 6 | 6 | BPF_MOV64_IMM(BPF_REG_1, 0), \ |
| @@ -9,7 +9,7 @@ · 2 unmodified lines | ||
| 9 | 9 | BPF_EXIT_INSN(), \ |
| 10 | 10 | }, \ |
| 11 | 11 | .result = REJECT, \ |
| 12 | − .errstr = "R1 invalid mem access 'inv'" \ | |
| 12 | + .errstr = "R1 invalid mem access 'scalar'" \ | |
| 13 | 13 | } |
| 14 | 14 | __INVALID_ATOMIC_ACCESS_TEST(BPF_ADD), |
| 15 | 15 | __INVALID_ATOMIC_ACCESS_TEST(BPF_ADD | BPF_FETCH), |
| @@ -508,7 +508,7 @@ · 507 unmodified lines | ||
| 508 | 508 | BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_0, -1), |
| 509 | 509 | BPF_EXIT_INSN(), |
| 510 | 510 | }, |
| 511 | − .errstr_unpriv = "R0 invalid mem access 'inv'", | |
| 511 | + .errstr_unpriv = "R0 invalid mem access 'scalar'", | |
| 512 | 512 | .result_unpriv = REJECT, |
| 513 | 513 | .result = ACCEPT |
| 514 | 514 | }, |
| @@ -530,7 +530,7 @@ · 15 unmodified lines | ||
| 530 | 530 | BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_0, -1), |
| 531 | 531 | BPF_EXIT_INSN(), |
| 532 | 532 | }, |
| 533 | − .errstr_unpriv = "R0 invalid mem access 'inv'", | |
| 533 | + .errstr_unpriv = "R0 invalid mem access 'scalar'", | |
| 534 | 534 | .result_unpriv = REJECT, |
| 535 | 535 | .result = ACCEPT |
| 536 | 536 | }, |
| @@ -188,7 +188,7 @@ · 187 unmodified lines | ||
| 188 | 188 | }, |
| 189 | 189 | .prog_type = BPF_PROG_TYPE_SCHED_CLS, |
| 190 | 190 | .result = REJECT, |
| 191 | − .errstr = "R0 invalid mem access 'inv'", | |
| 191 | + .errstr = "R0 invalid mem access 'scalar'", | |
| 192 | 192 | }, |
| 193 | 193 | { |
| 194 | 194 | "calls: multiple ret types in subprog 2", |
| @@ -491,7 +491,7 @@ · 296 unmodified lines | ||
| 491 | 491 | BPF_EXIT_INSN(), |
| 492 | 492 | }, |
| 493 | 493 | .result = REJECT, |
| 494 | − .errstr = "R6 invalid mem access 'inv'", | |
| 494 | + .errstr = "R6 invalid mem access 'scalar'", | |
| 495 | 495 | .prog_type = BPF_PROG_TYPE_XDP, |
| 496 | 496 | .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS, |
| 497 | 497 | }, |
| @@ -1697,7 +1697,7 @@ · 1199 unmodified lines | ||
| 1697 | 1697 | .prog_type = BPF_PROG_TYPE_SCHED_CLS, |
| 1698 | 1698 | .fixup_map_hash_8b = { 12, 22 }, |
| 1699 | 1699 | .result = REJECT, |
| 1700 | − .errstr = "R0 invalid mem access 'inv'", | |
| 1700 | + .errstr = "R0 invalid mem access 'scalar'", | |
| 1701 | 1701 | }, |
| 1702 | 1702 | { |
| 1703 | 1703 | "calls: pkt_ptr spill into caller stack", |
| @@ -127,7 +127,7 @@ · 126 unmodified lines | ||
| 127 | 127 | .prog_type = BPF_PROG_TYPE_CGROUP_SOCK_ADDR, |
| 128 | 128 | .expected_attach_type = BPF_CGROUP_UDP6_SENDMSG, |
| 129 | 129 | .result = REJECT, |
| 130 | − .errstr = "R1 type=inv expected=ctx", | |
| 130 | + .errstr = "R1 type=scalar expected=ctx", | |
| 131 | 131 | }, |
| 132 | 132 | { |
| 133 | 133 | "pass ctx or null check, 4: ctx - const", |
| @@ -193,5 +193,5 @@ · 59 unmodified lines | ||
| 193 | 193 | .prog_type = BPF_PROG_TYPE_CGROUP_SOCK, |
| 194 | 194 | .expected_attach_type = BPF_CGROUP_INET4_POST_BIND, |
| 195 | 195 | .result = REJECT, |
| 196 | − .errstr = "R1 type=inv expected=ctx", | |
| 196 | + .errstr = "R1 type=scalar expected=ctx", | |
| 197 | 197 | }, |
| @@ -339,7 +339,7 @@ · 338 unmodified lines | ||
| 339 | 339 | BPF_MOV64_IMM(BPF_REG_0, 0), |
| 340 | 340 | BPF_EXIT_INSN(), |
| 341 | 341 | }, |
| 342 | − .errstr = "R2 invalid mem access 'inv'", | |
| 342 | + .errstr = "R2 invalid mem access 'scalar'", | |
| 343 | 343 | .result = REJECT, |
| 344 | 344 | .prog_type = BPF_PROG_TYPE_SCHED_CLS, |
| 345 | 345 | .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS, |
| @@ -350,7 +350,7 @@ · 349 unmodified lines | ||
| 350 | 350 | BPF_EMIT_CALL(BPF_FUNC_csum_diff), |
| 351 | 351 | BPF_EXIT_INSN(), |
| 352 | 352 | }, |
| 353 | − .errstr = "R1 type=inv expected=fp", | |
| 353 | + .errstr = "R1 type=scalar expected=fp", | |
| 354 | 354 | .result = REJECT, |
| 355 | 355 | .prog_type = BPF_PROG_TYPE_SCHED_CLS, |
| 356 | 356 | }, |
| @@ -471,7 +471,7 @@ · 114 unmodified lines | ||
| 471 | 471 | BPF_EMIT_CALL(BPF_FUNC_probe_read_kernel), |
| 472 | 472 | BPF_EXIT_INSN(), |
| 473 | 473 | }, |
| 474 | − .errstr = "R1 type=inv expected=fp", | |
| 474 | + .errstr = "R1 type=scalar expected=fp", | |
| 475 | 475 | .result = REJECT, |
| 476 | 476 | .prog_type = BPF_PROG_TYPE_TRACEPOINT, |
| 477 | 477 | }, |
| @@ -484,7 +484,7 @@ · 6 unmodified lines | ||
| 484 | 484 | BPF_EMIT_CALL(BPF_FUNC_probe_read_kernel), |
| 485 | 485 | BPF_EXIT_INSN(), |
| 486 | 486 | }, |
| 487 | − .errstr = "R1 type=inv expected=fp", | |
| 487 | + .errstr = "R1 type=scalar expected=fp", | |
| 488 | 488 | .result = REJECT, |
| 489 | 489 | .prog_type = BPF_PROG_TYPE_TRACEPOINT, |
| 490 | 490 | }, |
| @@ -286,7 +286,7 @@ · 285 unmodified lines | ||
| 286 | 286 | BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_0, 0), |
| 287 | 287 | BPF_EXIT_INSN(), |
| 288 | 288 | }, |
| 289 | − .errstr_unpriv = "R0 invalid mem access 'inv'", | |
| 289 | + .errstr_unpriv = "R0 invalid mem access 'scalar'", | |
| 290 | 290 | .result_unpriv = REJECT, |
| 291 | 291 | .result = ACCEPT, |
| 292 | 292 | .retval = 2, |
| @@ -356,7 +356,7 @@ · 63 unmodified lines | ||
| 356 | 356 | BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_0, 0), |
| 357 | 357 | BPF_EXIT_INSN(), |
| 358 | 358 | }, |
| 359 | − .errstr_unpriv = "R0 invalid mem access 'inv'", | |
| 359 | + .errstr_unpriv = "R0 invalid mem access 'scalar'", | |
| 360 | 360 | .result_unpriv = REJECT, |
| 361 | 361 | .result = ACCEPT, |
| 362 | 362 | .retval = 2, |
| @@ -426,7 +426,7 @@ · 63 unmodified lines | ||
| 426 | 426 | BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_0, 0), |
| 427 | 427 | BPF_EXIT_INSN(), |
| 428 | 428 | }, |
| 429 | − .errstr_unpriv = "R0 invalid mem access 'inv'", | |
| 429 | + .errstr_unpriv = "R0 invalid mem access 'scalar'", | |
| 430 | 430 | .result_unpriv = REJECT, |
| 431 | 431 | .result = ACCEPT, |
| 432 | 432 | .retval = 2, |
| @@ -496,7 +496,7 @@ · 63 unmodified lines | ||
| 496 | 496 | BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_0, 0), |
| 497 | 497 | BPF_EXIT_INSN(), |
| 498 | 498 | }, |
| 499 | − .errstr_unpriv = "R0 invalid mem access 'inv'", | |
| 499 | + .errstr_unpriv = "R0 invalid mem access 'scalar'", | |
| 500 | 500 | .result_unpriv = REJECT, |
| 501 | 501 | .result = ACCEPT, |
| 502 | 502 | .retval = 2, |
| @@ -566,7 +566,7 @@ · 63 unmodified lines | ||
| 566 | 566 | BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_0, 0), |
| 567 | 567 | BPF_EXIT_INSN(), |
| 568 | 568 | }, |
| 569 | − .errstr_unpriv = "R0 invalid mem access 'inv'", | |
| 569 | + .errstr_unpriv = "R0 invalid mem access 'scalar'", | |
| 570 | 570 | .result_unpriv = REJECT, |
| 571 | 571 | .result = ACCEPT, |
| 572 | 572 | .retval = 2, |
| @@ -636,7 +636,7 @@ · 63 unmodified lines | ||
| 636 | 636 | BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_0, 0), |
| 637 | 637 | BPF_EXIT_INSN(), |
| 638 | 638 | }, |
| 639 | − .errstr_unpriv = "R0 invalid mem access 'inv'", | |
| 639 | + .errstr_unpriv = "R0 invalid mem access 'scalar'", | |
| 640 | 640 | .result_unpriv = REJECT, |
| 641 | 641 | .result = ACCEPT, |
| 642 | 642 | .retval = 2, |
| @@ -706,7 +706,7 @@ · 63 unmodified lines | ||
| 706 | 706 | BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_0, 0), |
| 707 | 707 | BPF_EXIT_INSN(), |
| 708 | 708 | }, |
| 709 | − .errstr_unpriv = "R0 invalid mem access 'inv'", | |
| 709 | + .errstr_unpriv = "R0 invalid mem access 'scalar'", | |
| 710 | 710 | .result_unpriv = REJECT, |
| 711 | 711 | .result = ACCEPT, |
| 712 | 712 | .retval = 2, |
| @@ -776,7 +776,7 @@ · 63 unmodified lines | ||
| 776 | 776 | BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_0, 0), |
| 777 | 777 | BPF_EXIT_INSN(), |
| 778 | 778 | }, |
| 779 | − .errstr_unpriv = "R0 invalid mem access 'inv'", | |
| 779 | + .errstr_unpriv = "R0 invalid mem access 'scalar'", | |
| 780 | 780 | .result_unpriv = REJECT, |
| 781 | 781 | .result = ACCEPT, |
| 782 | 782 | .retval = 2, |
| @@ -27,7 +27,7 @@ · 26 unmodified lines | ||
| 27 | 27 | BPF_JMP_IMM(BPF_JLT, BPF_REG_2, 8, 1), |
| 28 | 28 | BPF_EXIT_INSN(), |
| 29 | 29 | |
| 30 | − BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, 1), /* R2=inv(umin=1, umax=8) */ | |
| 30 | + BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, 1), /* R2=scalar(umin=1, umax=8) */ | |
| 31 | 31 | BPF_MOV64_REG(BPF_REG_1, BPF_REG_FP), |
| 32 | 32 | BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, -8), |
| 33 | 33 | BPF_MOV64_IMM(BPF_REG_3, 0), |
| @@ -87,7 +87,7 @@ · 53 unmodified lines | ||
| 87 | 87 | BPF_JMP_IMM(BPF_JLT, BPF_REG_2, 8, 1), |
| 88 | 88 | BPF_EXIT_INSN(), |
| 89 | 89 | |
| 90 | − BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, 1), /* R2=inv(umin=1, umax=8) */ | |
| 90 | + BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, 1), /* R2=scalar(umin=1, umax=8) */ | |
| 91 | 91 | BPF_MOV64_REG(BPF_REG_1, BPF_REG_FP), |
| 92 | 92 | BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, -8), |
| 93 | 93 | BPF_MOV64_IMM(BPF_REG_3, 0), |
| @@ -132,7 +132,7 @@ · 131 unmodified lines | ||
| 132 | 132 | BPF_EXIT_INSN(), |
| 133 | 133 | }, |
| 134 | 134 | .result = REJECT, |
| 135 | − .errstr = "R0 invalid mem access 'inv'", | |
| 135 | + .errstr = "R0 invalid mem access 'scalar'", | |
| 136 | 136 | .prog_type = BPF_PROG_TYPE_SCHED_CLS, |
| 137 | 137 | .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS, |
| 138 | 138 | }, |
| @@ -162,7 +162,7 @@ · 23 unmodified lines | ||
| 162 | 162 | BPF_EXIT_INSN(), |
| 163 | 163 | }, |
| 164 | 164 | .result = REJECT, |
| 165 | − .errstr = "R3 invalid mem access 'inv'", | |
| 165 | + .errstr = "R3 invalid mem access 'scalar'", | |
| 166 | 166 | .prog_type = BPF_PROG_TYPE_SCHED_CLS, |
| 167 | 167 | .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS, |
| 168 | 168 | }, |
| @@ -162,7 +162,7 @@ · 161 unmodified lines | ||
| 162 | 162 | BPF_EXIT_INSN(), |
| 163 | 163 | }, |
| 164 | 164 | .prog_type = BPF_PROG_TYPE_SCHED_CLS, |
| 165 | − .errstr = "type=inv expected=sock", | |
| 165 | + .errstr = "type=scalar expected=sock", | |
| 166 | 166 | .result = REJECT, |
| 167 | 167 | }, |
| 168 | 168 | { |
| @@ -178,7 +178,7 @@ · 9 unmodified lines | ||
| 178 | 178 | BPF_EXIT_INSN(), |
| 179 | 179 | }, |
| 180 | 180 | .prog_type = BPF_PROG_TYPE_SCHED_CLS, |
| 181 | − .errstr = "type=inv expected=sock", | |
| 181 | + .errstr = "type=scalar expected=sock", | |
| 182 | 182 | .result = REJECT, |
| 183 | 183 | }, |
| 184 | 184 | { |
| @@ -274,7 +274,7 @@ · 89 unmodified lines | ||
| 274 | 274 | BPF_EXIT_INSN(), |
| 275 | 275 | }, |
| 276 | 276 | .prog_type = BPF_PROG_TYPE_SCHED_CLS, |
| 277 | − .errstr = "type=inv expected=sock", | |
| 277 | + .errstr = "type=scalar expected=sock", | |
| 278 | 278 | .result = REJECT, |
| 279 | 279 | }, |
| 280 | 280 | { |
| @@ -104,7 +104,7 @@ · 103 unmodified lines | ||
| 104 | 104 | BPF_EXIT_INSN(), |
| 105 | 105 | }, |
| 106 | 106 | .fixup_map_hash_8b = { 3 }, |
| 107 | − .errstr = "R6 invalid mem access 'inv'", | |
| 107 | + .errstr = "R6 invalid mem access 'scalar'", | |
| 108 | 108 | .result = REJECT, |
| 109 | 109 | .prog_type = BPF_PROG_TYPE_TRACEPOINT, |
| 110 | 110 | }, |
| @@ -502,7 +502,7 @@ · 501 unmodified lines | ||
| 502 | 502 | .fixup_sk_storage_map = { 11 }, |
| 503 | 503 | .prog_type = BPF_PROG_TYPE_SCHED_CLS, |
| 504 | 504 | .result = REJECT, |
| 505 | − .errstr = "R3 type=inv expected=fp", | |
| 505 | + .errstr = "R3 type=scalar expected=fp", | |
| 506 | 506 | }, |
| 507 | 507 | { |
| 508 | 508 | "sk_storage_get(map, skb->sk, &stack_value, 1): stack_value", |
| @@ -102,7 +102,7 @@ · 101 unmodified lines | ||
| 102 | 102 | BPF_EXIT_INSN(), |
| 103 | 103 | }, |
| 104 | 104 | .errstr_unpriv = "attempt to corrupt spilled", |
| 105 | − .errstr = "R0 invalid mem access 'inv", | |
| 105 | + .errstr = "R0 invalid mem access 'scalar'", | |
| 106 | 106 | .result = REJECT, |
| 107 | 107 | .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS, |
| 108 | 108 | }, |
| @@ -147,11 +147,11 @@ · 38 unmodified lines | ||
| 147 | 147 | BPF_LDX_MEM(BPF_W, BPF_REG_4, BPF_REG_10, -8), |
| 148 | 148 | /* r0 = r2 */ |
| 149 | 149 | BPF_MOV64_REG(BPF_REG_0, BPF_REG_2), |
| 150 | − /* r0 += r4 R0=pkt R2=pkt R3=pkt_end R4=inv20 */ | |
| 150 | + /* r0 += r4 R0=pkt R2=pkt R3=pkt_end R4=20 */ | |
| 151 | 151 | BPF_ALU64_REG(BPF_ADD, BPF_REG_0, BPF_REG_4), |
| 152 | − /* if (r0 > r3) R0=pkt,off=20 R2=pkt R3=pkt_end R4=inv20 */ | |
| 152 | + /* if (r0 > r3) R0=pkt,off=20 R2=pkt R3=pkt_end R4=20 */ | |
| 153 | 153 | BPF_JMP_REG(BPF_JGT, BPF_REG_0, BPF_REG_3, 1), |
| 154 | − /* r0 = *(u32 *)r2 R0=pkt,off=20,r=20 R2=pkt,r=20 R3=pkt_end R4=inv20 */ | |
| 154 | + /* r0 = *(u32 *)r2 R0=pkt,off=20,r=20 R2=pkt,r=20 R3=pkt_end R4=20 */ | |
| 155 | 155 | BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_2, 0), |
| 156 | 156 | BPF_MOV64_IMM(BPF_REG_0, 0), |
| 157 | 157 | BPF_EXIT_INSN(), |
| @@ -190,11 +190,11 @@ · 32 unmodified lines | ||
| 190 | 190 | BPF_LDX_MEM(BPF_H, BPF_REG_4, BPF_REG_10, -8), |
| 191 | 191 | /* r0 = r2 */ |
| 192 | 192 | BPF_MOV64_REG(BPF_REG_0, BPF_REG_2), |
| 193 | − /* r0 += r4 R0=pkt R2=pkt R3=pkt_end R4=inv,umax=65535 */ | |
| 193 | + /* r0 += r4 R0=pkt R2=pkt R3=pkt_end R4=umax=65535 */ | |
| 194 | 194 | BPF_ALU64_REG(BPF_ADD, BPF_REG_0, BPF_REG_4), |
| 195 | − /* if (r0 > r3) R0=pkt,umax=65535 R2=pkt R3=pkt_end R4=inv,umax=65535 */ | |
| 195 | + /* if (r0 > r3) R0=pkt,umax=65535 R2=pkt R3=pkt_end R4=umax=65535 */ | |
| 196 | 196 | BPF_JMP_REG(BPF_JGT, BPF_REG_0, BPF_REG_3, 1), |
| 197 | − /* r0 = *(u32 *)r2 R0=pkt,umax=65535 R2=pkt R3=pkt_end R4=inv20 */ | |
| 197 | + /* r0 = *(u32 *)r2 R0=pkt,umax=65535 R2=pkt R3=pkt_end R4=20 */ | |
| 198 | 198 | BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_2, 0), |
| 199 | 199 | BPF_MOV64_IMM(BPF_REG_0, 0), |
| 200 | 200 | BPF_EXIT_INSN(), |
| @@ -222,11 +222,11 @@ · 21 unmodified lines | ||
| 222 | 222 | BPF_LDX_MEM(BPF_H, BPF_REG_4, BPF_REG_10, -8), |
| 223 | 223 | /* r0 = r2 */ |
| 224 | 224 | BPF_MOV64_REG(BPF_REG_0, BPF_REG_2), |
| 225 | − /* r0 += r4 R0=pkt R2=pkt R3=pkt_end R4=inv,umax=65535 */ | |
| 225 | + /* r0 += r4 R0=pkt R2=pkt R3=pkt_end R4=umax=65535 */ | |
| 226 | 226 | BPF_ALU64_REG(BPF_ADD, BPF_REG_0, BPF_REG_4), |
| 227 | − /* if (r0 > r3) R0=pkt,umax=65535 R2=pkt R3=pkt_end R4=inv,umax=65535 */ | |
| 227 | + /* if (r0 > r3) R0=pkt,umax=65535 R2=pkt R3=pkt_end R4=umax=65535 */ | |
| 228 | 228 | BPF_JMP_REG(BPF_JGT, BPF_REG_0, BPF_REG_3, 1), |
| 229 | − /* r0 = *(u32 *)r2 R0=pkt,umax=65535 R2=pkt R3=pkt_end R4=inv20 */ | |
| 229 | + /* r0 = *(u32 *)r2 R0=pkt,umax=65535 R2=pkt R3=pkt_end R4=20 */ | |
| 230 | 230 | BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_2, 0), |
| 231 | 231 | BPF_MOV64_IMM(BPF_REG_0, 0), |
| 232 | 232 | BPF_EXIT_INSN(), |
| @@ -250,11 +250,11 @@ · 17 unmodified lines | ||
| 250 | 250 | BPF_LDX_MEM(BPF_H, BPF_REG_4, BPF_REG_10, -6), |
| 251 | 251 | /* r0 = r2 */ |
| 252 | 252 | BPF_MOV64_REG(BPF_REG_0, BPF_REG_2), |
| 253 | − /* r0 += r4 R0=pkt R2=pkt R3=pkt_end R4=inv,umax=65535 */ | |
| 253 | + /* r0 += r4 R0=pkt R2=pkt R3=pkt_end R4=umax=65535 */ | |
| 254 | 254 | BPF_ALU64_REG(BPF_ADD, BPF_REG_0, BPF_REG_4), |
| 255 | − /* if (r0 > r3) R0=pkt,umax=65535 R2=pkt R3=pkt_end R4=inv,umax=65535 */ | |
| 255 | + /* if (r0 > r3) R0=pkt,umax=65535 R2=pkt R3=pkt_end R4=umax=65535 */ | |
| 256 | 256 | BPF_JMP_REG(BPF_JGT, BPF_REG_0, BPF_REG_3, 1), |
| 257 | − /* r0 = *(u32 *)r2 R0=pkt,umax=65535 R2=pkt R3=pkt_end R4=inv20 */ | |
| 257 | + /* r0 = *(u32 *)r2 R0=pkt,umax=65535 R2=pkt R3=pkt_end R4=20 */ | |
| 258 | 258 | BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_2, 0), |
| 259 | 259 | BPF_MOV64_IMM(BPF_REG_0, 0), |
| 260 | 260 | BPF_EXIT_INSN(), |
| @@ -280,11 +280,11 @@ · 19 unmodified lines | ||
| 280 | 280 | BPF_LDX_MEM(BPF_W, BPF_REG_4, BPF_REG_10, -4), |
| 281 | 281 | /* r0 = r2 */ |
| 282 | 282 | BPF_MOV64_REG(BPF_REG_0, BPF_REG_2), |
| 283 | − /* r0 += r4 R0=pkt R2=pkt R3=pkt_end R4=inv,umax=U32_MAX */ | |
| 283 | + /* r0 += r4 R0=pkt R2=pkt R3=pkt_end R4=umax=U32_MAX */ | |
| 284 | 284 | BPF_ALU64_REG(BPF_ADD, BPF_REG_0, BPF_REG_4), |
| 285 | − /* if (r0 > r3) R0=pkt,umax=U32_MAX R2=pkt R3=pkt_end R4=inv */ | |
| 285 | + /* if (r0 > r3) R0=pkt,umax=U32_MAX R2=pkt R3=pkt_end R4= */ | |
| 286 | 286 | BPF_JMP_REG(BPF_JGT, BPF_REG_0, BPF_REG_3, 1), |
| 287 | − /* r0 = *(u32 *)r2 R0=pkt,umax=U32_MAX R2=pkt R3=pkt_end R4=inv */ | |
| 287 | + /* r0 = *(u32 *)r2 R0=pkt,umax=U32_MAX R2=pkt R3=pkt_end R4= */ | |
| 288 | 288 | BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_2, 0), |
| 289 | 289 | BPF_MOV64_IMM(BPF_REG_0, 0), |
| 290 | 290 | BPF_EXIT_INSN(), |
| @@ -305,13 +305,13 @@ · 14 unmodified lines | ||
| 305 | 305 | BPF_JMP_IMM(BPF_JLE, BPF_REG_4, 40, 2), |
| 306 | 306 | BPF_MOV64_IMM(BPF_REG_0, 0), |
| 307 | 307 | BPF_EXIT_INSN(), |
| 308 | − /* *(u32 *)(r10 -8) = r4 R4=inv,umax=40 */ | |
| 308 | + /* *(u32 *)(r10 -8) = r4 R4=umax=40 */ | |
| 309 | 309 | BPF_STX_MEM(BPF_W, BPF_REG_10, BPF_REG_4, -8), |
| 310 | 310 | /* r4 = (*u32 *)(r10 - 8) */ |
| 311 | 311 | BPF_LDX_MEM(BPF_W, BPF_REG_4, BPF_REG_10, -8), |
| 312 | − /* r2 += r4 R2=pkt R4=inv,umax=40 */ | |
| 312 | + /* r2 += r4 R2=pkt R4=umax=40 */ | |
| 313 | 313 | BPF_ALU64_REG(BPF_ADD, BPF_REG_2, BPF_REG_4), |
| 314 | − /* r0 = r2 R2=pkt,umax=40 R4=inv,umax=40 */ | |
| 314 | + /* r0 = r2 R2=pkt,umax=40 R4=umax=40 */ | |
| 315 | 315 | BPF_MOV64_REG(BPF_REG_0, BPF_REG_2), |
| 316 | 316 | /* r2 += 20 R0=pkt,umax=40 R2=pkt,umax=40 */ |
| 317 | 317 | BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, 20), |
| @@ -214,7 +214,7 @@ · 213 unmodified lines | ||
| 214 | 214 | BPF_EXIT_INSN(), |
| 215 | 215 | }, |
| 216 | 216 | .result = REJECT, |
| 217 | − .errstr = "R1 type=inv expected=ctx", | |
| 217 | + .errstr = "R1 type=scalar expected=ctx", | |
| 218 | 218 | .prog_type = BPF_PROG_TYPE_SCHED_CLS, |
| 219 | 219 | }, |
| 220 | 220 | { |
| @@ -420,7 +420,7 @@ · 199 unmodified lines | ||
| 420 | 420 | BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_7, 0), |
| 421 | 421 | BPF_EXIT_INSN(), |
| 422 | 422 | }, |
| 423 | − .errstr_unpriv = "R7 invalid mem access 'inv'", | |
| 423 | + .errstr_unpriv = "R7 invalid mem access 'scalar'", | |
| 424 | 424 | .result_unpriv = REJECT, |
| 425 | 425 | .result = ACCEPT, |
| 426 | 426 | .retval = 0, |
| @@ -64,7 +64,7 @@ · 63 unmodified lines | ||
| 64 | 64 | }, |
| 65 | 65 | .fixup_map_hash_48b = { 3 }, |
| 66 | 66 | .errstr_unpriv = "R0 pointer arithmetic prohibited", |
| 67 | − .errstr = "invalid mem access 'inv'", | |
| 67 | + .errstr = "invalid mem access 'scalar'", | |
| 68 | 68 | .result = REJECT, |
| 69 | 69 | .result_unpriv = REJECT, |
| 70 | 70 | .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS, |
| @@ -89,7 +89,7 @@ · 18 unmodified lines | ||
| 89 | 89 | }, |
| 90 | 90 | .fixup_map_hash_48b = { 3 }, |
| 91 | 91 | .errstr_unpriv = "leaking pointer from stack off -8", |
| 92 | − .errstr = "R0 invalid mem access 'inv'", | |
| 92 | + .errstr = "R0 invalid mem access 'scalar'", | |
| 93 | 93 | .result = REJECT, |
| 94 | 94 | .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS, |
| 95 | 95 | }, |
| @@ -397,7 +397,7 @@ · 396 unmodified lines | ||
| 397 | 397 | .fixup_map_array_48b = { 1 }, |
| 398 | 398 | .result = ACCEPT, |
| 399 | 399 | .result_unpriv = REJECT, |
| 400 | − .errstr_unpriv = "R0 invalid mem access 'inv'", | |
| 400 | + .errstr_unpriv = "R0 invalid mem access 'scalar'", | |
| 401 | 401 | .retval = 0, |
| 402 | 402 | }, |
| 403 | 403 | { |
| @@ -1074,7 +1074,7 @@ · 670 unmodified lines | ||
| 1074 | 1074 | }, |
| 1075 | 1075 | .fixup_map_array_48b = { 3 }, |
| 1076 | 1076 | .result = REJECT, |
| 1077 | − .errstr = "R0 invalid mem access 'inv'", | |
| 1077 | + .errstr = "R0 invalid mem access 'scalar'", | |
| 1078 | 1078 | .errstr_unpriv = "R0 pointer -= pointer prohibited", |
| 1079 | 1079 | }, |
| 1080 | 1080 | { |
| @@ -131,7 +131,7 @@ · 130 unmodified lines | ||
| 131 | 131 | * write might have overwritten the spilled pointer (i.e. we lose track |
| 132 | 132 | * of the spilled register when we analyze the write). |
| 133 | 133 | */ |
| 134 | − .errstr = "R2 invalid mem access 'inv'", | |
| 134 | + .errstr = "R2 invalid mem access 'scalar'", | |
| 135 | 135 | .result = REJECT, |
| 136 | 136 | }, |
| 137 | 137 | { |