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 91 exceeds 80 columns #109: FILE: kernel/bpf/liveness.c:140: + u32 subprog_calls; /* analyze_subprog() invocations */ WARNING: line length of 83 exceeds 80 columns #178: FILE: kernel/bpf/liveness.c:843: + s16 off[MAX_ARG_OFFSETS]; /* byte offsets; off_cnt says how many */ WARNING: line length of 86 exceeds 80 columns #210: FILE: kernel/bpf/liveness.c:875: +static void clear_overlapping_stack_slots(struct arg_track *at_stack, s16 off, u32 sz) WARNING: line length of 81 exceeds 80 columns #228: FILE: kernel/bpf/liveness.c:893: +static void verbose_arg_track(struct bpf_verifier_env *env, struct arg_track *at) ERROR: trailing statements should be on next line #233: FILE: kernel/bpf/liveness.c:898: + case ARG_NONE: verbose(env, "_"); break; ERROR: trailing statements should be on next line #234: FILE: kernel/bpf/liveness.c:899: + case ARG_UNVISITED: verbose(env, "?"); break; ERROR: trailing statements should be on next line #235: FILE: kernel/bpf/liveness.c:900: + case ARG_IMPRECISE: verbose(env, "IMP%x", at->mask); break; WARNING: line length of 81 exceeds 80 columns #284: FILE: kernel/bpf/liveness.c:949: +static struct arg_track arg_merge_offsets(struct arg_track a, struct arg_track b) WARNING: line length of 82 exceeds 80 columns #326: FILE: kernel/bpf/liveness.c:991: +static struct arg_track arg_join_imprecise(struct arg_track a, struct arg_track b) WARNING: line length of 84 exceeds 80 columns #385: FILE: kernel/bpf/liveness.c:1050: +static bool arg_track_join(struct bpf_verifier_env *env, int idx, int target, int r, WARNING: line length of 86 exceeds 80 columns #423: FILE: kernel/bpf/liveness.c:1088: + if (dst->frame >= 0 && (src->frame == ARG_NONE || src->frame == dst->frame)) { WARNING: line length of 91 exceeds 80 columns #528: FILE: kernel/bpf/liveness.c:1193: + * When exact offset is unknown conservatively add reg values to all slots in at_stack_out. WARNING: line length of 91 exceeds 80 columns #548: FILE: kernel/bpf/liveness.c:1213: + at_stack_out[slot] = __arg_track_join(at_stack_out[slot], new_val); WARNING: line length of 91 exceeds 80 columns #560: FILE: kernel/bpf/liveness.c:1225: + at_stack_out[slot] = __arg_track_join(at_stack_out[slot], new_val); WARNING: line length of 87 exceeds 80 columns #589: FILE: kernel/bpf/liveness.c:1254: +static void arg_track_log(struct bpf_verifier_env *env, struct bpf_insn *insn, int idx, WARNING: line length of 81 exceeds 80 columns #590: FILE: kernel/bpf/liveness.c:1255: + struct arg_track *at_in, struct arg_track *at_stack_in, WARNING: line length of 83 exceeds 80 columns #591: FILE: kernel/bpf/liveness.c:1256: + struct arg_track *at_out, struct arg_track *at_stack_out) WARNING: line length of 97 exceeds 80 columns #619: FILE: kernel/bpf/liveness.c:1284: + verbose(env, "\tfp%+d: ", -(i + 1) * 8); verbose_arg_track(env, &at_stack_in[i]); WARNING: line length of 84 exceeds 80 columns #633: FILE: kernel/bpf/liveness.c:1298: + struct arg_track *at_out, struct arg_track *at_stack_out, WARNING: line length of 92 exceeds 80 columns #654: FILE: kernel/bpf/liveness.c:1319: + /* Any other 64-bit alu on the pointer makes it imprecise */ WARNING: line length of 85 exceeds 80 columns #676: FILE: kernel/bpf/liveness.c:1341: + * at_stack_out[slot] is not cleared by the helper and subprog calls. WARNING: line length of 104 exceeds 80 columns #677: FILE: kernel/bpf/liveness.c:1342: + * The fill_from_stack() may return the stale spill — which is an FP-derived arg_track WARNING: line length of 98 exceeds 80 columns #678: FILE: kernel/bpf/liveness.c:1343: + * (the value that was originally spilled there). The loaded register then carries WARNING: line length of 104 exceeds 80 columns #679: FILE: kernel/bpf/liveness.c:1344: + * a phantom FP-derived identity that doesn't correspond to what's actually in the slot. WARNING: line length of 98 exceeds 80 columns #680: FILE: kernel/bpf/liveness.c:1345: + * This phantom FP pointer propagates forward, and wherever it's subsequently used WARNING: line length of 92 exceeds 80 columns #681: FILE: kernel/bpf/liveness.c:1346: + * (as a helper argument, another store, etc.), it sets stack liveness bits. WARNING: line length of 86 exceeds 80 columns #682: FILE: kernel/bpf/liveness.c:1347: + * Those bits correspond to stack accesses that don't actually happen. WARNING: line length of 103 exceeds 80 columns #683: FILE: kernel/bpf/liveness.c:1348: + * So the effect is over-reporting stack liveness — marking slots as live that aren't WARNING: line length of 100 exceeds 80 columns #684: FILE: kernel/bpf/liveness.c:1349: + * actually accessed. The verifier preserves more state than necessary across calls, WARNING: line length of 98 exceeds 80 columns #687: FILE: kernel/bpf/liveness.c:1352: + * helpers can scratch stack slots, but they won't make a valid pointer out of it. WARNING: line length of 89 exceeds 80 columns #688: FILE: kernel/bpf/liveness.c:1353: + * subprogs are allowed to write into parent slots, but they cannot write WARNING: line length of 86 exceeds 80 columns #689: FILE: kernel/bpf/liveness.c:1354: + * _any_ FP-derived pointer into it (either their own or parent's FP). WARNING: line length of 92 exceeds 80 columns #695: FILE: kernel/bpf/liveness.c:1360: + bool src_is_local_fp = insn->src_reg == BPF_REG_FP || src->frame == depth || WARNING: line length of 97 exceeds 80 columns #696: FILE: kernel/bpf/liveness.c:1361: + (src->frame == ARG_IMPRECISE && (src->mask & BIT(depth))); WARNING: line length of 84 exceeds 80 columns #704: FILE: kernel/bpf/liveness.c:1369: + if (src_is_local_fp && BPF_MODE(insn->code) == BPF_MEM && sz == 8) { WARNING: line length of 97 exceeds 80 columns #705: FILE: kernel/bpf/liveness.c:1370: + *dst = fill_from_stack(insn, at_out, insn->src_reg, at_stack_out, depth); WARNING: line length of 85 exceeds 80 columns #731: FILE: kernel/bpf/liveness.c:1396: + dst_is_local_fp = insn->dst_reg == BPF_REG_FP || dst->frame == depth; WARNING: line length of 85 exceeds 80 columns #738: FILE: kernel/bpf/liveness.c:1403: + clear_stack_for_all_offs(insn, at_out, insn->dst_reg, WARNING: line length of 90 exceeds 80 columns #750: FILE: kernel/bpf/liveness.c:1415: + bool dst_is_local_fp = insn->dst_reg == BPF_REG_FP || dst->frame == depth; WARNING: line length of 90 exceeds 80 columns #819: FILE: kernel/bpf/liveness.c:1484: + struct arg_track (*at_stack_in)[MAX_ARG_SPILL_SLOTS]) WARNING: line length of 106 exceeds 80 columns #833: FILE: kernel/bpf/liveness.c:1498: + env->prog->aux->func_info[subprog].type_id)->name_off) WARNING: line length of 93 exceeds 80 columns #932: FILE: kernel/bpf/liveness.c:1597: + at_stack_out = kvmalloc_objs(*at_stack_out, MAX_ARG_SPILL_SLOTS, GFP_KERNEL_ACCOUNT); WARNING: line length of 86 exceeds 80 columns #960: FILE: kernel/bpf/liveness.c:1625: + verbose(env, "subprog#%d: analyzing (depth %d)...\n", subprog, depth); WARNING: line length of 83 exceeds 80 columns #971: FILE: kernel/bpf/liveness.c:1636: + if (!arg_is_visited(&at_in[i][0]) && !arg_is_visited(&at_in[i][1])) WARNING: line length of 98 exceeds 80 columns #975: FILE: kernel/bpf/liveness.c:1640: + memcpy(at_stack_out, at_stack_in[i], MAX_ARG_SPILL_SLOTS * sizeof(*at_stack_out)); WARNING: line length of 90 exceeds 80 columns #977: FILE: kernel/bpf/liveness.c:1642: + arg_track_xfer(env, insn, idx, at_out, at_stack_out, instance, callsites); WARNING: line length of 94 exceeds 80 columns #978: FILE: kernel/bpf/liveness.c:1643: + 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 #993: FILE: kernel/bpf/liveness.c:1658: + &at_in[ti][r], at_out[r]); WARNING: line length of 83 exceeds 80 columns #996: FILE: kernel/bpf/liveness.c:1661: + changed |= arg_track_join(env, idx, target, -r - 1, WARNING: line length of 96 exceeds 80 columns #997: FILE: kernel/bpf/liveness.c:1662: + &at_stack_in[ti][r], at_stack_out[r]); WARNING: line length of 88 exceeds 80 columns #1040: FILE: kernel/bpf/liveness.c:1705: + verbose(env, "liveness analysis exceeded complexity limit (%d calls)\n", WARNING: line length of 89 exceeds 80 columns #1052: FILE: kernel/bpf/liveness.c:1717: + err = compute_subprog_args(env, &info[subprog], entry_args, instance, callsites); WARNING: line length of 100 exceeds 80 columns #1078: FILE: kernel/bpf/liveness.c:1743: + callee = find_callback_subprog(env, insn, idx, &caller_reg, &cb_callee_reg); WARNING: line length of 91 exceeds 80 columns #1081: FILE: kernel/bpf/liveness.c:1746: + * same bpf_loop() calls two different callbacks and passes WARNING: line length of 89 exceeds 80 columns #1084: FILE: kernel/bpf/liveness.c:1749: + if (info[subprog].at_in[j][caller_reg].frame == ARG_NONE) WARNING: line length of 90 exceeds 80 columns #1087: FILE: kernel/bpf/liveness.c:1752: + err = mark_stack_read(instance, f, idx, SPIS_ALL); WARNING: line length of 88 exceeds 80 columns #1098: FILE: kernel/bpf/liveness.c:1763: + callee_args[cb_callee_reg] = info[subprog].at_in[j][caller_reg]; WARNING: line length of 90 exceeds 80 columns #1110: FILE: kernel/bpf/liveness.c:1775: + err = analyze_subprog(env, callee_args, info, callee_instance, callsites); WARNING: line length of 81 exceeds 80 columns #1130: FILE: kernel/bpf/liveness.c:1795: + env->callsite_at_stack = kvzalloc_objs(*env->callsite_at_stack, insn_cnt, total: 3 errors, 57 warnings, 0 checks, 1128 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 b622a956283e ("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.