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:1126: +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:1128: + 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:1146: +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:1151: +static inline bool bt_is_frame_slot_set(struct backtrack_state *bt, u32 frame, u32 slot) WARNING: line length of 86 exceeds 80 columns #100: FILE: kernel/bpf/backtrack.c:11: +int bpf_push_jmp_history(struct bpf_verifier_env *env, struct bpf_verifier_state *cur, WARNING: line length of 86 exceeds 80 columns #113: FILE: kernel/bpf/backtrack.c:24: + (env->cur_hist_ent->flags & insn_flags) != insn_flags, WARNING: line length of 91 exceeds 80 columns #114: FILE: kernel/bpf/backtrack.c:25: + env, "insn history: insn_idx %d cur flags %x new flags %x", WARNING: line length of 85 exceeds 80 columns #115: FILE: kernel/bpf/backtrack.c:26: + env->insn_idx, env->cur_hist_ent->flags, insn_flags); WARNING: line length of 86 exceeds 80 columns #200: FILE: kernel/bpf/backtrack.c:111: +static struct bpf_jmp_history_entry *get_jmp_hist_entry(struct bpf_verifier_state *st, WARNING: line length of 83 exceeds 80 columns #201: FILE: kernel/bpf/backtrack.c:112: + u32 hist_end, int insn_idx) ERROR: code indent should use tabs where possible #201: FILE: kernel/bpf/backtrack.c:112: +^I^I^I^I^I^I u32 hist_end, int insn_idx)$ CHECK: Alignment should match open parenthesis #201: FILE: kernel/bpf/backtrack.c:112: +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 #252: FILE: kernel/bpf/backtrack.c:163: +static inline void bt_clear_frame_reg(struct backtrack_state *bt, u32 frame, u32 reg) WARNING: line length of 87 exceeds 80 columns #267: FILE: kernel/bpf/backtrack.c:178: +static inline void bt_clear_frame_slot(struct backtrack_state *bt, u32 frame, u32 slot) CHECK: Please don't use multiple blank lines #297: FILE: kernel/bpf/backtrack.c:208: + + CHECK: Please use a blank line after function/struct/union/enum declarations #317: FILE: kernel/bpf/backtrack.c:228: +} +/* format stack slots bitmask, e.g., "-8,-24,-40" for 0x15 mask */ WARNING: line length of 82 exceeds 80 columns #328: FILE: kernel/bpf/backtrack.c:239: + n = snprintf(buf, buf_sz, "%s%d", first ? "" : ",", -(i + 1) * 8); CHECK: Please don't use multiple blank lines #337: FILE: kernel/bpf/backtrack.c:248: + + WARNING: line length of 89 exceeds 80 columns #348: FILE: kernel/bpf/backtrack.c:259: + struct bpf_jmp_history_entry *hist, struct backtrack_state *bt) WARNING: line length of 81 exceeds 80 columns #361: FILE: kernel/bpf/backtrack.c:272: + fmt_reg_mask(env->tmp_str_buf, TMP_STR_BUF_LEN, bt_reg_mask(bt)); WARNING: line length of 89 exceeds 80 columns #364: FILE: kernel/bpf/backtrack.c:275: + bpf_fmt_stack_mask(env->tmp_str_buf, TMP_STR_BUF_LEN, bt_stack_mask(bt)); WARNING: line length of 86 exceeds 80 columns #370: FILE: kernel/bpf/backtrack.c:281: + /* If there is a history record that some registers gained range at this insn, WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP #454: FILE: kernel/bpf/backtrack.c:365: + return -ENOTSUPP; WARNING: line length of 94 exceeds 80 columns #488: FILE: kernel/bpf/backtrack.c:399: + verifier_bug(env, "global subprog unexpected regs %x", WARNING: else is not generally useful after a break or return #495: FILE: kernel/bpf/backtrack.c:406: + return 0; + } else { WARNING: line length of 94 exceeds 80 columns #503: FILE: kernel/bpf/backtrack.c:414: + verifier_bug(env, "static subprog unexpected regs %x", WARNING: line length of 81 exceeds 80 columns #507: FILE: kernel/bpf/backtrack.c:418: + /* we are now tracking register spills correctly, WARNING: line length of 91 exceeds 80 columns #520: FILE: kernel/bpf/backtrack.c:431: + bpf_bt_set_frame_reg(bt, bt->frame - 1, i); WARNING: line length of 94 exceeds 80 columns #527: FILE: kernel/bpf/backtrack.c:438: + } else if (bpf_is_sync_callback_calling_insn(insn) && idx != subseq_idx - 1) { WARNING: line length of 83 exceeds 80 columns #528: FILE: kernel/bpf/backtrack.c:439: + /* exit from callback subprog to callback-calling helper or WARNING: line length of 82 exceeds 80 columns #529: FILE: kernel/bpf/backtrack.c:440: + * kfunc call. Use idx/subseq_idx check to discern it from WARNING: line length of 87 exceeds 80 columns #532: FILE: kernel/bpf/backtrack.c:443: + * propagate precision of r1-r5 (if any requested), as they are WARNING: line length of 86 exceeds 80 columns #533: FILE: kernel/bpf/backtrack.c:444: + * not actually arguments passed directly to callback subprogs WARNING: line length of 87 exceeds 80 columns #541: FILE: kernel/bpf/backtrack.c:452: + verifier_bug(env, "callback leftover stack slots %llx", WARNING: line length of 81 exceeds 80 columns #552: FILE: kernel/bpf/backtrack.c:463: + /* kfunc with imm==0 is invalid and fixup_kfunc_call will WARNING: line length of 81 exceeds 80 columns #553: FILE: kernel/bpf/backtrack.c:464: + * catch this error later. Make backtracking conservative WARNING: line length of 85 exceeds 80 columns #556: FILE: kernel/bpf/backtrack.c:467: + if (insn->src_reg == BPF_PSEUDO_KFUNC_CALL && insn->imm == 0) WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP #557: FILE: kernel/bpf/backtrack.c:468: + return -ENOTSUPP; WARNING: line length of 82 exceeds 80 columns #561: FILE: kernel/bpf/backtrack.c:472: + /* if backtracking was looking for registers R1-R5 WARNING: line length of 89 exceeds 80 columns #564: FILE: kernel/bpf/backtrack.c:475: + verifier_bug(env, "backtracking call unexpected regs %x", WARNING: line length of 89 exceeds 80 columns #568: FILE: kernel/bpf/backtrack.c:479: + if (insn->src_reg == BPF_REG_0 && insn->imm == BPF_FUNC_tail_call CHECK: Logical continuations should be on the previous line #569: FILE: kernel/bpf/backtrack.c:480: + 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 #576: FILE: kernel/bpf/backtrack.c:487: + /* Backtracking to a nested function call, 'idx' is a part of WARNING: line length of 85 exceeds 80 columns #577: FILE: kernel/bpf/backtrack.c:488: + * the inner frame 'subseq_idx' is a part of the outer frame. WARNING: line length of 82 exceeds 80 columns #578: FILE: kernel/bpf/backtrack.c:489: + * In case of a regular function call, instructions giving WARNING: line length of 87 exceeds 80 columns #579: FILE: kernel/bpf/backtrack.c:490: + * precision to registers R1-R5 should have been found already. WARNING: line length of 83 exceeds 80 columns #580: FILE: kernel/bpf/backtrack.c:491: + * In case of a callback, it is ok to have R1-R5 marked for WARNING: line length of 83 exceeds 80 columns #581: FILE: kernel/bpf/backtrack.c:492: + * backtracking, as these registers are set by the function WARNING: line length of 83 exceeds 80 columns #584: FILE: kernel/bpf/backtrack.c:495: + if (subseq_idx >= 0 && bpf_calls_callback(env, subseq_idx)) WARNING: line length of 89 exceeds 80 columns #588: FILE: kernel/bpf/backtrack.c:499: + verifier_bug(env, "backtracking exit unexpected regs %x", WARNING: line length of 91 exceeds 80 columns #602: FILE: kernel/bpf/backtrack.c:513: + bpf_pseudo_call(&env->prog->insnsi[subseq_idx - 1]) && WARNING: line length of 81 exceeds 80 columns #616: FILE: kernel/bpf/backtrack.c:527: + if (!bt_is_reg_set(bt, dreg) && !bt_is_reg_set(bt, sreg)) WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP #645: FILE: kernel/bpf/backtrack.c:556: + return -ENOTSUPP; WARNING: line length of 95 exceeds 80 columns #681: FILE: kernel/bpf/backtrack.c:592: + * 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 #702: FILE: kernel/bpf/backtrack.c:613: + * commit 7640ead93924 ("bpf: verifier: make sure callees don't prune with caller differences") CHECK: Alignment should match open parenthesis #707: FILE: kernel/bpf/backtrack.c:618: +void bpf_mark_all_scalars_precise(struct bpf_verifier_env *env, + struct bpf_verifier_state *st) WARNING: line length of 100 exceeds 80 columns #714: FILE: kernel/bpf/backtrack.c:625: + verbose(env, "mark_precise: frame%d: falling back to forcing all scalars precise\n", WARNING: line length of 107 exceeds 80 columns #733: FILE: kernel/bpf/backtrack.c:644: + verbose(env, "force_precise: frame%d: forcing r%d to be precise\n", WARNING: line length of 84 exceeds 80 columns #737: FILE: kernel/bpf/backtrack.c:648: + for (j = 0; j < func->allocated_stack / BPF_REG_SIZE; j++) { WARNING: line length of 108 exceeds 80 columns #745: FILE: kernel/bpf/backtrack.c:656: + verbose(env, "force_precise: frame%d: forcing fp%d to be precise\n", CHECK: Alignment should match open parenthesis #841: FILE: kernel/bpf/backtrack.c:752: +int bpf_mark_chain_precision(struct bpf_verifier_env *env, + struct bpf_verifier_state *starting_state, WARNING: line length of 104 exceeds 80 columns #885: FILE: kernel/bpf/backtrack.c:796: + verbose(env, "mark_precise: frame%d: last_idx %d first_idx %d subseq_idx %d \n", WARNING: unnecessary whitespace before a quoted newline #885: FILE: kernel/bpf/backtrack.c:796: + verbose(env, "mark_precise: frame%d: last_idx %d first_idx %d subseq_idx %d \n", WARNING: line length of 107 exceeds 80 columns #912: FILE: kernel/bpf/backtrack.c:823: + verifier_bug(env, "backtracking func entry subprog %d reg_mask %x stack_mask %llx", WARNING: line length of 98 exceeds 80 columns #913: FILE: kernel/bpf/backtrack.c:824: + st->frame[0]->subprogno, bt_reg_mask(bt), bt_stack_mask(bt)); WARNING: line length of 83 exceeds 80 columns #923: FILE: kernel/bpf/backtrack.c:834: + err = backtrack_insn(env, i, subseq_idx, hist, bt); WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP #925: FILE: kernel/bpf/backtrack.c:836: + if (err == -ENOTSUPP) { WARNING: line length of 82 exceeds 80 columns #926: FILE: kernel/bpf/backtrack.c:837: + bpf_mark_all_scalars_precise(env, starting_state); WARNING: line length of 91 exceeds 80 columns #933: FILE: kernel/bpf/backtrack.c:844: + /* Found assignment(s) into tracked register in this state. WARNING: line length of 83 exceeds 80 columns #934: FILE: kernel/bpf/backtrack.c:845: + * Since this state is already marked, just return. WARNING: line length of 85 exceeds 80 columns #935: FILE: kernel/bpf/backtrack.c:846: + * Nothing to be tracked further in the parent state. WARNING: line length of 81 exceeds 80 columns #943: FILE: kernel/bpf/backtrack.c:854: + /* This can happen if backtracking reached insn 0 WARNING: line length of 82 exceeds 80 columns #946: FILE: kernel/bpf/backtrack.c:857: + * It means the backtracking missed the spot where WARNING: line length of 87 exceeds 80 columns #947: FILE: kernel/bpf/backtrack.c:858: + * particular register was initialized with a constant. WARNING: line length of 94 exceeds 80 columns #976: FILE: kernel/bpf/backtrack.c:887: + if (verifier_bug_if(i >= func->allocated_stack / BPF_REG_SIZE, WARNING: line length of 89 exceeds 80 columns #977: FILE: kernel/bpf/backtrack.c:888: + env, "stack slot %d, total slots %d", WARNING: line length of 93 exceeds 80 columns #978: FILE: kernel/bpf/backtrack.c:889: + i, func->allocated_stack / BPF_REG_SIZE)) WARNING: line length of 82 exceeds 80 columns #981: FILE: kernel/bpf/backtrack.c:892: + if (!bpf_is_spilled_scalar_reg(&func->stack[i])) { WARNING: line length of 92 exceeds 80 columns #996: FILE: kernel/bpf/backtrack.c:907: + verbose(env, "mark_precise: frame%d: parent state regs=%s ", WARNING: line length of 85 exceeds 80 columns #998: FILE: kernel/bpf/backtrack.c:909: + bpf_fmt_stack_mask(env->tmp_str_buf, TMP_STR_BUF_LEN, CHECK: Alignment should match open parenthesis #999: FILE: kernel/bpf/backtrack.c:910: + 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 #1324: FILE: kernel/bpf/verifier.c:3608: +void bpf_bt_sync_linked_regs(struct backtrack_state *bt, struct bpf_jmp_history_entry *hist) total: 1 errors, 74 warnings, 8 checks, 1995 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 91d46f7feb3a ("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.