WARNING: line length of 84 exceeds 80 columns #105: FILE: include/linux/bpf.h:1670: + u16 stack_arg_depth; /* both incoming and max outgoing of stack arguments */ WARNING: line length of 84 exceeds 80 columns #118: FILE: include/linux/bpf_verifier.h:272: + struct bpf_reg_state spilled_ptr; /* for spilled scalar/pointer semantics */ WARNING: line length of 87 exceeds 80 columns #130: FILE: include/linux/bpf_verifier.h:328: + u16 stack_arg_depth; /* Size of incoming + max outgoing stack args in bytes. */ WARNING: line length of 81 exceeds 80 columns #131: FILE: include/linux/bpf_verifier.h:329: + u16 incoming_stack_arg_depth; /* Size of incoming stack args in bytes. */ CHECK: Macro argument 'slot' may be better as '(slot)' to avoid precedence issues #140: FILE: include/linux/bpf_verifier.h:468: +#define bpf_get_spilled_stack_arg(slot, frame, mask) \ + (((slot < frame->stack_arg_depth / BPF_REG_SIZE) && \ + ((1 << frame->stack_arg_slots[slot].slot_type[BPF_REG_SIZE - 1]) & (mask))) \ + ? &frame->stack_arg_slots[slot].spilled_ptr : NULL) CHECK: Macro argument 'frame' may be better as '(frame)' to avoid precedence issues #140: FILE: include/linux/bpf_verifier.h:468: +#define bpf_get_spilled_stack_arg(slot, frame, mask) \ + (((slot < frame->stack_arg_depth / BPF_REG_SIZE) && \ + ((1 << frame->stack_arg_slots[slot].slot_type[BPF_REG_SIZE - 1]) & (mask))) \ + ? &frame->stack_arg_slots[slot].spilled_ptr : NULL) WARNING: line length of 87 exceeds 80 columns #142: FILE: include/linux/bpf_verifier.h:470: + ((1 << frame->stack_arg_slots[slot].slot_type[BPF_REG_SIZE - 1]) & (mask))) \ WARNING: line length of 88 exceeds 80 columns #158: FILE: include/linux/bpf_verifier.h:496: + bpf_for_each_spilled_stack_arg(___j, __state, __reg, __mask) { \ WARNING: line length of 87 exceeds 80 columns #199: 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 #204: FILE: kernel/bpf/btf.c:7901: + sub->incoming_stack_arg_depth = (nargs - MAX_BPF_FUNC_REG_ARGS) * BPF_REG_SIZE; WARNING: line length of 96 exceeds 80 columns #221: FILE: kernel/bpf/verifier.c:1484: + dst->stack_arg_slots = copy_array(dst->stack_arg_slots, src->stack_arg_slots, n, WARNING: line length of 85 exceeds 80 columns #222: FILE: kernel/bpf/verifier.c:1485: + sizeof(struct bpf_stack_arg_state), WARNING: line length of 83 exceeds 80 columns #248: FILE: kernel/bpf/verifier.c:1545: + sizeof(struct bpf_stack_arg_state)); WARNING: line length of 92 exceeds 80 columns #306: FILE: kernel/bpf/verifier.c:6005: +static int check_stack_arg_write(struct bpf_verifier_env *env, struct bpf_func_state *state, WARNING: line length of 82 exceeds 80 columns #329: FILE: kernel/bpf/verifier.c:6028: + type = is_spillable_regtype(reg->type) ? STACK_SPILL : STACK_MISC; WARNING: line length of 81 exceeds 80 columns #336: FILE: kernel/bpf/verifier.c:6035: + __mark_reg_known(reg, (u32)env->prog->insnsi[env->insn_idx].imm); WARNING: line length of 91 exceeds 80 columns #348: FILE: kernel/bpf/verifier.c:6047: +static int check_stack_arg_read(struct bpf_verifier_env *env, struct bpf_func_state *state, WARNING: line length of 82 exceeds 80 columns #393: FILE: kernel/bpf/verifier.c:8260: + return check_stack_arg_read(env, state, insn->off, insn->dst_reg); WARNING: line length of 83 exceeds 80 columns #417: FILE: kernel/bpf/verifier.c:8305: + return check_stack_arg_write(env, state, insn->off, insn->src_reg); WARNING: line length of 85 exceeds 80 columns #465: FILE: kernel/bpf/verifier.c:11319: + * Transfer stack args from caller's outgoing area to callee's incoming area. WARNING: line length of 91 exceeds 80 columns #466: FILE: kernel/bpf/verifier.c:11320: + * Caller wrote outgoing args at offsets '-(incoming + 8)', '-(incoming + 16)', ... WARNING: line length of 92 exceeds 80 columns #471: FILE: kernel/bpf/verifier.c:11325: + int caller_incoming_slots = caller->incoming_stack_arg_depth / BPF_REG_SIZE; WARNING: line length of 97 exceeds 80 columns #472: FILE: kernel/bpf/verifier.c:11326: + int callee_incoming_slots = callee_info->incoming_stack_arg_depth / BPF_REG_SIZE; WARNING: line length of 89 exceeds 80 columns #474: FILE: kernel/bpf/verifier.c:11328: + callee->incoming_stack_arg_depth = callee_info->incoming_stack_arg_depth; WARNING: line length of 95 exceeds 80 columns #475: FILE: kernel/bpf/verifier.c:11329: + err = grow_stack_arg_slots(env, callee, callee_info->incoming_stack_arg_depth); WARNING: line length of 81 exceeds 80 columns #482: FILE: kernel/bpf/verifier.c:11336: + if (!is_stack_arg_slot_initialized(caller, caller_spi)) { WARNING: line length of 87 exceeds 80 columns #483: FILE: kernel/bpf/verifier.c:11337: + verbose(env, "stack arg#%d not properly initialized\n", WARNING: line length of 89 exceeds 80 columns #487: FILE: kernel/bpf/verifier.c:11341: + callee->stack_arg_slots[i] = caller->stack_arg_slots[caller_spi]; WARNING: line length of 84 exceeds 80 columns #503: FILE: kernel/bpf/verifier.c:20743: +static bool stack_arg_safe(struct bpf_verifier_env *env, struct bpf_func_state *old, WARNING: line length of 91 exceeds 80 columns #520: FILE: kernel/bpf/verifier.c:20760: + if (old->stack_arg_slots[spi].slot_type[i % BPF_REG_SIZE] == STACK_INVALID) WARNING: line length of 81 exceeds 80 columns #532: FILE: kernel/bpf/verifier.c:20772: + if (!regsafe(env, &old->stack_arg_slots[spi].spilled_ptr, WARNING: line length of 91 exceeds 80 columns #533: FILE: kernel/bpf/verifier.c:20773: + &cur->stack_arg_slots[spi].spilled_ptr, idmap, exact)) WARNING: line length of 87 exceeds 80 columns #573: FILE: kernel/bpf/verifier.c:21793: + struct bpf_func_state *state = vstate->frame[vstate->curframe]; WARNING: line length of 81 exceeds 80 columns #599: FILE: kernel/bpf/verifier.c:21810: + err = check_mem_access(env, env->insn_idx, insn->dst_reg, WARNING: line length of 94 exceeds 80 columns #617: FILE: kernel/bpf/verifier.c:22515: + if (insn->dst_reg >= MAX_BPF_REG && insn->dst_reg != BPF_REG_STACK_ARG_BASE) { WARNING: line length of 94 exceeds 80 columns #622: FILE: kernel/bpf/verifier.c:22519: + if (insn->src_reg >= MAX_BPF_REG && insn->src_reg != BPF_REG_STACK_ARG_BASE) { WARNING: line length of 87 exceeds 80 columns #633: FILE: kernel/bpf/verifier.c:23546: + * Even without subprogs, kfunc calls with >5 args need stack arg space WARNING: line length of 91 exceeds 80 columns #636: FILE: kernel/bpf/verifier.c:23549: + prog->aux->stack_arg_depth = env->subprog_info[0].outgoing_stack_arg_depth; WARNING: line length of 103 exceeds 80 columns #646: FILE: kernel/bpf/verifier.c:23641: + func[i]->aux->incoming_stack_arg_depth = env->subprog_info[i].incoming_stack_arg_depth; WARNING: line length of 95 exceeds 80 columns #647: FILE: kernel/bpf/verifier.c:23642: + func[i]->aux->stack_arg_depth = env->subprog_info[i].incoming_stack_arg_depth + WARNING: line length of 94 exceeds 80 columns #648: FILE: kernel/bpf/verifier.c:23643: + env->subprog_info[i].outgoing_stack_arg_depth; total: 0 errors, 39 warnings, 2 checks, 518 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 71757f9e0d0b ("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, 39 warnings, 2 checks, 518 lines checked