WARNING: line length of 88 exceeds 80 columns #66: FILE: include/linux/bpf_verifier.h:890: + /* Per-callsite copy of parent's converged at_stack_in for cross-frame fills. */ WARNING: line length of 83 exceeds 80 columns #170: FILE: kernel/bpf/liveness.c:842: + s16 off[MAX_ARG_OFFSETS]; /* byte offsets; off_cnt says how many */ WARNING: line length of 86 exceeds 80 columns #202: FILE: kernel/bpf/liveness.c:874: +static void clear_overlapping_stack_slots(struct arg_track *at_stack, s16 off, u32 sz) WARNING: line length of 81 exceeds 80 columns #220: FILE: kernel/bpf/liveness.c:892: +static void verbose_arg_track(struct bpf_verifier_env *env, struct arg_track *at) ERROR: trailing statements should be on next line #225: FILE: kernel/bpf/liveness.c:897: + case ARG_NONE: verbose(env, "_"); break; ERROR: trailing statements should be on next line #226: FILE: kernel/bpf/liveness.c:898: + case ARG_UNVISITED: verbose(env, "?"); break; ERROR: trailing statements should be on next line #227: FILE: kernel/bpf/liveness.c:899: + case ARG_IMPRECISE: verbose(env, "IMP%x", at->mask); break; WARNING: line length of 81 exceeds 80 columns #276: FILE: kernel/bpf/liveness.c:948: +static struct arg_track arg_merge_offsets(struct arg_track a, struct arg_track b) WARNING: line length of 82 exceeds 80 columns #318: FILE: kernel/bpf/liveness.c:990: +static struct arg_track arg_join_imprecise(struct arg_track a, struct arg_track b) WARNING: line length of 84 exceeds 80 columns #377: FILE: kernel/bpf/liveness.c:1049: +static bool arg_track_join(struct bpf_verifier_env *env, int idx, int target, int r, WARNING: line length of 86 exceeds 80 columns #415: FILE: kernel/bpf/liveness.c:1087: + if (dst->frame >= 0 && (src->frame == ARG_NONE || src->frame == dst->frame)) { WARNING: line length of 83 exceeds 80 columns #541: FILE: kernel/bpf/liveness.c:1213: + clear_overlapping_stack_slots(at_stack_out, insn->off, sz); WARNING: line length of 87 exceeds 80 columns #585: FILE: kernel/bpf/liveness.c:1257: +static void arg_track_log(struct bpf_verifier_env *env, struct bpf_insn *insn, int idx, WARNING: line length of 81 exceeds 80 columns #586: FILE: kernel/bpf/liveness.c:1258: + struct arg_track *at_in, struct arg_track *at_stack_in, WARNING: line length of 83 exceeds 80 columns #587: FILE: kernel/bpf/liveness.c:1259: + struct arg_track *at_out, struct arg_track *at_stack_out) WARNING: line length of 97 exceeds 80 columns #615: FILE: kernel/bpf/liveness.c:1287: + verbose(env, "\tfp%+d: ", -(i + 1) * 8); verbose_arg_track(env, &at_stack_in[i]); WARNING: line length of 84 exceeds 80 columns #629: FILE: kernel/bpf/liveness.c:1301: + struct arg_track *at_out, struct arg_track *at_stack_out, WARNING: line length of 92 exceeds 80 columns #650: FILE: kernel/bpf/liveness.c:1322: + /* Any other 64-bit alu on the pointer makes it imprecise */ WARNING: line length of 85 exceeds 80 columns #672: FILE: kernel/bpf/liveness.c:1344: + * at_stack_out[slot] is not cleared by the helper and subprog calls. WARNING: line length of 104 exceeds 80 columns #673: FILE: kernel/bpf/liveness.c:1345: + * The fill_from_stack() may return the stale spill — which is an FP-derived arg_track WARNING: line length of 98 exceeds 80 columns #674: FILE: kernel/bpf/liveness.c:1346: + * (the value that was originally spilled there). The loaded register then carries WARNING: line length of 104 exceeds 80 columns #675: FILE: kernel/bpf/liveness.c:1347: + * a phantom FP-derived identity that doesn't correspond to what's actually in the slot. WARNING: line length of 98 exceeds 80 columns #676: FILE: kernel/bpf/liveness.c:1348: + * This phantom FP pointer propagates forward, and wherever it's subsequently used WARNING: line length of 92 exceeds 80 columns #677: FILE: kernel/bpf/liveness.c:1349: + * (as a helper argument, another store, etc.), it sets stack liveness bits. WARNING: line length of 86 exceeds 80 columns #678: FILE: kernel/bpf/liveness.c:1350: + * Those bits correspond to stack accesses that don't actually happen. WARNING: line length of 103 exceeds 80 columns #679: FILE: kernel/bpf/liveness.c:1351: + * So the effect is over-reporting stack liveness — marking slots as live that aren't WARNING: line length of 100 exceeds 80 columns #680: FILE: kernel/bpf/liveness.c:1352: + * actually accessed. The verifier preserves more state than necessary across calls, WARNING: line length of 98 exceeds 80 columns #683: FILE: kernel/bpf/liveness.c:1355: + * helpers can scratch stack slots, but they won't make a valid pointer out of it. WARNING: line length of 89 exceeds 80 columns #684: FILE: kernel/bpf/liveness.c:1356: + * subprogs are allowed to write into parent slots, but they cannot write WARNING: line length of 86 exceeds 80 columns #685: FILE: kernel/bpf/liveness.c:1357: + * _any_ FP-derived pointer into it (either their own or parent's FP). WARNING: line length of 92 exceeds 80 columns #691: FILE: kernel/bpf/liveness.c:1363: + bool src_is_local_fp = insn->src_reg == BPF_REG_FP || src->frame == depth || WARNING: line length of 97 exceeds 80 columns #692: FILE: kernel/bpf/liveness.c:1364: + (src->frame == ARG_IMPRECISE && (src->mask & BIT(depth))); WARNING: line length of 84 exceeds 80 columns #700: FILE: kernel/bpf/liveness.c:1372: + if (src_is_local_fp && BPF_MODE(insn->code) == BPF_MEM && sz == 8) { WARNING: line length of 97 exceeds 80 columns #701: FILE: kernel/bpf/liveness.c:1373: + *dst = fill_from_stack(insn, at_out, insn->src_reg, at_stack_out, depth); WARNING: line length of 85 exceeds 80 columns #727: FILE: kernel/bpf/liveness.c:1399: + dst_is_local_fp = insn->dst_reg == BPF_REG_FP || dst->frame == depth; WARNING: line length of 85 exceeds 80 columns #734: FILE: kernel/bpf/liveness.c:1406: + clear_stack_for_all_offs(insn, at_out, insn->dst_reg, WARNING: line length of 90 exceeds 80 columns #746: FILE: kernel/bpf/liveness.c:1418: + bool dst_is_local_fp = insn->dst_reg == BPF_REG_FP || dst->frame == depth; WARNING: line length of 86 exceeds 80 columns #778: FILE: kernel/bpf/liveness.c:1450: + /* helper/kfunc read unknown amount of bytes from fp_off until fp+0 */ WARNING: line length of 82 exceeds 80 columns #787: FILE: kernel/bpf/liveness.c:1459: + slot_lo = max_t(s32, (-fp_off - access_bytes) / STACK_SLOT_SZ, 0); WARNING: line length of 102 exceeds 80 columns #795: FILE: kernel/bpf/liveness.c:1467: + slot_lo = max_t(s32, (-fp_off - access_bytes + STACK_SLOT_SZ - 1) / STACK_SLOT_SZ, 0); WARNING: line length of 84 exceeds 80 columns #820: FILE: kernel/bpf/liveness.c:1492: + return mark_stack_read(instance, frame, insn_idx, SPIS_ALL); WARNING: line length of 105 exceeds 80 columns #828: FILE: kernel/bpf/liveness.c:1500: + err = record_stack_access_off(env, instance, arg->off[i], access_bytes, frame, insn_idx); WARNING: line length of 83 exceeds 80 columns #839: FILE: kernel/bpf/liveness.c:1511: +static int record_imprecise(struct func_instance *instance, u32 mask, u32 insn_idx) WARNING: line length of 89 exceeds 80 columns #908: FILE: kernel/bpf/liveness.c:1580: + return record_stack_access(env, instance, ptr, sz, ptr->frame, insn_idx); WARNING: line length of 90 exceeds 80 columns #940: FILE: kernel/bpf/liveness.c:1612: + bytes = bpf_helper_stack_access_bytes(env, insn, r - 1, insn_idx); WARNING: line length of 89 exceeds 80 columns #942: FILE: kernel/bpf/liveness.c:1614: + bytes = bpf_kfunc_stack_access_bytes(env, insn, r - 1, insn_idx); WARNING: line length of 87 exceeds 80 columns #945: FILE: kernel/bpf/liveness.c:1617: + err = mark_stack_read(instance, f, insn_idx, SPIS_ALL); WARNING: line length of 97 exceeds 80 columns #955: FILE: kernel/bpf/liveness.c:1627: + err = record_stack_access(env, instance, &at[r], bytes, frame, insn_idx); WARNING: line length of 90 exceeds 80 columns #1024: FILE: kernel/bpf/liveness.c:1696: + struct arg_track (*at_stack_in)[MAX_ARG_SPILL_SLOTS]) WARNING: line length of 106 exceeds 80 columns #1038: FILE: kernel/bpf/liveness.c:1710: + env->prog->aux->func_info[subprog].type_id)->name_off) WARNING: line length of 93 exceeds 80 columns #1137: FILE: kernel/bpf/liveness.c:1809: + at_stack_out = kvmalloc_objs(*at_stack_out, MAX_ARG_SPILL_SLOTS, GFP_KERNEL_ACCOUNT); WARNING: line length of 86 exceeds 80 columns #1165: FILE: kernel/bpf/liveness.c:1837: + verbose(env, "subprog#%d: analyzing (depth %d)...\n", subprog, depth); WARNING: line length of 83 exceeds 80 columns #1176: FILE: kernel/bpf/liveness.c:1848: + if (!arg_is_visited(&at_in[i][0]) && !arg_is_visited(&at_in[i][1])) WARNING: line length of 98 exceeds 80 columns #1180: FILE: kernel/bpf/liveness.c:1852: + memcpy(at_stack_out, at_stack_in[i], MAX_ARG_SPILL_SLOTS * sizeof(*at_stack_out)); WARNING: line length of 90 exceeds 80 columns #1182: FILE: kernel/bpf/liveness.c:1854: + arg_track_xfer(env, insn, idx, at_out, at_stack_out, instance, callsites); WARNING: line length of 94 exceeds 80 columns #1183: FILE: kernel/bpf/liveness.c:1855: + arg_track_log(env, insn, idx, at_in[i], at_stack_in[i], at_out, at_stack_out); WARNING: line length of 84 exceeds 80 columns #1198: FILE: kernel/bpf/liveness.c:1870: + &at_in[ti][r], at_out[r]); WARNING: line length of 83 exceeds 80 columns #1201: FILE: kernel/bpf/liveness.c:1873: + changed |= arg_track_join(env, idx, target, -r - 1, WARNING: line length of 96 exceeds 80 columns #1202: FILE: kernel/bpf/liveness.c:1874: + &at_stack_in[ti][r], at_stack_out[r]); WARNING: line length of 87 exceeds 80 columns #1229: FILE: kernel/bpf/liveness.c:1901: + MAX_ARG_SPILL_SLOTS, GFP_KERNEL_ACCOUNT); WARNING: line length of 95 exceeds 80 columns #1235: FILE: kernel/bpf/liveness.c:1907: + at_stack_in[i], sizeof(struct arg_track) * MAX_ARG_SPILL_SLOTS); WARNING: line length of 89 exceeds 80 columns #1282: FILE: kernel/bpf/liveness.c:1954: + err = compute_subprog_args(env, &info[subprog], entry_args, instance, callsites); WARNING: line length of 100 exceeds 80 columns #1308: FILE: kernel/bpf/liveness.c:1980: + callee = find_callback_subprog(env, insn, idx, &caller_reg, &cb_callee_reg); WARNING: line length of 91 exceeds 80 columns #1311: FILE: kernel/bpf/liveness.c:1983: + * same bpf_loop() calls two different callbacks and passes WARNING: line length of 89 exceeds 80 columns #1314: FILE: kernel/bpf/liveness.c:1986: + if (info[subprog].at_in[j][caller_reg].frame == ARG_NONE) WARNING: line length of 90 exceeds 80 columns #1317: FILE: kernel/bpf/liveness.c:1989: + err = mark_stack_read(instance, f, idx, SPIS_ALL); WARNING: line length of 88 exceeds 80 columns #1328: FILE: kernel/bpf/liveness.c:2000: + callee_args[cb_callee_reg] = info[subprog].at_in[j][caller_reg]; WARNING: line length of 90 exceeds 80 columns #1340: FILE: kernel/bpf/liveness.c:2012: + err = analyze_subprog(env, callee_args, info, callee_instance, callsites); WARNING: line length of 81 exceeds 80 columns #1360: FILE: kernel/bpf/liveness.c:2032: + env->callsite_at_stack = kvzalloc_objs(*env->callsite_at_stack, insn_cnt, total: 3 errors, 66 warnings, 0 checks, 1382 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 c57bd856b281 ("bpf: introduce forward arg-tracking dataflow analysis") 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.