WARNING: line length of 88 exceeds 80 columns #66: FILE: include/linux/bpf_verifier.h:891: + /* 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) CHECK: Please use a blank line after function/struct/union/enum declarations #311: FILE: kernel/bpf/liveness.c:983: +} +/* WARNING: line length of 82 exceeds 80 columns #317: FILE: kernel/bpf/liveness.c:989: +static struct arg_track arg_join_imprecise(struct arg_track a, struct arg_track b) WARNING: line length of 84 exceeds 80 columns #376: FILE: kernel/bpf/liveness.c:1048: +static bool arg_track_join(struct bpf_verifier_env *env, int idx, int target, int r, WARNING: line length of 86 exceeds 80 columns #414: FILE: kernel/bpf/liveness.c:1086: + if (dst->frame >= 0 && (src->frame == ARG_NONE || src->frame == dst->frame)) { WARNING: line length of 83 exceeds 80 columns #540: FILE: kernel/bpf/liveness.c:1212: + clear_overlapping_stack_slots(at_stack_out, insn->off, sz); WARNING: line length of 87 exceeds 80 columns #584: FILE: kernel/bpf/liveness.c:1256: +static void arg_track_log(struct bpf_verifier_env *env, struct bpf_insn *insn, int idx, WARNING: line length of 81 exceeds 80 columns #585: FILE: kernel/bpf/liveness.c:1257: + struct arg_track *at_in, struct arg_track *at_stack_in, WARNING: line length of 83 exceeds 80 columns #586: FILE: kernel/bpf/liveness.c:1258: + struct arg_track *at_out, struct arg_track *at_stack_out) WARNING: line length of 97 exceeds 80 columns #614: FILE: kernel/bpf/liveness.c:1286: + verbose(env, "\tfp%+d: ", -(i + 1) * 8); verbose_arg_track(env, &at_stack_in[i]); WARNING: line length of 84 exceeds 80 columns #628: FILE: kernel/bpf/liveness.c:1300: + struct arg_track *at_out, struct arg_track *at_stack_out, WARNING: line length of 92 exceeds 80 columns #649: FILE: kernel/bpf/liveness.c:1321: + /* Any other 64-bit alu on the pointer makes it imprecise */ WARNING: line length of 85 exceeds 80 columns #671: FILE: kernel/bpf/liveness.c:1343: + * at_stack_out[slot] is not cleared by the helper and subprog calls. WARNING: line length of 104 exceeds 80 columns #672: FILE: kernel/bpf/liveness.c:1344: + * The fill_from_stack() may return the stale spill — which is an FP-derived arg_track WARNING: line length of 98 exceeds 80 columns #673: FILE: kernel/bpf/liveness.c:1345: + * (the value that was originally spilled there). The loaded register then carries WARNING: line length of 104 exceeds 80 columns #674: FILE: kernel/bpf/liveness.c:1346: + * a phantom FP-derived identity that doesn't correspond to what's actually in the slot. WARNING: line length of 98 exceeds 80 columns #675: FILE: kernel/bpf/liveness.c:1347: + * This phantom FP pointer propagates forward, and wherever it's subsequently used WARNING: line length of 92 exceeds 80 columns #676: FILE: kernel/bpf/liveness.c:1348: + * (as a helper argument, another store, etc.), it sets stack liveness bits. WARNING: line length of 86 exceeds 80 columns #677: FILE: kernel/bpf/liveness.c:1349: + * Those bits correspond to stack accesses that don't actually happen. WARNING: line length of 103 exceeds 80 columns #678: FILE: kernel/bpf/liveness.c:1350: + * So the effect is over-reporting stack liveness — marking slots as live that aren't WARNING: line length of 100 exceeds 80 columns #679: FILE: kernel/bpf/liveness.c:1351: + * actually accessed. The verifier preserves more state than necessary across calls, WARNING: line length of 98 exceeds 80 columns #682: FILE: kernel/bpf/liveness.c:1354: + * helpers can scratch stack slots, but they won't make a valid pointer out of it. WARNING: line length of 89 exceeds 80 columns #683: FILE: kernel/bpf/liveness.c:1355: + * subprogs are allowed to write into parent slots, but they cannot write WARNING: line length of 86 exceeds 80 columns #684: FILE: kernel/bpf/liveness.c:1356: + * _any_ FP-derived pointer into it (either their own or parent's FP). WARNING: line length of 92 exceeds 80 columns #690: FILE: kernel/bpf/liveness.c:1362: + bool src_is_local_fp = insn->src_reg == BPF_REG_FP || src->frame == depth || WARNING: line length of 97 exceeds 80 columns #691: FILE: kernel/bpf/liveness.c:1363: + (src->frame == ARG_IMPRECISE && (src->mask & BIT(depth))); WARNING: line length of 84 exceeds 80 columns #699: FILE: kernel/bpf/liveness.c:1371: + if (src_is_local_fp && BPF_MODE(insn->code) == BPF_MEM && sz == 8) { WARNING: line length of 97 exceeds 80 columns #700: FILE: kernel/bpf/liveness.c:1372: + *dst = fill_from_stack(insn, at_out, insn->src_reg, at_stack_out, depth); WARNING: line length of 85 exceeds 80 columns #726: FILE: kernel/bpf/liveness.c:1398: + dst_is_local_fp = insn->dst_reg == BPF_REG_FP || dst->frame == depth; WARNING: line length of 85 exceeds 80 columns #733: FILE: kernel/bpf/liveness.c:1405: + clear_stack_for_all_offs(insn, at_out, insn->dst_reg, WARNING: line length of 90 exceeds 80 columns #745: FILE: kernel/bpf/liveness.c:1417: + bool dst_is_local_fp = insn->dst_reg == BPF_REG_FP || dst->frame == depth; WARNING: line length of 86 exceeds 80 columns #777: FILE: kernel/bpf/liveness.c:1449: + /* helper/kfunc read unknown amount of bytes from fp_off until fp+0 */ WARNING: line length of 82 exceeds 80 columns #786: FILE: kernel/bpf/liveness.c:1458: + slot_lo = max_t(s32, (-fp_off - access_bytes) / STACK_SLOT_SZ, 0); WARNING: line length of 102 exceeds 80 columns #794: FILE: kernel/bpf/liveness.c:1466: + 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 #819: FILE: kernel/bpf/liveness.c:1491: + return mark_stack_read(instance, frame, insn_idx, SPIS_ALL); WARNING: line length of 105 exceeds 80 columns #827: FILE: kernel/bpf/liveness.c:1499: + err = record_stack_access_off(env, instance, arg->off[i], access_bytes, frame, insn_idx); WARNING: line length of 83 exceeds 80 columns #838: FILE: kernel/bpf/liveness.c:1510: +static int record_imprecise(struct func_instance *instance, u32 mask, u32 insn_idx) WARNING: line length of 89 exceeds 80 columns #907: FILE: kernel/bpf/liveness.c:1579: + return record_stack_access(env, instance, ptr, sz, ptr->frame, insn_idx); WARNING: line length of 90 exceeds 80 columns #939: FILE: kernel/bpf/liveness.c:1611: + bytes = bpf_helper_stack_access_bytes(env, insn, r - 1, insn_idx); WARNING: line length of 89 exceeds 80 columns #941: FILE: kernel/bpf/liveness.c:1613: + bytes = bpf_kfunc_stack_access_bytes(env, insn, r - 1, insn_idx); WARNING: line length of 87 exceeds 80 columns #944: FILE: kernel/bpf/liveness.c:1616: + err = mark_stack_read(instance, f, insn_idx, SPIS_ALL); WARNING: line length of 97 exceeds 80 columns #954: FILE: kernel/bpf/liveness.c:1626: + err = record_stack_access(env, instance, &at[r], bytes, frame, insn_idx); WARNING: line length of 90 exceeds 80 columns #1023: FILE: kernel/bpf/liveness.c:1695: + struct arg_track (*at_stack_in)[MAX_ARG_SPILL_SLOTS]) WARNING: line length of 106 exceeds 80 columns #1037: FILE: kernel/bpf/liveness.c:1709: + env->prog->aux->func_info[subprog].type_id)->name_off) WARNING: line length of 93 exceeds 80 columns #1136: FILE: kernel/bpf/liveness.c:1808: + at_stack_out = kvmalloc_objs(*at_stack_out, MAX_ARG_SPILL_SLOTS, GFP_KERNEL_ACCOUNT); WARNING: line length of 86 exceeds 80 columns #1164: FILE: kernel/bpf/liveness.c:1836: + verbose(env, "subprog#%d: analyzing (depth %d)...\n", subprog, depth); WARNING: line length of 83 exceeds 80 columns #1175: FILE: kernel/bpf/liveness.c:1847: + if (!arg_is_visited(&at_in[i][0]) && !arg_is_visited(&at_in[i][1])) WARNING: line length of 98 exceeds 80 columns #1179: FILE: kernel/bpf/liveness.c:1851: + memcpy(at_stack_out, at_stack_in[i], MAX_ARG_SPILL_SLOTS * sizeof(*at_stack_out)); WARNING: line length of 90 exceeds 80 columns #1181: FILE: kernel/bpf/liveness.c:1853: + arg_track_xfer(env, insn, idx, at_out, at_stack_out, instance, callsites); WARNING: line length of 94 exceeds 80 columns #1182: FILE: kernel/bpf/liveness.c:1854: + 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 #1197: FILE: kernel/bpf/liveness.c:1869: + &at_in[ti][r], at_out[r]); WARNING: line length of 83 exceeds 80 columns #1200: FILE: kernel/bpf/liveness.c:1872: + changed |= arg_track_join(env, idx, target, -r - 1, WARNING: line length of 96 exceeds 80 columns #1201: FILE: kernel/bpf/liveness.c:1873: + &at_stack_in[ti][r], at_stack_out[r]); WARNING: line length of 87 exceeds 80 columns #1228: FILE: kernel/bpf/liveness.c:1900: + MAX_ARG_SPILL_SLOTS, GFP_KERNEL_ACCOUNT); WARNING: line length of 95 exceeds 80 columns #1232: FILE: kernel/bpf/liveness.c:1904: + at_stack_in[i], sizeof(struct arg_track) * MAX_ARG_SPILL_SLOTS); WARNING: line length of 89 exceeds 80 columns #1279: FILE: kernel/bpf/liveness.c:1951: + err = compute_subprog_args(env, &info[subprog], entry_args, instance, callsites); WARNING: line length of 100 exceeds 80 columns #1305: FILE: kernel/bpf/liveness.c:1977: + callee = find_callback_subprog(env, insn, idx, &caller_reg, &cb_callee_reg); WARNING: line length of 91 exceeds 80 columns #1308: FILE: kernel/bpf/liveness.c:1980: + * same bpf_loop() calls two different callbacks and passes WARNING: line length of 89 exceeds 80 columns #1311: FILE: kernel/bpf/liveness.c:1983: + if (info[subprog].at_in[j][caller_reg].frame == ARG_NONE) WARNING: line length of 90 exceeds 80 columns #1314: FILE: kernel/bpf/liveness.c:1986: + err = mark_stack_read(instance, f, idx, SPIS_ALL); WARNING: line length of 88 exceeds 80 columns #1325: FILE: kernel/bpf/liveness.c:1997: + callee_args[cb_callee_reg] = info[subprog].at_in[j][caller_reg]; WARNING: line length of 90 exceeds 80 columns #1337: FILE: kernel/bpf/liveness.c:2009: + err = analyze_subprog(env, callee_args, info, callee_instance, callsites); WARNING: line length of 81 exceeds 80 columns #1357: FILE: kernel/bpf/liveness.c:2029: + env->callsite_at_stack = kvzalloc_objs(*env->callsite_at_stack, insn_cnt, total: 3 errors, 66 warnings, 1 checks, 1379 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 72e97689ea44 ("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.