WARNING: line length of 93 exceeds 80 columns #38: FILE: include/linux/bpf_verifier.h:1084: +void bpf_bt_sync_linked_regs(struct backtrack_state *bt, struct bpf_jmp_history_entry *hist); WARNING: line length of 81 exceeds 80 columns #46: FILE: include/linux/bpf_verifier.h:1125: +static inline bool bpf_is_spilled_scalar_reg(const struct bpf_stack_state *stack) WARNING: line length of 84 exceeds 80 columns #48: FILE: include/linux/bpf_verifier.h:1127: + return bpf_is_spilled_reg(stack) && stack->spilled_ptr.type == SCALAR_VALUE; WARNING: line length of 86 exceeds 80 columns #58: FILE: include/linux/bpf_verifier.h:1145: +static inline bool bt_is_frame_reg_set(struct backtrack_state *bt, u32 frame, u32 reg) WARNING: line length of 88 exceeds 80 columns #63: FILE: include/linux/bpf_verifier.h:1150: +static inline bool bt_is_frame_slot_set(struct backtrack_state *bt, u32 frame, u32 slot) WARNING: line length of 86 exceeds 80 columns #99: FILE: kernel/bpf/backtrack.c:10: +int bpf_push_jmp_history(struct bpf_verifier_env *env, struct bpf_verifier_state *cur, WARNING: line length of 86 exceeds 80 columns #112: FILE: kernel/bpf/backtrack.c:23: + (env->cur_hist_ent->flags & insn_flags) != insn_flags, WARNING: line length of 91 exceeds 80 columns #113: FILE: kernel/bpf/backtrack.c:24: + env, "insn history: insn_idx %d cur flags %x new flags %x", WARNING: line length of 85 exceeds 80 columns #114: FILE: kernel/bpf/backtrack.c:25: + env->insn_idx, env->cur_hist_ent->flags, insn_flags); WARNING: line length of 86 exceeds 80 columns #199: FILE: kernel/bpf/backtrack.c:110: +static struct bpf_jmp_history_entry *get_jmp_hist_entry(struct bpf_verifier_state *st, WARNING: line length of 83 exceeds 80 columns #200: FILE: kernel/bpf/backtrack.c:111: + u32 hist_end, int insn_idx) ERROR: code indent should use tabs where possible #200: FILE: kernel/bpf/backtrack.c:111: +^I^I^I^I^I^I u32 hist_end, int insn_idx)$ CHECK: Alignment should match open parenthesis #200: FILE: kernel/bpf/backtrack.c:111: +static struct bpf_jmp_history_entry *get_jmp_hist_entry(struct bpf_verifier_state *st, + u32 hist_end, int insn_idx) WARNING: line length of 85 exceeds 80 columns #251: FILE: kernel/bpf/backtrack.c:162: +static inline void bt_clear_frame_reg(struct backtrack_state *bt, u32 frame, u32 reg) WARNING: line length of 87 exceeds 80 columns #266: FILE: kernel/bpf/backtrack.c:177: +static inline void bt_clear_frame_slot(struct backtrack_state *bt, u32 frame, u32 slot) CHECK: Please don't use multiple blank lines #296: FILE: kernel/bpf/backtrack.c:207: + + CHECK: Please use a blank line after function/struct/union/enum declarations #316: FILE: kernel/bpf/backtrack.c:227: +} +/* format stack slots bitmask, e.g., "-8,-24,-40" for 0x15 mask */ WARNING: line length of 82 exceeds 80 columns #327: FILE: kernel/bpf/backtrack.c:238: + n = snprintf(buf, buf_sz, "%s%d", first ? "" : ",", -(i + 1) * 8); CHECK: Please don't use multiple blank lines #336: FILE: kernel/bpf/backtrack.c:247: + + WARNING: line length of 89 exceeds 80 columns #347: FILE: kernel/bpf/backtrack.c:258: + struct bpf_jmp_history_entry *hist, struct backtrack_state *bt) WARNING: line length of 81 exceeds 80 columns #360: FILE: kernel/bpf/backtrack.c:271: + fmt_reg_mask(env->tmp_str_buf, TMP_STR_BUF_LEN, bt_reg_mask(bt)); WARNING: line length of 89 exceeds 80 columns #363: FILE: kernel/bpf/backtrack.c:274: + bpf_fmt_stack_mask(env->tmp_str_buf, TMP_STR_BUF_LEN, bt_stack_mask(bt)); WARNING: line length of 86 exceeds 80 columns #369: FILE: kernel/bpf/backtrack.c:280: + /* If there is a history record that some registers gained range at this insn, WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP #453: FILE: kernel/bpf/backtrack.c:364: + return -ENOTSUPP; WARNING: line length of 94 exceeds 80 columns #487: FILE: kernel/bpf/backtrack.c:398: + verifier_bug(env, "global subprog unexpected regs %x", WARNING: else is not generally useful after a break or return #494: FILE: kernel/bpf/backtrack.c:405: + return 0; + } else { WARNING: line length of 94 exceeds 80 columns #502: FILE: kernel/bpf/backtrack.c:413: + verifier_bug(env, "static subprog unexpected regs %x", WARNING: line length of 81 exceeds 80 columns #506: FILE: kernel/bpf/backtrack.c:417: + /* we are now tracking register spills correctly, WARNING: line length of 91 exceeds 80 columns #519: FILE: kernel/bpf/backtrack.c:430: + bpf_bt_set_frame_reg(bt, bt->frame - 1, i); WARNING: line length of 94 exceeds 80 columns #526: FILE: kernel/bpf/backtrack.c:437: + } else if (bpf_is_sync_callback_calling_insn(insn) && idx != subseq_idx - 1) { WARNING: line length of 83 exceeds 80 columns #527: FILE: kernel/bpf/backtrack.c:438: + /* exit from callback subprog to callback-calling helper or WARNING: line length of 82 exceeds 80 columns #528: FILE: kernel/bpf/backtrack.c:439: + * kfunc call. Use idx/subseq_idx check to discern it from WARNING: line length of 87 exceeds 80 columns #531: FILE: kernel/bpf/backtrack.c:442: + * propagate precision of r1-r5 (if any requested), as they are WARNING: line length of 86 exceeds 80 columns #532: FILE: kernel/bpf/backtrack.c:443: + * not actually arguments passed directly to callback subprogs WARNING: line length of 87 exceeds 80 columns #540: FILE: kernel/bpf/backtrack.c:451: + verifier_bug(env, "callback leftover stack slots %llx", WARNING: line length of 81 exceeds 80 columns #551: FILE: kernel/bpf/backtrack.c:462: + /* kfunc with imm==0 is invalid and fixup_kfunc_call will WARNING: line length of 81 exceeds 80 columns #552: FILE: kernel/bpf/backtrack.c:463: + * catch this error later. Make backtracking conservative WARNING: line length of 85 exceeds 80 columns #555: FILE: kernel/bpf/backtrack.c:466: + if (insn->src_reg == BPF_PSEUDO_KFUNC_CALL && insn->imm == 0) WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP #556: FILE: kernel/bpf/backtrack.c:467: + return -ENOTSUPP; WARNING: line length of 82 exceeds 80 columns #560: FILE: kernel/bpf/backtrack.c:471: + /* if backtracking was looking for registers R1-R5 WARNING: line length of 89 exceeds 80 columns #563: FILE: kernel/bpf/backtrack.c:474: + verifier_bug(env, "backtracking call unexpected regs %x", WARNING: line length of 89 exceeds 80 columns #567: FILE: kernel/bpf/backtrack.c:478: + if (insn->src_reg == BPF_REG_0 && insn->imm == BPF_FUNC_tail_call CHECK: Logical continuations should be on the previous line #568: FILE: kernel/bpf/backtrack.c:479: + if (insn->src_reg == BPF_REG_0 && insn->imm == BPF_FUNC_tail_call + && subseq_idx - idx != 1) { WARNING: line length of 85 exceeds 80 columns #575: FILE: kernel/bpf/backtrack.c:486: + /* Backtracking to a nested function call, 'idx' is a part of WARNING: line length of 85 exceeds 80 columns #576: FILE: kernel/bpf/backtrack.c:487: + * the inner frame 'subseq_idx' is a part of the outer frame. WARNING: line length of 82 exceeds 80 columns #577: FILE: kernel/bpf/backtrack.c:488: + * In case of a regular function call, instructions giving WARNING: line length of 87 exceeds 80 columns #578: FILE: kernel/bpf/backtrack.c:489: + * precision to registers R1-R5 should have been found already. WARNING: line length of 83 exceeds 80 columns #579: FILE: kernel/bpf/backtrack.c:490: + * In case of a callback, it is ok to have R1-R5 marked for WARNING: line length of 83 exceeds 80 columns #580: FILE: kernel/bpf/backtrack.c:491: + * backtracking, as these registers are set by the function WARNING: line length of 83 exceeds 80 columns #583: FILE: kernel/bpf/backtrack.c:494: + if (subseq_idx >= 0 && bpf_calls_callback(env, subseq_idx)) WARNING: line length of 89 exceeds 80 columns #587: FILE: kernel/bpf/backtrack.c:498: + verifier_bug(env, "backtracking exit unexpected regs %x", WARNING: line length of 91 exceeds 80 columns #601: FILE: kernel/bpf/backtrack.c:512: + bpf_pseudo_call(&env->prog->insnsi[subseq_idx - 1]) && WARNING: line length of 81 exceeds 80 columns #615: FILE: kernel/bpf/backtrack.c:526: + if (!bt_is_reg_set(bt, dreg) && !bt_is_reg_set(bt, sreg)) WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP #644: FILE: kernel/bpf/backtrack.c:555: + return -ENOTSUPP; WARNING: line length of 95 exceeds 80 columns #680: FILE: kernel/bpf/backtrack.c:591: + * R8=map_value(id=0,off=0,ks=4,vs=1952,imm=0) R9_w=map_value(id=0,off=40,ks=4,vs=1952,imm=0) WARNING: line length of 95 exceeds 80 columns #701: FILE: kernel/bpf/backtrack.c:612: + * commit 7640ead93924 ("bpf: verifier: make sure callees don't prune with caller differences") CHECK: Alignment should match open parenthesis #706: FILE: kernel/bpf/backtrack.c:617: +void bpf_mark_all_scalars_precise(struct bpf_verifier_env *env, + struct bpf_verifier_state *st) WARNING: line length of 100 exceeds 80 columns #713: FILE: kernel/bpf/backtrack.c:624: + verbose(env, "mark_precise: frame%d: falling back to forcing all scalars precise\n", WARNING: line length of 107 exceeds 80 columns #732: FILE: kernel/bpf/backtrack.c:643: + verbose(env, "force_precise: frame%d: forcing r%d to be precise\n", WARNING: line length of 84 exceeds 80 columns #736: FILE: kernel/bpf/backtrack.c:647: + for (j = 0; j < func->allocated_stack / BPF_REG_SIZE; j++) { WARNING: line length of 108 exceeds 80 columns #744: FILE: kernel/bpf/backtrack.c:655: + verbose(env, "force_precise: frame%d: forcing fp%d to be precise\n", CHECK: Alignment should match open parenthesis #840: FILE: kernel/bpf/backtrack.c:751: +int bpf_mark_chain_precision(struct bpf_verifier_env *env, + struct bpf_verifier_state *starting_state, WARNING: line length of 104 exceeds 80 columns #884: FILE: kernel/bpf/backtrack.c:795: + verbose(env, "mark_precise: frame%d: last_idx %d first_idx %d subseq_idx %d \n", WARNING: unnecessary whitespace before a quoted newline #884: FILE: kernel/bpf/backtrack.c:795: + verbose(env, "mark_precise: frame%d: last_idx %d first_idx %d subseq_idx %d \n", WARNING: line length of 107 exceeds 80 columns #911: FILE: kernel/bpf/backtrack.c:822: + verifier_bug(env, "backtracking func entry subprog %d reg_mask %x stack_mask %llx", WARNING: line length of 98 exceeds 80 columns #912: FILE: kernel/bpf/backtrack.c:823: + st->frame[0]->subprogno, bt_reg_mask(bt), bt_stack_mask(bt)); WARNING: line length of 83 exceeds 80 columns #922: FILE: kernel/bpf/backtrack.c:833: + err = backtrack_insn(env, i, subseq_idx, hist, bt); WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP #924: FILE: kernel/bpf/backtrack.c:835: + if (err == -ENOTSUPP) { WARNING: line length of 82 exceeds 80 columns #925: FILE: kernel/bpf/backtrack.c:836: + bpf_mark_all_scalars_precise(env, starting_state); WARNING: line length of 91 exceeds 80 columns #932: FILE: kernel/bpf/backtrack.c:843: + /* Found assignment(s) into tracked register in this state. WARNING: line length of 83 exceeds 80 columns #933: FILE: kernel/bpf/backtrack.c:844: + * Since this state is already marked, just return. WARNING: line length of 85 exceeds 80 columns #934: FILE: kernel/bpf/backtrack.c:845: + * Nothing to be tracked further in the parent state. WARNING: line length of 81 exceeds 80 columns #942: FILE: kernel/bpf/backtrack.c:853: + /* This can happen if backtracking reached insn 0 WARNING: line length of 82 exceeds 80 columns #945: FILE: kernel/bpf/backtrack.c:856: + * It means the backtracking missed the spot where WARNING: line length of 87 exceeds 80 columns #946: FILE: kernel/bpf/backtrack.c:857: + * particular register was initialized with a constant. WARNING: line length of 94 exceeds 80 columns #975: FILE: kernel/bpf/backtrack.c:886: + if (verifier_bug_if(i >= func->allocated_stack / BPF_REG_SIZE, WARNING: line length of 89 exceeds 80 columns #976: FILE: kernel/bpf/backtrack.c:887: + env, "stack slot %d, total slots %d", WARNING: line length of 93 exceeds 80 columns #977: FILE: kernel/bpf/backtrack.c:888: + i, func->allocated_stack / BPF_REG_SIZE)) WARNING: line length of 82 exceeds 80 columns #980: FILE: kernel/bpf/backtrack.c:891: + if (!bpf_is_spilled_scalar_reg(&func->stack[i])) { WARNING: line length of 92 exceeds 80 columns #995: FILE: kernel/bpf/backtrack.c:906: + verbose(env, "mark_precise: frame%d: parent state regs=%s ", WARNING: line length of 85 exceeds 80 columns #997: FILE: kernel/bpf/backtrack.c:908: + bpf_fmt_stack_mask(env->tmp_str_buf, TMP_STR_BUF_LEN, CHECK: Alignment should match open parenthesis #998: FILE: kernel/bpf/backtrack.c:909: + bpf_fmt_stack_mask(env->tmp_str_buf, TMP_STR_BUF_LEN, + bt_frame_stack_mask(bt, fr)); WARNING: line length of 92 exceeds 80 columns #1343: FILE: kernel/bpf/verifier.c:3581: +void bpf_bt_sync_linked_regs(struct backtrack_state *bt, struct bpf_jmp_history_entry *hist) total: 1 errors, 74 warnings, 8 checks, 2030 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. NOTE: Whitespace errors detected. You may wish to use scripts/cleanpatch or scripts/cleanfile Commit 94540956e8f8 ("bpf: Move backtracking logic to backtrack.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.