WARNING: please, no space before tabs #136: FILE: include/linux/bpf_verifier.h:270: +^I^IREF_TYPE_RES_LOCK ^I= (1 << 4),$ WARNING: line length of 117 exceeds 80 columns #211: FILE: kernel/bpf/btf.c:5663: + record = btf_parse_fields(btf, t, BPF_SPIN_LOCK | BPF_RES_SPIN_LOCK | BPF_LIST_HEAD | BPF_LIST_NODE | WARNING: line length of 113 exceeds 80 columns #248: FILE: kernel/bpf/syscall.c:1205: + BPF_SPIN_LOCK | BPF_RES_SPIN_LOCK | BPF_TIMER | BPF_KPTR | BPF_LIST_HEAD | WARNING: line length of 92 exceeds 80 columns #269: FILE: kernel/bpf/verifier.c:458: + return btf_record_has_field(reg_btf_record(reg), BPF_SPIN_LOCK | BPF_RES_SPIN_LOCK); WARNING: line length of 94 exceeds 80 columns #296: FILE: kernel/bpf/verifier.c:1182: +static int unmark_stack_slot_irq_flag(struct bpf_verifier_env *env, struct bpf_reg_state *reg, WARNING: line length of 84 exceeds 80 columns #305: FILE: kernel/bpf/verifier.c:1197: + if (kfunc_class != IRQ_KFUNC_IGNORE && st->irq.kfunc_class != kfunc_class) { WARNING: line length of 101 exceeds 80 columns #306: FILE: kernel/bpf/verifier.c:1198: + const char *flag_kfunc = st->irq.kfunc_class == IRQ_NATIVE_KFUNC ? "native" : "lock"; WARNING: line length of 93 exceeds 80 columns #307: FILE: kernel/bpf/verifier.c:1199: + const char *used_kfunc = kfunc_class == IRQ_NATIVE_KFUNC ? "native" : "lock"; WARNING: line length of 98 exceeds 80 columns #309: FILE: kernel/bpf/verifier.c:1201: + verbose(env, "irq flag acquired by %s kfuncs cannot be restored with %s kfuncs\n", WARNING: line length of 112 exceeds 80 columns #346: FILE: kernel/bpf/verifier.c:8039: +static int process_spin_lock(struct bpf_verifier_env *env, struct bpf_verifier_state *cur, int regno, int flags) WARNING: line length of 89 exceeds 80 columns #348: FILE: kernel/bpf/verifier.c:8041: + bool is_lock = flags & PROCESS_SPIN_LOCK, is_res_lock = flags & PROCESS_RES_LOCK; WARNING: line length of 81 exceeds 80 columns #361: FILE: kernel/bpf/verifier.c:8053: + /* If the spin lock acquisition failed, we don't process the argument. */ WARNING: line length of 90 exceeds 80 columns #393: FILE: kernel/bpf/verifier.c:8078: + if (!btf_record_has_field(rec, is_res_lock ? BPF_RES_SPIN_LOCK : BPF_SPIN_LOCK)) { WARNING: line length of 85 exceeds 80 columns #394: FILE: kernel/bpf/verifier.c:8079: + verbose(env, "%s '%s' has no valid %s_lock\n", map ? "map" : "local", WARNING: line length of 82 exceeds 80 columns #401: FILE: kernel/bpf/verifier.c:8083: + spin_lock_off = is_res_lock ? rec->res_spin_lock_off : rec->spin_lock_off; WARNING: line length of 90 exceeds 80 columns #403: FILE: kernel/bpf/verifier.c:8085: + verbose(env, "off %lld doesn't point to 'struct %s_lock' that is at %d\n", WARNING: line length of 86 exceeds 80 columns #421: FILE: kernel/bpf/verifier.c:8099: + if (find_lock_state(env->cur_state, REF_TYPE_LOCK, 0, NULL)) { WARNING: line length of 95 exceeds 80 columns #427: FILE: kernel/bpf/verifier.c:8105: + if (find_lock_state(env->cur_state, REF_TYPE_RES_LOCK, reg->id, ptr)) { WARNING: line length of 102 exceeds 80 columns #428: FILE: kernel/bpf/verifier.c:8106: + verbose(env, "Acquiring the same lock again, AA deadlock detected\n"); WARNING: line length of 81 exceeds 80 columns #440: FILE: kernel/bpf/verifier.c:8117: + err = acquire_lock_state(env, env->insn_idx, type, reg->id, ptr); WARNING: line length of 84 exceeds 80 columns #456: FILE: kernel/bpf/verifier.c:8132: + verbose(env, "%s_unlock without taking a lock\n", lock_str); WARNING: line length of 95 exceeds 80 columns #478: FILE: kernel/bpf/verifier.c:9391: + err = process_spin_lock(env, env->cur_state, regno, PROCESS_SPIN_LOCK); WARNING: line length of 90 exceeds 80 columns #507: FILE: kernel/bpf/verifier.c:11641: +static bool is_kfunc_arg_res_spin_lock(const struct btf *btf, const struct btf_param *arg) WARNING: line length of 103 exceeds 80 columns #561: FILE: kernel/bpf/verifier.c:12039: +static int process_irq_flag(struct bpf_verifier_env *env, struct bpf_verifier_state *vstate, int regno, WARNING: line length of 86 exceeds 80 columns #574: FILE: kernel/bpf/verifier.c:12049: + if (meta->func_id == special_kfunc_list[KF_bpf_res_spin_lock_irqsave]) WARNING: line length of 83 exceeds 80 columns #576: FILE: kernel/bpf/verifier.c:12051: + } else if (meta->func_id == special_kfunc_list[KF_bpf_local_irq_restore] || WARNING: line length of 92 exceeds 80 columns #577: FILE: kernel/bpf/verifier.c:12052: + meta->func_id == special_kfunc_list[KF_bpf_res_spin_unlock_irqrestore]) { WARNING: line length of 91 exceeds 80 columns #579: FILE: kernel/bpf/verifier.c:12054: + if (meta->func_id == special_kfunc_list[KF_bpf_res_spin_unlock_irqrestore]) WARNING: line length of 81 exceeds 80 columns #586: FILE: kernel/bpf/verifier.c:12061: + /* If the spin lock acquisition failed, we don't process the argument. */ WARNING: line length of 91 exceeds 80 columns #600: FILE: kernel/bpf/verifier.c:12077: + err = mark_stack_slot_irq_flag(env, meta, reg, env->insn_idx, kfunc_class); WARNING: line length of 102 exceeds 80 columns #618: FILE: kernel/bpf/verifier.c:12218: + s = find_lock_state(env->cur_state, REF_TYPE_LOCK | REF_TYPE_RES_LOCK | REF_TYPE_RES_LOCK_IRQ, WARNING: line length of 85 exceeds 80 columns #638: FILE: kernel/bpf/verifier.c:12265: + return is_bpf_graph_api_kfunc(btf_id) || is_bpf_iter_num_api_kfunc(btf_id) || WARNING: line length of 92 exceeds 80 columns #649: FILE: kernel/bpf/verifier.c:12525: +static int check_kfunc_args(struct bpf_verifier_env *env, struct bpf_verifier_state *vstate, WARNING: line length of 104 exceeds 80 columns #660: FILE: kernel/bpf/verifier.c:12548: + struct bpf_reg_state *regs = vstate->frame[vstate->curframe]->regs, *reg = ®s[i + 1]; WARNING: line length of 84 exceeds 80 columns #677: FILE: kernel/bpf/verifier.c:12994: + ret = process_irq_flag(env, vstate, regno, meta, arg_flags); WARNING: line length of 104 exceeds 80 columns #685: FILE: kernel/bpf/verifier.c:13002: + if (reg->type != PTR_TO_MAP_VALUE && reg->type != (PTR_TO_BTF_ID | MEM_ALLOC)) { WARNING: line length of 107 exceeds 80 columns #686: FILE: kernel/bpf/verifier.c:13003: + verbose(env, "arg#%d doesn't point to map value or allocated object\n", i); WARNING: line length of 88 exceeds 80 columns #692: FILE: kernel/bpf/verifier.c:13009: + if (meta->func_id == special_kfunc_list[KF_bpf_res_spin_lock] || WARNING: line length of 94 exceeds 80 columns #693: FILE: kernel/bpf/verifier.c:13010: + meta->func_id == special_kfunc_list[KF_bpf_res_spin_lock_irqsave]) WARNING: line length of 96 exceeds 80 columns #695: FILE: kernel/bpf/verifier.c:13012: + if (meta->func_id == special_kfunc_list[KF_bpf_res_spin_lock_irqsave] || WARNING: line length of 99 exceeds 80 columns #696: FILE: kernel/bpf/verifier.c:13013: + meta->func_id == special_kfunc_list[KF_bpf_res_spin_unlock_irqrestore]) WARNING: line length of 87 exceeds 80 columns #698: FILE: kernel/bpf/verifier.c:13015: + ret = process_spin_lock(env, vstate, regno, flags | arg_flags); WARNING: line length of 92 exceeds 80 columns #713: FILE: kernel/bpf/verifier.c:13076: +static int check_kfunc_call(struct bpf_verifier_env *env, struct bpf_verifier_state *vstate, WARNING: line length of 107 exceeds 80 columns #747: FILE: kernel/bpf/verifier.c:13277: + if (meta.btf == btf_vmlinux && (meta.func_id == special_kfunc_list[KF_bpf_res_spin_lock] || WARNING: line length of 88 exceeds 80 columns #748: FILE: kernel/bpf/verifier.c:13278: + meta.func_id == special_kfunc_list[KF_bpf_res_spin_lock_irqsave])) { CHECK: Alignment should match open parenthesis #748: FILE: kernel/bpf/verifier.c:13278: + if (meta.btf == btf_vmlinux && (meta.func_id == special_kfunc_list[KF_bpf_res_spin_lock] || + meta.func_id == special_kfunc_list[KF_bpf_res_spin_lock_irqsave])) { WARNING: line length of 91 exceeds 80 columns #750: FILE: kernel/bpf/verifier.c:13280: + __mark_reg_s32_range(env, regs, BPF_REG_0, -MAX_ERRNO, -1); WARNING: line length of 90 exceeds 80 columns #762: FILE: kernel/bpf/verifier.c:18167: + if (!check_ids(old_reg->ref_obj_id, cur_reg->ref_obj_id, idmap) || WARNING: line length of 81 exceeds 80 columns #763: FILE: kernel/bpf/verifier.c:18168: + old_reg->irq.kfunc_class != cur_reg->irq.kfunc_class) WARNING: line length of 101 exceeds 80 columns #782: FILE: kernel/bpf/verifier.c:19205: + (insn->imm == special_kfunc_list[KF_bpf_res_spin_lock] || WARNING: line length of 110 exceeds 80 columns #783: FILE: kernel/bpf/verifier.c:19206: + insn->imm == special_kfunc_list[KF_bpf_res_spin_lock_irqsave])) { WARNING: line length of 82 exceeds 80 columns #784: FILE: kernel/bpf/verifier.c:19207: + struct bpf_verifier_state *branch; WARNING: line length of 119 exceeds 80 columns #786: FILE: kernel/bpf/verifier.c:19209: + branch = push_stack(env, env->insn_idx + 1, env->prev_insn_idx, false); WARNING: Too many leading tabs - consider code refactoring #787: FILE: kernel/bpf/verifier.c:19210: + if (!branch) { WARNING: line length of 123 exceeds 80 columns #788: FILE: kernel/bpf/verifier.c:19211: + verbose(env, "failed to push state for failed lock acquisition\n"); WARNING: line length of 125 exceeds 80 columns #791: FILE: kernel/bpf/verifier.c:19214: + err = check_kfunc_call(env, branch, insn, &env->insn_idx, PROCESS_LOCK_FAIL); WARNING: line length of 116 exceeds 80 columns #793: FILE: kernel/bpf/verifier.c:19216: + err = err ?: check_kfunc_call(env, env->cur_state, insn, &env->insn_idx, 0); WARNING: line length of 83 exceeds 80 columns #802: FILE: kernel/bpf/verifier.c:19559: + if (btf_record_has_field(map->record, BPF_SPIN_LOCK | BPF_RES_SPIN_LOCK)) { total: 0 errors, 57 warnings, 1 checks, 681 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 08b6c27c2c7b ("bpf: Implement verifier support for rqspinlock") 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, 57 warnings, 1 checks, 681 lines checked