WARNING: line length of 84 exceeds 80 columns #151: FILE: include/linux/bpf.h:1673: + u16 stack_arg_depth; /* both incoming and max outgoing of stack arguments */ CHECK: Macro argument 'frame' may be better as '(frame)' to avoid precedence issues #181: FILE: include/linux/bpf_verifier.h:515: +#define bpf_get_spilled_stack_arg(slot, frame, mask) \ + ((((slot) < frame->out_stack_arg_depth / BPF_REG_SIZE) && \ + (frame->stack_arg_regs[slot].type != NOT_INIT)) \ + ? &frame->stack_arg_regs[slot] : NULL) WARNING: Argument 'mask' is not used in function-like macro #181: FILE: include/linux/bpf_verifier.h:515: +#define bpf_get_spilled_stack_arg(slot, frame, mask) \ + ((((slot) < frame->out_stack_arg_depth / BPF_REG_SIZE) && \ + (frame->stack_arg_regs[slot].type != NOT_INIT)) \ + ? &frame->stack_arg_regs[slot] : NULL) WARNING: line length of 88 exceeds 80 columns #199: FILE: include/linux/bpf_verifier.h:543: + bpf_for_each_spilled_stack_arg(___j, __state, __reg, __mask) { \ WARNING: line length of 87 exceeds 80 columns #241: FILE: kernel/bpf/btf.c:7889: + bpf_log(log, "Global function %s() with %d > %d args not supported.\n", WARNING: line length of 95 exceeds 80 columns #246: FILE: kernel/bpf/btf.c:7894: + sub->incoming_stack_arg_depth = (nargs - MAX_BPF_FUNC_REG_ARGS) * BPF_REG_SIZE; WARNING: line length of 103 exceeds 80 columns #259: FILE: kernel/bpf/fixups.c:1126: + func[i]->aux->incoming_stack_arg_depth = env->subprog_info[i].incoming_stack_arg_depth; WARNING: line length of 85 exceeds 80 columns #260: FILE: kernel/bpf/fixups.c:1127: + func[i]->aux->stack_arg_depth = env->subprog_info[i].stack_arg_depth; WARNING: line length of 87 exceeds 80 columns #270: FILE: kernel/bpf/fixups.c:1307: + env->prog->aux->stack_arg_depth = env->subprog_info[0].stack_arg_depth; WARNING: line length of 92 exceeds 80 columns #288: FILE: kernel/bpf/fixups.c:1391: + u16 outgoing = subprog->stack_arg_depth - subprog->incoming_stack_arg_depth; WARNING: line length of 84 exceeds 80 columns #312: 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 88 exceeds 80 columns #318: FILE: kernel/bpf/states.c:851: + nslots = min(old->out_stack_arg_depth, cur->out_stack_arg_depth) / BPF_REG_SIZE; WARNING: line length of 93 exceeds 80 columns #361: FILE: kernel/bpf/verifier.c:1368: + dst->stack_arg_regs = copy_array(dst->stack_arg_regs, src->stack_arg_regs, n, WARNING: line length of 90 exceeds 80 columns #379: FILE: kernel/bpf/verifier.c:1420: + size_t old_n = state->out_stack_arg_depth / BPF_REG_SIZE, n = size / BPF_REG_SIZE; WARNING: Missing a blank line after declarations #380: FILE: kernel/bpf/verifier.c:1421: + size_t old_n = state->out_stack_arg_depth / BPF_REG_SIZE, n = size / BPF_REG_SIZE; + if (old_n >= n) CHECK: Alignment should match open parenthesis #384: FILE: kernel/bpf/verifier.c:1425: + state->stack_arg_regs = realloc_array(state->stack_arg_regs, old_n, n, + sizeof(struct bpf_reg_state)); WARNING: line length of 92 exceeds 80 columns #411: FILE: kernel/bpf/verifier.c:4453: +static int check_stack_arg_write(struct bpf_verifier_env *env, struct bpf_func_state *state, WARNING: line length of 85 exceeds 80 columns #422: FILE: kernel/bpf/verifier.c:4464: + verbose(env, "stack arg write offset %d exceeds max %d stack args\n", WARNING: line length of 91 exceeds 80 columns #452: FILE: kernel/bpf/verifier.c:4494: +static int check_stack_arg_read(struct bpf_verifier_env *env, struct bpf_func_state *state, WARNING: line length of 85 exceeds 80 columns #462: FILE: kernel/bpf/verifier.c:4504: + verbose(env, "r11 load must be before any r11 store or call insn\n"); WARNING: line length of 97 exceeds 80 columns #483: FILE: kernel/bpf/verifier.c:4525: +static int check_outgoing_stack_args(struct bpf_verifier_env *env, struct bpf_func_state *caller, WARNING: line length of 82 exceeds 80 columns #502: FILE: kernel/bpf/verifier.c:4544: + struct bpf_reg_state *regs, int arg) WARNING: line length of 82 exceeds 80 columns #528: FILE: kernel/bpf/verifier.c:6751: + return check_stack_arg_read(env, state, insn->off, insn->dst_reg); WARNING: line length of 83 exceeds 80 columns #549: FILE: kernel/bpf/verifier.c:6793: + return check_stack_arg_write(env, state, insn->off, insn->src_reg); WARNING: line length of 82 exceeds 80 columns #616: FILE: kernel/bpf/verifier.c:9740: + stack_arg_depth = caller_info->incoming_stack_arg_depth + callee_incoming; WARNING: line length of 87 exceeds 80 columns #638: FILE: kernel/bpf/verifier.c:17810: + struct bpf_func_state *state = vstate->frame[vstate->curframe]; WARNING: line length of 96 exceeds 80 columns #659: FILE: kernel/bpf/verifier.c:18965: + for (i = BPF_REG_1; i <= min_t(u32, sub->arg_cnt, MAX_BPF_FUNC_REG_ARGS); i++) { WARNING: line length of 99 exceeds 80 columns #667: FILE: kernel/bpf/verifier.c:19008: + if (env->prog->type == BPF_PROG_TYPE_EXT && sub->arg_cnt > MAX_BPF_FUNC_REG_ARGS) { WARNING: line length of 91 exceeds 80 columns #668: FILE: kernel/bpf/verifier.c:19009: + verbose(env, "freplace programs with >%d args not supported yet\n", total: 0 errors, 27 warnings, 2 checks, 482 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 6b6be8388da9 ("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, 27 warnings, 2 checks, 482 lines checked