WARNING: line length of 90 exceeds 80 columns #30: FILE: include/linux/bpf_verifier.h:1072: +int bpf_update_branch_counts(struct bpf_verifier_env *env, struct bpf_verifier_state *st); WARNING: line length of 86 exceeds 80 columns #38: FILE: include/linux/bpf_verifier.h:1080: +int bpf_push_jmp_history(struct bpf_verifier_env *env, struct bpf_verifier_state *cur, WARNING: line length of 89 exceeds 80 columns #45: FILE: include/linux/bpf_verifier.h:1087: +void bpf_clear_singular_ids(struct bpf_verifier_env *env, struct bpf_verifier_state *st); WARNING: line length of 87 exceeds 80 columns #86: FILE: include/linux/bpf_verifier.h:1128: +static inline void bpf_bt_set_frame_reg(struct backtrack_state *bt, u32 frame, u32 reg) WARNING: line length of 89 exceeds 80 columns #91: FILE: include/linux/bpf_verifier.h:1133: +static inline void bpf_bt_set_frame_slot(struct backtrack_state *bt, u32 frame, u32 slot) WARNING: line length of 90 exceeds 80 columns #142: FILE: kernel/bpf/states.c:25: + cur_states = env->explored_states_size + env->free_list_size + env->num_backedges; WARNING: line length of 90 exceeds 80 columns #150: FILE: kernel/bpf/states.c:33: +static struct bpf_verifier_state_list *state_parent_as_list(struct bpf_verifier_state *st) WARNING: line length of 87 exceeds 80 columns #153: FILE: kernel/bpf/states.c:36: + return container_of(st->parent, struct bpf_verifier_state_list, state); CHECK: Logical continuations should be on the previous line #168: FILE: kernel/bpf/states.c:51: + if (!sl->in_free_list + || sl->state.branches != 0 CHECK: Logical continuations should be on the previous line #169: FILE: kernel/bpf/states.c:52: + || sl->state.branches != 0 + || incomplete_read_marks(env, &sl->state)) WARNING: line length of 82 exceeds 80 columns #214: FILE: kernel/bpf/states.c:97: + struct bpf_scc_callchain *callchain) WARNING: line length of 85 exceeds 80 columns #223: FILE: kernel/bpf/states.c:106: + if (memcmp(callchain, &visits[i].callchain, sizeof(*callchain)) == 0) WARNING: line length of 81 exceeds 80 columns #233: FILE: kernel/bpf/states.c:116: + struct bpf_scc_callchain *callchain) WARNING: line length of 81 exceeds 80 columns #243: FILE: kernel/bpf/states.c:126: + new_sz = sizeof(*info) + sizeof(struct bpf_scc_visit) * (num_visits + 1); WARNING: line length of 96 exceeds 80 columns #256: FILE: kernel/bpf/states.c:139: +static char *format_callchain(struct bpf_verifier_env *env, struct bpf_scc_callchain *callchain) WARNING: line length of 87 exceeds 80 columns #268: FILE: kernel/bpf/states.c:151: + delta += snprintf(buf + delta, TMP_STR_BUF_LEN - delta, "%u)", callchain->scc); WARNING: line length of 87 exceeds 80 columns #276: FILE: kernel/bpf/states.c:159: +static int maybe_enter_scc(struct bpf_verifier_env *env, struct bpf_verifier_state *st) WARNING: line length of 89 exceeds 80 columns #290: FILE: kernel/bpf/states.c:173: + verbose(env, "SCC enter %s\n", format_callchain(env, callchain)); WARNING: line length of 90 exceeds 80 columns #295: FILE: kernel/bpf/states.c:178: +static int propagate_backedges(struct bpf_verifier_env *env, struct bpf_scc_visit *visit); WARNING: line length of 86 exceeds 80 columns #301: FILE: kernel/bpf/states.c:184: +static int maybe_exit_scc(struct bpf_verifier_env *env, struct bpf_verifier_state *st) WARNING: line length of 85 exceeds 80 columns #311: FILE: kernel/bpf/states.c:194: + * If path traversal stops inside an SCC, corresponding bpf_scc_visit WARNING: line length of 82 exceeds 80 columns #312: FILE: kernel/bpf/states.c:195: + * must exist for non-speculative paths. For non-speculative paths WARNING: line length of 82 exceeds 80 columns #314: FILE: kernel/bpf/states.c:197: + * a. Verification error is found, maybe_exit_scc() is not called. WARNING: line length of 87 exceeds 80 columns #315: FILE: kernel/bpf/states.c:198: + * b. Top level BPF_EXIT is reached. Top level BPF_EXIT is not a member WARNING: line length of 85 exceeds 80 columns #317: FILE: kernel/bpf/states.c:200: + * c. A checkpoint is reached and matched. Checkpoints are created by WARNING: line length of 88 exceeds 80 columns #318: FILE: kernel/bpf/states.c:201: + * is_state_visited(), which calls maybe_enter_scc(), which allocates WARNING: line length of 86 exceeds 80 columns #323: FILE: kernel/bpf/states.c:206: + verifier_bug(env, "scc exit: no visit info for call chain %s", WARNING: line length of 91 exceeds 80 columns #351: FILE: kernel/bpf/states.c:234: + verifier_bug(env, "add backedge: no SCC in verification path, insn_idx %d", WARNING: line length of 82 exceeds 80 columns #357: FILE: kernel/bpf/states.c:240: + verifier_bug(env, "add backedge: no visit info for call chain %s", WARNING: line length of 84 exceeds 80 columns #362: FILE: kernel/bpf/states.c:245: + verbose(env, "SCC backedge %s\n", format_callchain(env, callchain)); WARNING: line length of 89 exceeds 80 columns #389: FILE: kernel/bpf/states.c:272: +int bpf_update_branch_counts(struct bpf_verifier_env *env, struct bpf_verifier_state *st) WARNING: line length of 93 exceeds 80 columns #401: FILE: kernel/bpf/states.c:284: + verifier_bug_if((int)br < 0, env, "%s:branches_to_explore=%d", __func__, br); WARNING: line length of 83 exceeds 80 columns #548: FILE: kernel/bpf/states.c:431: + * detect overwrites and invalidate associated data slices. WARNING: line length of 88 exceeds 80 columns #549: FILE: kernel/bpf/states.c:432: + * is_iter_reg_valid_uninit() and is_irq_flag_reg_valid_uninit() WARNING: line length of 89 exceeds 80 columns #550: FILE: kernel/bpf/states.c:433: + * check for their respective slot types to detect double-create. WARNING: line length of 85 exceeds 80 columns #562: FILE: kernel/bpf/states.c:445: + * is_spilled_scalar_after() check either slot_type[0] or [4] WARNING: line length of 88 exceeds 80 columns #565: FILE: kernel/bpf/states.c:448: + struct bpf_reg_state *spill = &st->stack[i].spilled_ptr; WARNING: line length of 91 exceeds 80 columns #571: FILE: kernel/bpf/states.c:454: + * 8 byte spill of scalar 0 where half slot is dead WARNING: line length of 82 exceeds 80 columns #572: FILE: kernel/bpf/states.c:455: + * should become STACK_ZERO in lo 4 bytes. WARNING: line length of 83 exceeds 80 columns #577: FILE: kernel/bpf/states.c:460: + u8 *t = &st->stack[i].slot_type[j]; WARNING: Too many leading tabs - consider code refactoring #579: FILE: kernel/bpf/states.c:462: + if (*t == STACK_SPILL) CHECK: Alignment should match open parenthesis #592: FILE: kernel/bpf/states.c:475: +static int clean_verifier_state(struct bpf_verifier_env *env, + struct bpf_verifier_state *st) WARNING: line length of 83 exceeds 80 columns #662: FILE: kernel/bpf/states.c:545: + /* explore_alu_limits disables tnum_in() and range_within() WARNING: line length of 93 exceeds 80 columns #665: FILE: kernel/bpf/states.c:548: + return memcmp(rold, rcur, offsetof(struct bpf_reg_state, id)) == 0 && WARNING: line length of 82 exceeds 80 columns #671: FILE: kernel/bpf/states.c:554: + * Linked register tracking uses rold->id to detect relationships. WARNING: line length of 82 exceeds 80 columns #672: FILE: kernel/bpf/states.c:555: + * When rold->id == 0, the register is independent and any linking WARNING: line length of 84 exceeds 80 columns #673: FILE: kernel/bpf/states.c:556: + * in rcur only adds constraints. When rold->id != 0, we must verify WARNING: line length of 86 exceeds 80 columns #676: FILE: kernel/bpf/states.c:559: + * +------------------+-----------+------------------+---------------+ WARNING: line length of 86 exceeds 80 columns #677: FILE: kernel/bpf/states.c:560: + * | | rold->id | rold + ADD_CONST | rold->id == 0 | WARNING: line length of 86 exceeds 80 columns #678: FILE: kernel/bpf/states.c:561: + * |------------------+-----------+------------------+---------------| WARNING: line length of 86 exceeds 80 columns #679: FILE: kernel/bpf/states.c:562: + * | rcur->id | range,ids | false | range | WARNING: line length of 86 exceeds 80 columns #680: FILE: kernel/bpf/states.c:563: + * | rcur + ADD_CONST | false | range,ids,off | range | WARNING: line length of 86 exceeds 80 columns #681: FILE: kernel/bpf/states.c:564: + * | rcur->id == 0 | range,ids | false | range | WARNING: line length of 86 exceeds 80 columns #682: FILE: kernel/bpf/states.c:565: + * +------------------+-----------+------------------+---------------+ WARNING: line length of 86 exceeds 80 columns #695: FILE: kernel/bpf/states.c:578: + * - at (4) same bpf_reg_state::id (b) would be assigned to r6 and r7; WARNING: line length of 87 exceeds 80 columns #696: FILE: kernel/bpf/states.c:579: + * - at (5) r6 would be marked <= X, sync_linked_regs() would also mark WARNING: line length of 82 exceeds 80 columns #706: FILE: kernel/bpf/states.c:589: + * Also verify that new value satisfies old value range knowledge. WARNING: line length of 89 exceeds 80 columns #726: FILE: kernel/bpf/states.c:609: + return range_within(rold, rcur) && tnum_in(rold->var_off, rcur->var_off); WARNING: line length of 90 exceeds 80 columns #735: FILE: kernel/bpf/states.c:618: + return memcmp(rold, rcur, offsetof(struct bpf_reg_state, var_off)) == 0 && WARNING: line length of 87 exceeds 80 columns #765: FILE: kernel/bpf/states.c:648: + return regs_exact(rold, rcur, idmap) && rold->frameno == rcur->frameno; WARNING: line length of 90 exceeds 80 columns #769: FILE: kernel/bpf/states.c:652: + return memcmp(rold, rcur, offsetof(struct bpf_reg_state, var_off)) == 0 && WARNING: line length of 89 exceeds 80 columns #770: FILE: kernel/bpf/states.c:653: + range_within(rold, rcur) && tnum_in(rold->var_off, rcur->var_off); CHECK: Unnecessary parentheses around 'stack->slot_type[i] == STACK_MISC' #797: FILE: kernel/bpf/states.c:680: + if ((stack->slot_type[i] == STACK_MISC) || + ((stack->slot_type[i] == STACK_INVALID || stack->slot_type[i] == STACK_POISON) && + env->allow_uninit_stack)) WARNING: line length of 101 exceeds 80 columns #798: FILE: kernel/bpf/states.c:681: + ((stack->slot_type[i] == STACK_INVALID || stack->slot_type[i] == STACK_POISON) && WARNING: line length of 88 exceeds 80 columns #808: FILE: kernel/bpf/states.c:691: + struct bpf_stack_state *stack, int im) WARNING: line length of 82 exceeds 80 columns #836: FILE: kernel/bpf/states.c:719: + u8 old_type = old->stack[spi].slot_type[i % BPF_REG_SIZE]; WARNING: line length of 98 exceeds 80 columns #838: FILE: kernel/bpf/states.c:721: + cur->stack[spi].slot_type[i % BPF_REG_SIZE] : STACK_INVALID; WARNING: line length of 87 exceeds 80 columns #840: FILE: kernel/bpf/states.c:723: + /* STACK_INVALID and STACK_POISON are equivalent for pruning */ WARNING: line length of 83 exceeds 80 columns #849: FILE: kernel/bpf/states.c:732: + if (old->stack[spi].slot_type[i % BPF_REG_SIZE] == STACK_INVALID || WARNING: line length of 84 exceeds 80 columns #864: FILE: kernel/bpf/states.c:747: + * 64 and 32-bit scalar spills vs MISC/INVALID slots and vice versa. WARNING: line length of 82 exceeds 80 columns #870: FILE: kernel/bpf/states.c:753: + old_reg = scalar_reg_for_stack(env, &old->stack[spi], im); WARNING: line length of 82 exceeds 80 columns #871: FILE: kernel/bpf/states.c:754: + cur_reg = scalar_reg_for_stack(env, &cur->stack[spi], im); WARNING: line length of 82 exceeds 80 columns #873: FILE: kernel/bpf/states.c:756: + if (!regsafe(env, old_reg, cur_reg, idmap, exact)) WARNING: line length of 81 exceeds 80 columns #911: FILE: kernel/bpf/states.c:794: + &cur->stack[spi].spilled_ptr, idmap, exact)) WARNING: line length of 87 exceeds 80 columns #918: FILE: kernel/bpf/states.c:801: + old_reg->dynptr.first_slot != cur_reg->dynptr.first_slot || WARNING: line length of 88 exceeds 80 columns #919: FILE: kernel/bpf/states.c:802: + !check_ids(old_reg->ref_obj_id, cur_reg->ref_obj_id, idmap)) WARNING: line length of 81 exceeds 80 columns #934: FILE: kernel/bpf/states.c:817: + /* ignore {old_reg,cur_reg}->iter.depth, see above */ WARNING: line length of 88 exceeds 80 columns #935: FILE: kernel/bpf/states.c:818: + !check_ids(old_reg->ref_obj_id, cur_reg->ref_obj_id, idmap)) WARNING: line length of 90 exceeds 80 columns #941: FILE: kernel/bpf/states.c:824: + if (!check_ids(old_reg->ref_obj_id, cur_reg->ref_obj_id, idmap) || WARNING: line length of 81 exceeds 80 columns #942: FILE: kernel/bpf/states.c:825: + old_reg->irq.kfunc_class != cur_reg->irq.kfunc_class) WARNING: line length of 82 exceeds 80 columns #950: FILE: kernel/bpf/states.c:833: + /* Ensure that new unhandled slot types return false by default */ WARNING: line length of 83 exceeds 80 columns #958: FILE: kernel/bpf/states.c:841: +static bool refsafe(struct bpf_verifier_state *old, struct bpf_verifier_state *cur, WARNING: line length of 105 exceeds 80 columns #997: FILE: kernel/bpf/states.c:880: + WARN_ONCE(1, "Unhandled enum type for reference state: %d\n", old->refs[i].type); WARNING: line length of 87 exceeds 80 columns #1031: FILE: kernel/bpf/states.c:914: +static bool func_states_equal(struct bpf_verifier_env *env, struct bpf_func_state *old, WARNING: line length of 95 exceeds 80 columns #1032: FILE: kernel/bpf/states.c:915: + struct bpf_func_state *cur, u32 insn_idx, enum exact_level exact) WARNING: line length of 91 exceeds 80 columns #1092: FILE: kernel/bpf/states.c:975: + if (!func_states_equal(env, old->frame[i], cur->frame[i], insn_idx, exact)) WARNING: line length of 89 exceeds 80 columns #1121: FILE: kernel/bpf/states.c:1004: + verbose(env, "frame %d: propagating r%d", fr, i); WARNING: line length of 82 exceeds 80 columns #1138: FILE: kernel/bpf/states.c:1021: + verbose(env, "frame %d: propagating fp%d", WARNING: line length of 87 exceeds 80 columns #1141: FILE: kernel/bpf/states.c:1024: + verbose(env, ",fp%d", (-i - 1) * BPF_REG_SIZE); WARNING: line length of 81 exceeds 80 columns #1159: FILE: kernel/bpf/states.c:1042: +/* Propagate read and precision marks from visit->backedges[*].state->equal_state WARNING: line length of 92 exceeds 80 columns #1160: FILE: kernel/bpf/states.c:1043: + * to corresponding parent states of visit->backedges[*].state until fixed point is reached, WARNING: line length of 89 exceeds 80 columns #1165: FILE: kernel/bpf/states.c:1048: +static int propagate_backedges(struct bpf_verifier_env *env, struct bpf_scc_visit *visit) WARNING: line length of 84 exceeds 80 columns #1176: FILE: kernel/bpf/states.c:1059: + verbose(env, "%s: too many iterations\n", __func__); WARNING: line length of 94 exceeds 80 columns #1177: FILE: kernel/bpf/states.c:1060: + for (backedge = visit->backedges; backedge; backedge = backedge->next) WARNING: line length of 84 exceeds 80 columns #1178: FILE: kernel/bpf/states.c:1061: + bpf_mark_all_scalars_precise(env, &backedge->state); WARNING: line length of 88 exceeds 80 columns #1182: FILE: kernel/bpf/states.c:1065: + for (backedge = visit->backedges; backedge; backedge = backedge->next) { WARNING: line length of 86 exceeds 80 columns #1184: FILE: kernel/bpf/states.c:1067: + err = propagate_precision(env, st->equal_state, st, &changed); WARNING: line length of 101 exceeds 80 columns #1270: FILE: kernel/bpf/states.c:1153: +static bool iter_active_depths_differ(struct bpf_verifier_state *old, struct bpf_verifier_state *cur) WARNING: line length of 99 exceeds 80 columns #1294: FILE: kernel/bpf/states.c:1177: +static void mark_all_scalars_imprecise(struct bpf_verifier_env *env, struct bpf_verifier_state *st) WARNING: line length of 91 exceeds 80 columns #1328: FILE: kernel/bpf/states.c:1211: + force_new_state = env->test_state_freq || bpf_is_force_checkpoint(env, insn_idx) || WARNING: line length of 82 exceeds 80 columns #1336: FILE: kernel/bpf/states.c:1219: + * This heuristics helps decrease 'total_states' and 'peak_states' metric. WARNING: line length of 91 exceeds 80 columns #1359: FILE: kernel/bpf/states.c:1242: + struct bpf_func_state *frame = sl->state.frame[sl->state.curframe]; WARNING: line length of 99 exceeds 80 columns #1362: FILE: kernel/bpf/states.c:1245: + frame->async_entry_cnt != cur->frame[cur->curframe]->async_entry_cnt) { WARNING: line length of 87 exceeds 80 columns #1363: FILE: kernel/bpf/states.c:1246: + /* Different async_entry_cnt means that the verifier is WARNING: line length of 89 exceeds 80 columns #1365: FILE: kernel/bpf/states.c:1248: + * Seeing the same state is not an indication of infinite WARNING: line length of 89 exceeds 80 columns #1367: FILE: kernel/bpf/states.c:1250: + * But finding the same state doesn't mean that it's safe WARNING: line length of 91 exceeds 80 columns #1368: FILE: kernel/bpf/states.c:1251: + * to stop processing the current state. The previous state WARNING: line length of 89 exceeds 80 columns #1369: FILE: kernel/bpf/states.c:1252: + * hasn't yet reached bpf_exit, since state.branches > 0. WARNING: line length of 92 exceeds 80 columns #1370: FILE: kernel/bpf/states.c:1253: + * Checking in_async_callback_fn alone is not enough either. WARNING: line length of 89 exceeds 80 columns #1371: FILE: kernel/bpf/states.c:1254: + * Since the verifier still needs to catch infinite loops WARNING: line length of 86 exceeds 80 columns #1377: FILE: kernel/bpf/states.c:1260: + * states_maybe_looping() logic is too simplistic in detecting WARNING: line length of 85 exceeds 80 columns #1378: FILE: kernel/bpf/states.c:1261: + * states that *might* be equivalent, because it doesn't know WARNING: line length of 87 exceeds 80 columns #1380: FILE: kernel/bpf/states.c:1263: + * See process_iter_next_call() and iter_active_depths_differ() WARNING: line length of 84 exceeds 80 columns #1381: FILE: kernel/bpf/states.c:1264: + * for overview of the logic. When current and one of parent WARNING: line length of 89 exceeds 80 columns #1382: FILE: kernel/bpf/states.c:1265: + * states are detected as equivalent, it's a good thing: we prove WARNING: line length of 82 exceeds 80 columns #1383: FILE: kernel/bpf/states.c:1266: + * convergence and can stop simulating further iterations. WARNING: line length of 90 exceeds 80 columns #1384: FILE: kernel/bpf/states.c:1267: + * It's safe to assume that iterator loop will finish, taking into WARNING: line length of 93 exceeds 80 columns #1388: FILE: kernel/bpf/states.c:1271: + * Note, that states have to be compared exactly in this case because WARNING: line length of 91 exceeds 80 columns #1389: FILE: kernel/bpf/states.c:1272: + * read and precision marks might not be finalized inside the loop. WARNING: line length of 93 exceeds 80 columns #1406: FILE: kernel/bpf/states.c:1289: + * Here verifier would first visit path 1-3, create a checkpoint at 3 WARNING: line length of 88 exceeds 80 columns #1407: FILE: kernel/bpf/states.c:1290: + * with r7=-16, continue to 4-7,3. Existing checkpoint at 3 does WARNING: line length of 90 exceeds 80 columns #1408: FILE: kernel/bpf/states.c:1291: + * not have read or precision mark for r7 yet, thus inexact states WARNING: line length of 87 exceeds 80 columns #1413: FILE: kernel/bpf/states.c:1296: + if (states_equal(env, &sl->state, cur, RANGE_WITHIN)) { WARNING: line length of 84 exceeds 80 columns #1415: FILE: kernel/bpf/states.c:1298: + struct bpf_reg_state *iter_state, *iter_reg; WARNING: line length of 85 exceeds 80 columns #1420: FILE: kernel/bpf/states.c:1303: + * iter state pointer is always the first arg WARNING: line length of 88 exceeds 80 columns #1423: FILE: kernel/bpf/states.c:1306: + /* current state is valid due to states_equal(), WARNING: line length of 85 exceeds 80 columns #1424: FILE: kernel/bpf/states.c:1307: + * so we can assume valid iter and reg state, WARNING: line length of 83 exceeds 80 columns #1427: FILE: kernel/bpf/states.c:1310: + spi = bpf_get_spi(iter_reg->var_off.value); WARNING: line length of 102 exceeds 80 columns #1428: FILE: kernel/bpf/states.c:1311: + iter_state = &bpf_func(env, iter_reg)->stack[spi].spilled_ptr; WARNING: line length of 94 exceeds 80 columns #1429: FILE: kernel/bpf/states.c:1312: + if (iter_state->iter.state == BPF_ITER_STATE_ACTIVE) { WARNING: line length of 86 exceeds 80 columns #1437: FILE: kernel/bpf/states.c:1320: + if (sl->state.may_goto_depth != cur->may_goto_depth && WARNING: line length of 87 exceeds 80 columns #1438: FILE: kernel/bpf/states.c:1321: + states_equal(env, &sl->state, cur, RANGE_WITHIN)) { WARNING: line length of 87 exceeds 80 columns #1444: FILE: kernel/bpf/states.c:1327: + if (states_equal(env, &sl->state, cur, RANGE_WITHIN)) { WARNING: line length of 94 exceeds 80 columns #1450: FILE: kernel/bpf/states.c:1333: + /* attempt to detect infinite loop to avoid unnecessary doomed work */ WARNING: line length of 92 exceeds 80 columns #1455: FILE: kernel/bpf/states.c:1338: + sl->state.callback_unroll_depth == cur->callback_unroll_depth) { WARNING: line length of 94 exceeds 80 columns #1457: FILE: kernel/bpf/states.c:1340: + verbose(env, "infinite loop detected at insn %d\n", insn_idx); WARNING: line length of 84 exceeds 80 columns #1459: FILE: kernel/bpf/states.c:1342: + print_verifier_state(env, cur, cur->curframe, true); WARNING: line length of 91 exceeds 80 columns #1461: FILE: kernel/bpf/states.c:1344: + print_verifier_state(env, &sl->state, cur->curframe, true); WARNING: line length of 87 exceeds 80 columns #1464: FILE: kernel/bpf/states.c:1347: + /* if the verifier is processing a loop, avoid adding new state WARNING: line length of 83 exceeds 80 columns #1465: FILE: kernel/bpf/states.c:1348: + * too often, since different loop iterations have distinct WARNING: line length of 84 exceeds 80 columns #1473: FILE: kernel/bpf/states.c:1356: + * This threshold shouldn't be too high either, since states WARNING: line length of 85 exceeds 80 columns #1474: FILE: kernel/bpf/states.c:1357: + * at the end of the loop are likely to be useful in pruning. WARNING: line length of 82 exceeds 80 columns #1478: FILE: kernel/bpf/states.c:1361: + env->jmps_processed - env->prev_jmps_processed < 20 && WARNING: line length of 81 exceeds 80 columns #1479: FILE: kernel/bpf/states.c:1362: + env->insn_processed - env->prev_insn_processed < 100) WARNING: line length of 90 exceeds 80 columns #1485: FILE: kernel/bpf/states.c:1368: + if (states_equal(env, &sl->state, cur, loop ? RANGE_WITHIN : NOT_EXACT)) { WARNING: line length of 85 exceeds 80 columns #1490: FILE: kernel/bpf/states.c:1373: + * current state is equivalent to it (except precision marks) WARNING: line length of 86 exceeds 80 columns #1497: FILE: kernel/bpf/states.c:1380: + err = err ? : propagate_precision(env, &sl->state, cur, NULL); WARNING: line length of 92 exceeds 80 columns #1500: FILE: kernel/bpf/states.c:1383: + /* When processing iterator based loops above propagate_liveness and WARNING: line length of 96 exceeds 80 columns #1501: FILE: kernel/bpf/states.c:1384: + * propagate_precision calls are not sufficient to transfer all relevant WARNING: line length of 86 exceeds 80 columns #1502: FILE: kernel/bpf/states.c:1385: + * read and precision marks. E.g. consider the following case: WARNING: line length of 90 exceeds 80 columns #1504: FILE: kernel/bpf/states.c:1387: + * .-> A --. Assume the states are visited in the order A, B, C. WARNING: line length of 97 exceeds 80 columns #1505: FILE: kernel/bpf/states.c:1388: + * | | | Assume that state B reaches a state equivalent to state A. WARNING: line length of 94 exceeds 80 columns #1506: FILE: kernel/bpf/states.c:1389: + * | v v At this point, state C is not processed yet, so state A WARNING: line length of 91 exceeds 80 columns #1507: FILE: kernel/bpf/states.c:1390: + * '-- B C has not received any read or precision marks from C. WARNING: line length of 89 exceeds 80 columns #1508: FILE: kernel/bpf/states.c:1391: + * Thus, marks propagated from A to B are incomplete. WARNING: line length of 89 exceeds 80 columns #1510: FILE: kernel/bpf/states.c:1393: + * The verifier mitigates this by performing the following steps: WARNING: line length of 95 exceeds 80 columns #1512: FILE: kernel/bpf/states.c:1395: + * - Prior to the main verification pass, strongly connected components WARNING: line length of 87 exceeds 80 columns #1513: FILE: kernel/bpf/states.c:1396: + * (SCCs) are computed over the program's control flow graph, WARNING: line length of 90 exceeds 80 columns #1516: FILE: kernel/bpf/states.c:1399: + * - During the main verification pass, `maybe_enter_scc()` checks WARNING: line length of 93 exceeds 80 columns #1517: FILE: kernel/bpf/states.c:1400: + * whether the current verifier state is entering an SCC. If so, an WARNING: line length of 91 exceeds 80 columns #1518: FILE: kernel/bpf/states.c:1401: + * instance of a `bpf_scc_visit` object is created, and the state WARNING: line length of 92 exceeds 80 columns #1521: FILE: kernel/bpf/states.c:1404: + * - This instance is associated not with the SCC itself, but with a WARNING: line length of 97 exceeds 80 columns #1522: FILE: kernel/bpf/states.c:1405: + * `bpf_scc_callchain`: a tuple consisting of the call sites leading to WARNING: line length of 83 exceeds 80 columns #1523: FILE: kernel/bpf/states.c:1406: + * the SCC and the SCC id. See `compute_scc_callchain()`. WARNING: line length of 85 exceeds 80 columns #1525: FILE: kernel/bpf/states.c:1408: + * - When a verification path encounters a `states_equal(..., WARNING: line length of 95 exceeds 80 columns #1526: FILE: kernel/bpf/states.c:1409: + * RANGE_WITHIN)` condition, there exists a call chain describing the WARNING: line length of 95 exceeds 80 columns #1527: FILE: kernel/bpf/states.c:1410: + * current state and a corresponding `bpf_scc_visit` instance. A copy WARNING: line length of 94 exceeds 80 columns #1531: FILE: kernel/bpf/states.c:1414: + * - When a verification path terminates, `maybe_exit_scc()` is called WARNING: line length of 99 exceeds 80 columns #1532: FILE: kernel/bpf/states.c:1415: + * from `bpf_update_branch_counts()`. For states with `branches == 0`, it WARNING: line length of 95 exceeds 80 columns #1533: FILE: kernel/bpf/states.c:1416: + * checks whether the state is the entry state of any `bpf_scc_visit` WARNING: line length of 95 exceeds 80 columns #1534: FILE: kernel/bpf/states.c:1417: + * instance. If it is, this indicates that all paths originating from WARNING: line length of 95 exceeds 80 columns #1535: FILE: kernel/bpf/states.c:1418: + * this SCC visit have been explored. `propagate_backedges()` is then WARNING: line length of 90 exceeds 80 columns #1536: FILE: kernel/bpf/states.c:1419: + * called, which propagates read and precision marks through the WARNING: line length of 93 exceeds 80 columns #1538: FILE: kernel/bpf/states.c:1421: + * (In the earlier example, this would propagate marks from A to B, WARNING: line length of 84 exceeds 80 columns #1553: FILE: kernel/bpf/states.c:1436: + * Here, there are two distinct callchains leading to SCC#1: WARNING: line length of 93 exceeds 80 columns #1557: FILE: kernel/bpf/states.c:1440: + * Each callchain identifies a separate `bpf_scc_visit` instance that WARNING: line length of 94 exceeds 80 columns #1558: FILE: kernel/bpf/states.c:1441: + * accumulates backedge states. The `propagate_{liveness,precision}()` WARNING: line length of 92 exceeds 80 columns #1559: FILE: kernel/bpf/states.c:1442: + * functions traverse the parent state of each backedge state, which WARNING: line length of 94 exceeds 80 columns #1560: FILE: kernel/bpf/states.c:1443: + * means these parent states must remain valid (i.e., not freed) while WARNING: line length of 94 exceeds 80 columns #1563: FILE: kernel/bpf/states.c:1446: + * Associating `bpf_scc_visit` instances directly with SCCs instead of WARNING: line length of 92 exceeds 80 columns #1565: FILE: kernel/bpf/states.c:1448: + * - States explored during `C: foo()` would contribute backedges to WARNING: line length of 90 exceeds 80 columns #1566: FILE: kernel/bpf/states.c:1449: + * SCC#1, but SCC#1 would only be exited once the exploration of WARNING: line length of 96 exceeds 80 columns #1568: FILE: kernel/bpf/states.c:1451: + * - By that time, the states explored between `A: foo()` and `C: foo()` WARNING: line length of 93 exceeds 80 columns #1569: FILE: kernel/bpf/states.c:1452: + * (i.e., `B: ...`) may have already been freed, causing the parent WARNING: line length of 85 exceeds 80 columns #1579: FILE: kernel/bpf/states.c:1462: + err = bpf_copy_verifier_state(&backedge->state, cur); WARNING: line length of 89 exceeds 80 columns #1582: FILE: kernel/bpf/states.c:1465: + err = err ?: add_scc_backedge(env, &sl->state, backedge); WARNING: line length of 89 exceeds 80 columns #1584: FILE: kernel/bpf/states.c:1467: + bpf_free_verifier_state(&backedge->state, false); WARNING: line length of 86 exceeds 80 columns #1592: FILE: kernel/bpf/states.c:1475: + /* when new state is not going to be added do not increase miss count. WARNING: line length of 81 exceeds 80 columns #1595: FILE: kernel/bpf/states.c:1478: + * states from some iterations of the loop (some in the beginning WARNING: line length of 85 exceeds 80 columns #1602: FILE: kernel/bpf/states.c:1485: + * Higher numbers increase max_states_per_insn and verification time, WARNING: line length of 84 exceeds 80 columns #1605: FILE: kernel/bpf/states.c:1488: + * Use bigger 'n' for checkpoints because evicting checkpoint states WARNING: line length of 94 exceeds 80 columns #1608: FILE: kernel/bpf/states.c:1491: + n = bpf_is_force_checkpoint(env, insn_idx) && sl->state.branches > 0 ? 64 : 3; WARNING: line length of 81 exceeds 80 columns #1640: FILE: kernel/bpf/states.c:1523: + new_sl = kzalloc_obj(struct bpf_verifier_state_list, GFP_KERNEL_ACCOUNT); CHECK: Alignment should match open parenthesis #1949: FILE: kernel/bpf/verifier.c:1577: +void bpf_free_verifier_state(struct bpf_verifier_state *state, + bool free_self) CHECK: Alignment should match open parenthesis #2004: FILE: kernel/bpf/verifier.c:1602: +int bpf_copy_verifier_state(struct bpf_verifier_state *dst_state, + const struct bpf_verifier_state *src) WARNING: line length of 86 exceeds 80 columns #2389: FILE: kernel/bpf/verifier.c:3609: +int bpf_push_jmp_history(struct bpf_verifier_env *env, struct bpf_verifier_state *cur, CHECK: Alignment should match open parenthesis #2390: FILE: kernel/bpf/verifier.c:3610: +int bpf_push_jmp_history(struct bpf_verifier_env *env, struct bpf_verifier_state *cur, + int insn_flags, u64 linked_regs) WARNING: line length of 91 exceeds 80 columns #2453: FILE: kernel/bpf/verifier.c:4076: + bpf_bt_set_frame_reg(bt, bt->frame - 1, i); CHECK: Alignment should match open parenthesis #2464: FILE: kernel/bpf/verifier.c:4263: +void bpf_mark_all_scalars_precise(struct bpf_verifier_env *env, + struct bpf_verifier_state *st) CHECK: Alignment should match open parenthesis #2521: FILE: kernel/bpf/verifier.c:4397: +int bpf_mark_chain_precision(struct bpf_verifier_env *env, + struct bpf_verifier_state *starting_state, WARNING: line length of 82 exceeds 80 columns #2532: FILE: kernel/bpf/verifier.c:4482: + bpf_mark_all_scalars_precise(env, starting_state); WARNING: line length of 93 exceeds 80 columns #2624: FILE: kernel/bpf/verifier.c:4952: + * Otherwise bpf_is_spilled_reg() may == true && spilled_ptr.type == NOT_INIT WARNING: line length of 89 exceeds 80 columns #2879: FILE: kernel/bpf/verifier.c:10313: + if (bpf_register_is_null(reg) && type_may_be_null(arg->arg_type)) WARNING: line length of 90 exceeds 80 columns #3011: FILE: kernel/bpf/verifier.c:12315: + if (is_kfunc_arg_nullable(meta->btf, &args[argno]) && bpf_register_is_null(reg) && WARNING: line length of 81 exceeds 80 columns #3020: FILE: kernel/bpf/verifier.c:13056: + if ((bpf_register_is_null(reg) || type_may_be_null(reg->type)) && WARNING: line length of 109 exceeds 80 columns #3029: FILE: kernel/bpf/verifier.c:13376: + if (!bpf_register_is_null(buff_reg) || !is_kfunc_arg_nullable(meta->btf, buff_arg)) { WARNING: line length of 96 exceeds 80 columns #3083: FILE: kernel/bpf/verifier.c:17347: + err = bpf_push_jmp_history(env, this_branch, 0, linked_regs_pack(&linked_regs)); total: 0 errors, 198 warnings, 9 checks, 4276 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. Commit b346f15d5e94 ("bpf: Move state equivalence logic to states.c") has style problems, please review. NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT BAD_REPORTED_BY_LINK CAMELCASE COMMIT_LOG_LONG_LINE FILE_PATH_CHANGES GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. total: 0 errors, 198 warnings, 9 checks, 4276 lines checked