WARNING: line length of 91 exceeds 80 columns #85: FILE: include/linux/bpf_verifier.h:1083: +int bpf_mark_stack_read(struct bpf_verifier_env *env, u32 frameno, u32 insn_idx, u64 mask); WARNING: line length of 91 exceeds 80 columns #89: FILE: include/linux/bpf_verifier.h:1087: +int bpf_live_stack_query_init(struct bpf_verifier_env *env, struct bpf_verifier_state *st); WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #108: new file mode 100644 WARNING: line length of 85 exceeds 80 columns #143: FILE: kernel/bpf/liveness.c:31: + * (any slot in "must_write" set is guaranteed to be written by the instruction). WARNING: line length of 89 exceeds 80 columns #149: FILE: kernel/bpf/liveness.c:37: + * state[cc, i].live_after = U [state[cc, s].live_before for s in insn_successors(i)] WARNING: line length of 81 exceeds 80 columns #176: FILE: kernel/bpf/liveness.c:64: + * - "must_write_acc" set is intersected with the call site's "must_write" set; WARNING: line length of 89 exceeds 80 columns #200: FILE: kernel/bpf/liveness.c:88: + * - sp_starts[curframe] used to get insn relative index within current function; WARNING: line length of 85 exceeds 80 columns #204: FILE: kernel/bpf/liveness.c:92: + u32 curframe; /* depth of callsites and sp_starts arrays */ WARNING: line length of 86 exceeds 80 columns #208: FILE: kernel/bpf/liveness.c:96: + u64 may_read; /* stack slots that may be read by this instruction */ WARNING: line length of 96 exceeds 80 columns #210: FILE: kernel/bpf/liveness.c:98: + u64 must_write_acc; /* stack slots written by this instruction and its successors */ WARNING: line length of 98 exceeds 80 columns #211: FILE: kernel/bpf/liveness.c:99: + u64 live_before; /* stack slots that may be read by this insn and its successors */ WARNING: line length of 94 exceeds 80 columns #227: FILE: kernel/bpf/liveness.c:115: + /* For each instruction a flag telling if "must_write" had been initialized for it. */ WARNING: line length of 92 exceeds 80 columns #232: FILE: kernel/bpf/liveness.c:120: + struct func_instance *instances[MAX_CALL_FRAMES]; /* valid in range [0..curframe] */ WARNING: line length of 93 exceeds 80 columns #238: FILE: kernel/bpf/liveness.c:126: + DECLARE_HASHTABLE(func_instances, 8); /* maps callchain to func_instance */ WARNING: line length of 98 exceeds 80 columns #239: FILE: kernel/bpf/liveness.c:127: + struct live_stack_query live_stack_query; /* cache to avoid repetitive ht lookups */ WARNING: line length of 95 exceeds 80 columns #240: FILE: kernel/bpf/liveness.c:128: + /* Cached instance corresponding to env->cur_state, avoids per-instruction ht lookup */ WARNING: line length of 83 exceeds 80 columns #243: FILE: kernel/bpf/liveness.c:131: + * Below fields are used to accumulate stack write marks for instruction at WARNING: line length of 90 exceeds 80 columns #251: FILE: kernel/bpf/liveness.c:139: +static void compute_callchain(struct bpf_verifier_env *env, struct bpf_verifier_state *st, WARNING: line length of 86 exceeds 80 columns #259: FILE: kernel/bpf/liveness.c:147: + callchain->sp_starts[i] = subprog_info[st->frame[i]->subprogno].start; WARNING: line length of 94 exceeds 80 columns #264: FILE: kernel/bpf/liveness.c:152: + callchain->callsites[callchain->curframe] = callchain->sp_starts[callchain->curframe]; WARNING: line length of 94 exceeds 80 columns #302: FILE: kernel/bpf/liveness.c:190: + subprog = bpf_find_containing_subprog(env, callchain->sp_starts[callchain->curframe]); WARNING: line length of 86 exceeds 80 columns #308: FILE: kernel/bpf/liveness.c:196: + result->must_write_set = kvcalloc(subprog_sz, sizeof(*result->must_write_set), WARNING: line length of 88 exceeds 80 columns #345: FILE: kernel/bpf/liveness.c:233: + hash_for_each_safe(env->liveness->func_instances, bkt, tmp, instance, hl_node) { WARNING: line length of 86 exceeds 80 columns #360: FILE: kernel/bpf/liveness.c:248: + return insn_idx - instance->callchain.sp_starts[instance->callchain.curframe]; WARNING: line length of 85 exceeds 80 columns #379: FILE: kernel/bpf/liveness.c:267: + arr = kvcalloc(instance->insn_cnt, sizeof(*arr), GFP_KERNEL_ACCOUNT); WARNING: line length of 99 exceeds 80 columns #392: FILE: kernel/bpf/liveness.c:280: +/* If @env->liveness->cur_instance is null, set it to instance corresponding to @env->cur_state. */ WARNING: line length of 82 exceeds 80 columns #401: FILE: kernel/bpf/liveness.c:289: + instance = lookup_instance(env, env->cur_state, env->cur_state->curframe); WARNING: line length of 93 exceeds 80 columns #411: FILE: kernel/bpf/liveness.c:299: + struct func_instance *instance, u32 frame, u32 insn_idx, u64 mask) WARNING: line length of 88 exceeds 80 columns #427: FILE: kernel/bpf/liveness.c:315: +int bpf_mark_stack_read(struct bpf_verifier_env *env, u32 frame, u32 insn_idx, u64 mask) WARNING: line length of 94 exceeds 80 columns #432: FILE: kernel/bpf/liveness.c:320: + err = err ?: mark_stack_read(env, env->liveness->cur_instance, frame, insn_idx, mask); WARNING: line length of 81 exceeds 80 columns #437: FILE: kernel/bpf/liveness.c:325: + struct func_instance *instance, u32 insn_idx) WARNING: line length of 90 exceeds 80 columns #487: FILE: kernel/bpf/liveness.c:375: + masks = alloc_frame_masks(env, instance, frame, liveness->write_insn_idx); WARNING: line length of 98 exceeds 80 columns #492: FILE: kernel/bpf/liveness.c:380: + * If instruction at this callchain is seen for a first time, set must_write equal WARNING: line length of 81 exceeds 80 columns #493: FILE: kernel/bpf/liveness.c:381: + * to @mask. Otherwise take intersection with the previous value. WARNING: line length of 85 exceeds 80 columns #509: FILE: kernel/bpf/liveness.c:397: +static char *fmt_callchain(struct bpf_verifier_env *env, struct callchain *callchain) WARNING: line length of 99 exceeds 80 columns #517: FILE: kernel/bpf/liveness.c:405: + buf += snprintf(buf, buf_end - buf, "%s%d", i ? "," : "", callchain->callsites[i]); WARNING: line length of 86 exceeds 80 columns #522: FILE: kernel/bpf/liveness.c:410: +static void log_mask_change(struct bpf_verifier_env *env, struct callchain *callchain, WARNING: line length of 81 exceeds 80 columns #523: FILE: kernel/bpf/liveness.c:411: + char *pfx, u32 frame, u32 insn_idx, u64 old, u64 new) WARNING: line length of 99 exceeds 80 columns #531: FILE: kernel/bpf/liveness.c:419: + bpf_log(&env->log, "%s frame %d insn %d ", fmt_callchain(env, callchain), frame, insn_idx); WARNING: line length of 89 exceeds 80 columns #533: FILE: kernel/bpf/liveness.c:421: + bpf_fmt_stack_mask(env->tmp_str_buf, sizeof(env->tmp_str_buf), new_ones); WARNING: line length of 90 exceeds 80 columns #537: FILE: kernel/bpf/liveness.c:425: + bpf_fmt_stack_mask(env->tmp_str_buf, sizeof(env->tmp_str_buf), new_zeros); WARNING: line length of 90 exceeds 80 columns #552: FILE: kernel/bpf/liveness.c:440: + callchain.callsites[callchain.curframe] = callchain.sp_starts[callchain.curframe]; WARNING: line length of 88 exceeds 80 columns #562: FILE: kernel/bpf/liveness.c:450: + * Transfer @may_read and @must_write_acc marks from the first instruction of @instance, WARNING: line length of 95 exceeds 80 columns #584: FILE: kernel/bpf/liveness.c:472: + err = mark_stack_read(env, outer_instance, frame, callsite, insn->live_before); WARNING: line length of 87 exceeds 80 columns #593: FILE: kernel/bpf/liveness.c:481: + struct func_instance *instance, u32 frame, u32 insn_idx) WARNING: line length of 87 exceeds 80 columns #634: FILE: kernel/bpf/liveness.c:522: + frame, insn_idx, insn->must_write_acc, must_write_acc); WARNING: line length of 88 exceeds 80 columns #642: FILE: kernel/bpf/liveness.c:530: +static int update_instance(struct bpf_verifier_env *env, struct func_instance *instance) WARNING: line length of 96 exceeds 80 columns #663: FILE: kernel/bpf/liveness.c:551: + insn = get_frame_masks(instance, frame, this_subprog_start + i); WARNING: line length of 81 exceeds 80 columns #677: FILE: kernel/bpf/liveness.c:565: + for (frame = 0; frame <= instance->callchain.curframe; frame++) { WARNING: line length of 96 exceeds 80 columns #682: FILE: kernel/bpf/liveness.c:570: + changed |= update_insn(env, instance, frame, insn_postorder[i]); WARNING: line length of 82 exceeds 80 columns #687: FILE: kernel/bpf/liveness.c:575: + bpf_log(&env->log, "%s live stack update done in %d iterations\n", WARNING: line length of 89 exceeds 80 columns #690: FILE: kernel/bpf/liveness.c:578: + /* transfer marks accumulated for outer frames to outer func instance (caller) */ WARNING: line length of 94 exceeds 80 columns #730: FILE: kernel/bpf/liveness.c:618: +static bool is_live_before(struct func_instance *instance, u32 insn_idx, u32 frameno, u32 spi) WARNING: line length of 90 exceeds 80 columns #738: FILE: kernel/bpf/liveness.c:626: +int bpf_live_stack_query_init(struct bpf_verifier_env *env, struct bpf_verifier_state *st) WARNING: line length of 87 exceeds 80 columns #759: FILE: kernel/bpf/liveness.c:647: + * Slot is alive if it is read before q->st->insn_idx in current func instance, total: 0 errors, 55 warnings, 0 checks, 710 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 ccec41331ccd ("bpf: callchain sensitive stack liveness tracking using CFG") has style problems, please review. NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT BAD_REPORTED_BY_LINK CAMELCASE COMMIT_LOG_LONG_LINE 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. total: 0 errors, 55 warnings, 0 checks, 710 lines checked