WARNING: line length of 84 exceeds 80 columns #149: FILE: include/linux/bpf.h:1670: + u16 stack_arg_depth; /* both incoming and max outgoing of stack arguments */ WARNING: line length of 87 exceeds 80 columns #162: FILE: include/linux/bpf_verifier.h:376: + u16 stack_arg_depth; /* Size of incoming + max outgoing stack args in bytes. */ WARNING: line length of 81 exceeds 80 columns #163: FILE: include/linux/bpf_verifier.h:377: + u16 incoming_stack_arg_depth; /* Size of incoming stack args in bytes. */ WARNING: line length of 97 exceeds 80 columns #164: FILE: include/linux/bpf_verifier.h:378: + u16 out_stack_arg_mask; /* Bitmask of outgoing stack arg slots that have been written. */ CHECK: Macro argument 'slot' may be better as '(slot)' to avoid precedence issues #173: FILE: include/linux/bpf_verifier.h:516: +#define bpf_get_spilled_stack_arg(slot, frame, mask) \ + (((slot < frame->stack_arg_depth / BPF_REG_SIZE) && \ + ((1 << frame->stack_arg_regs[slot].type) & (mask))) \ + ? &frame->stack_arg_regs[slot] : NULL) CHECK: Macro argument 'frame' may be better as '(frame)' to avoid precedence issues #173: FILE: include/linux/bpf_verifier.h:516: +#define bpf_get_spilled_stack_arg(slot, frame, mask) \ + (((slot < frame->stack_arg_depth / BPF_REG_SIZE) && \ + ((1 << frame->stack_arg_regs[slot].type) & (mask))) \ + ? &frame->stack_arg_regs[slot] : NULL) WARNING: line length of 88 exceeds 80 columns #191: FILE: include/linux/bpf_verifier.h:544: + bpf_for_each_spilled_stack_arg(___j, __state, __reg, __mask) { \ WARNING: line length of 87 exceeds 80 columns #233: FILE: kernel/bpf/btf.c:7896: + bpf_log(log, "Global function %s() with %d > %d args not supported.\n", WARNING: line length of 95 exceeds 80 columns #238: FILE: kernel/bpf/btf.c:7901: + sub->incoming_stack_arg_depth = (nargs - MAX_BPF_FUNC_REG_ARGS) * BPF_REG_SIZE; WARNING: line length of 87 exceeds 80 columns #254: FILE: kernel/bpf/fixups.c:988: + * Even without subprogs, kfunc calls with >5 args need stack arg space WARNING: line length of 91 exceeds 80 columns #257: FILE: kernel/bpf/fixups.c:991: + prog->aux->stack_arg_depth = env->subprog_info[0].outgoing_stack_arg_depth; WARNING: line length of 103 exceeds 80 columns #267: FILE: kernel/bpf/fixups.c:1083: + func[i]->aux->incoming_stack_arg_depth = env->subprog_info[i].incoming_stack_arg_depth; WARNING: line length of 95 exceeds 80 columns #268: FILE: kernel/bpf/fixups.c:1084: + func[i]->aux->stack_arg_depth = env->subprog_info[i].incoming_stack_arg_depth + WARNING: line length of 94 exceeds 80 columns #269: FILE: kernel/bpf/fixups.c:1085: + env->subprog_info[i].outgoing_stack_arg_depth; WARNING: line length of 91 exceeds 80 columns #286: FILE: kernel/bpf/fixups.c:1284: + if (subprog->max_out_stack_arg_depth > subprog->outgoing_stack_arg_depth) { WARNING: line length of 104 exceeds 80 columns #289: FILE: kernel/bpf/fixups.c:1287: + i, subprog->max_out_stack_arg_depth, subprog->outgoing_stack_arg_depth); WARNING: line length of 84 exceeds 80 columns #308: FILE: kernel/bpf/states.c:845: +static bool stack_arg_safe(struct bpf_verifier_env *env, struct bpf_func_state *old, WARNING: line length of 93 exceeds 80 columns #367: FILE: kernel/bpf/verifier.c:1347: + dst->stack_arg_regs = copy_array(dst->stack_arg_regs, src->stack_arg_regs, n, CHECK: Alignment should match open parenthesis #368: FILE: kernel/bpf/verifier.c:1348: + dst->stack_arg_regs = copy_array(dst->stack_arg_regs, src->stack_arg_regs, n, + sizeof(struct bpf_reg_state), CHECK: Alignment should match open parenthesis #395: FILE: kernel/bpf/verifier.c:1409: + state->stack_arg_regs = realloc_array(state->stack_arg_regs, old_n, n, + sizeof(struct bpf_reg_state)); WARNING: line length of 109 exceeds 80 columns #419: FILE: kernel/bpf/verifier.c:4253: + * Cross-frame reads may hit slots poisoned by dead code elimination. WARNING: line length of 108 exceeds 80 columns #420: FILE: kernel/bpf/verifier.c:4254: + * Static liveness can't track indirect references through pointers, WARNING: line length of 87 exceeds 80 columns #423: FILE: kernel/bpf/verifier.c:4257: + if (type == STACK_POISON && reg_state != state) WARNING: line length of 83 exceeds 80 columns #457: FILE: kernel/bpf/verifier.c:4486: + /* Reads use positive offsets (incoming), writes use negative (outgoing) */ WARNING: line length of 81 exceeds 80 columns #459: FILE: kernel/bpf/verifier.c:4488: + verbose(env, "stack arg read must use positive offset, got %d\n", WARNING: line length of 82 exceeds 80 columns #464: FILE: kernel/bpf/verifier.c:4493: + verbose(env, "stack arg write must use negative offset, got %d\n", WARNING: line length of 92 exceeds 80 columns #491: FILE: kernel/bpf/verifier.c:4520: +static int check_stack_arg_write(struct bpf_verifier_env *env, struct bpf_func_state *state, WARNING: line length of 85 exceeds 80 columns #502: FILE: kernel/bpf/verifier.c:4531: + verbose(env, "stack arg write offset %d exceeds max %d stack args\n", WARNING: line length of 89 exceeds 80 columns #507: FILE: kernel/bpf/verifier.c:4536: + err = grow_stack_arg_slots(env, state, state->incoming_stack_arg_depth + (-off)); WARNING: line length of 91 exceeds 80 columns #535: FILE: kernel/bpf/verifier.c:4564: +static int check_stack_arg_read(struct bpf_verifier_env *env, struct bpf_func_state *state, WARNING: line length of 82 exceeds 80 columns #579: FILE: kernel/bpf/verifier.c:6783: + return check_stack_arg_read(env, state, insn->off, insn->dst_reg); WARNING: line length of 83 exceeds 80 columns #603: FILE: kernel/bpf/verifier.c:6828: + return check_stack_arg_write(env, state, insn->off, insn->src_reg); WARNING: line length of 84 exceeds 80 columns #614: FILE: kernel/bpf/verifier.c:9517: + struct bpf_reg_state *regs, int argno) WARNING: line length of 81 exceeds 80 columns #640: FILE: kernel/bpf/verifier.c:9552: + int spi = out_arg_spi(caller, i - MAX_BPF_FUNC_REG_ARGS); WARNING: line length of 83 exceeds 80 columns #643: FILE: kernel/bpf/verifier.c:9555: + * The compiler may constant-fold stack arg values into the WARNING: line length of 85 exceeds 80 columns #644: FILE: kernel/bpf/verifier.c:9556: + * callee, eliminating the r11 stores. The BTF still declares WARNING: line length of 84 exceeds 80 columns #648: FILE: kernel/bpf/verifier.c:9560: + verbose(env, "stack %s not found in caller state\n", WARNING: line length of 97 exceeds 80 columns #710: FILE: kernel/bpf/verifier.c:9892: + int callee_incoming_slots = callee_info->incoming_stack_arg_depth / BPF_REG_SIZE; WARNING: line length of 89 exceeds 80 columns #714: FILE: kernel/bpf/verifier.c:9896: + callee->incoming_stack_arg_depth = callee_info->incoming_stack_arg_depth; WARNING: line length of 95 exceeds 80 columns #715: FILE: kernel/bpf/verifier.c:9897: + err = grow_stack_arg_slots(env, callee, callee_info->incoming_stack_arg_depth); WARNING: line length of 87 exceeds 80 columns #723: FILE: kernel/bpf/verifier.c:9905: + verbose(env, "stack arg#%d not properly initialized\n", WARNING: line length of 87 exceeds 80 columns #731: FILE: kernel/bpf/verifier.c:9913: + callee->stack_arg_regs[i] = caller->stack_arg_regs[caller_spi]; WARNING: line length of 87 exceeds 80 columns #745: FILE: kernel/bpf/verifier.c:17922: + struct bpf_func_state *state = vstate->frame[vstate->curframe]; WARNING: line length of 96 exceeds 80 columns #761: FILE: kernel/bpf/verifier.c:19088: + for (i = BPF_REG_1; i <= min_t(u32, sub->arg_cnt, MAX_BPF_FUNC_REG_ARGS); i++) { total: 0 errors, 40 warnings, 4 checks, 574 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 802356b8202a ("bpf: Support stack arguments for bpf functions") 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. total: 0 errors, 40 warnings, 4 checks, 574 lines checked