WARNING: Prefer 'fallthrough;' over fallthrough comment #81: FILE: kernel/bpf/verifier.c:13418: + * 1 - not fall-through to 'else' branch, continue verification WARNING: Prefer 'fallthrough;' over fallthrough comment #82: FILE: kernel/bpf/verifier.c:13419: + * 0 - fall-through to 'else' branch WARNING: Prefer 'fallthrough;' over fallthrough comment #83: FILE: kernel/bpf/verifier.c:13420: + * < 0 - not fall-through to 'else' branch, return error WARNING: line length of 98 exceeds 80 columns #85: FILE: kernel/bpf/verifier.c:13422: +static int check_special_kfunc(struct bpf_verifier_env *env, struct bpf_kfunc_call_arg_meta *meta, WARNING: line length of 94 exceeds 80 columns #86: FILE: kernel/bpf/verifier.c:13423: + struct bpf_reg_state *regs, struct bpf_insn_aux_data *insn_aux, WARNING: line length of 85 exceeds 80 columns #87: FILE: kernel/bpf/verifier.c:13424: + const struct btf_type *ptr_type, struct btf *desc_btf) WARNING: line length of 99 exceeds 80 columns #101: FILE: kernel/bpf/verifier.c:13438: + if (meta->func_id == special_kfunc_list[KF_bpf_obj_new_impl] && !bpf_global_ma_set) WARNING: line length of 87 exceeds 80 columns #104: FILE: kernel/bpf/verifier.c:13441: + if (((u64)(u32)meta->arg_constant.value) != meta->arg_constant.value) { WARNING: line length of 95 exceeds 80 columns #105: FILE: kernel/bpf/verifier.c:13442: + verbose(env, "local type ID argument must be in range [0, U32_MAX]\n"); WARNING: line length of 91 exceeds 80 columns #114: FILE: kernel/bpf/verifier.c:13451: + verbose(env, "bpf_obj_new/bpf_percpu_obj_new requires prog BTF\n"); WARNING: line length of 110 exceeds 80 columns #120: FILE: kernel/bpf/verifier.c:13457: + verbose(env, "bpf_obj_new/bpf_percpu_obj_new type ID argument must be of a struct\n"); WARNING: line length of 86 exceeds 80 columns #124: FILE: kernel/bpf/verifier.c:13461: + if (meta->func_id == special_kfunc_list[KF_bpf_percpu_obj_new_impl]) { WARNING: line length of 102 exceeds 80 columns #126: FILE: kernel/bpf/verifier.c:13463: + verbose(env, "bpf_percpu_obj_new type size (%d) is greater than %d\n", WARNING: line length of 84 exceeds 80 columns #127: FILE: kernel/bpf/verifier.c:13464: + ret_t->size, BPF_GLOBAL_PERCPU_MA_MAX_SIZE); WARNING: line length of 95 exceeds 80 columns #134: FILE: kernel/bpf/verifier.c:13471: + /* Charge memory allocated with bpf_global_percpu_ma to WARNING: line length of 93 exceeds 80 columns #135: FILE: kernel/bpf/verifier.c:13472: + * root memcg. The obj_cgroup for root memcg is NULL. WARNING: line length of 101 exceeds 80 columns #137: FILE: kernel/bpf/verifier.c:13474: + err = bpf_mem_alloc_percpu_init(&bpf_global_percpu_ma, NULL); WARNING: line length of 97 exceeds 80 columns #147: FILE: kernel/bpf/verifier.c:13484: + err = bpf_mem_alloc_percpu_unit_init(&bpf_global_percpu_ma, ret_t->size); WARNING: line length of 86 exceeds 80 columns #154: FILE: kernel/bpf/verifier.c:13491: + if (meta->func_id == special_kfunc_list[KF_bpf_percpu_obj_new_impl]) { WARNING: line length of 83 exceeds 80 columns #155: FILE: kernel/bpf/verifier.c:13492: + if (!__btf_type_is_scalar_struct(env, ret_btf, ret_t, 0)) { WARNING: line length of 117 exceeds 80 columns #156: FILE: kernel/bpf/verifier.c:13493: + verbose(env, "bpf_percpu_obj_new type ID argument must be of a struct of scalars\n"); WARNING: line length of 118 exceeds 80 columns #161: FILE: kernel/bpf/verifier.c:13498: + verbose(env, "bpf_percpu_obj_new type ID argument must not contain special fields\n"); WARNING: line length of 84 exceeds 80 columns #170: FILE: kernel/bpf/verifier.c:13507: + if (meta->func_id == special_kfunc_list[KF_bpf_percpu_obj_new_impl]) WARNING: line length of 87 exceeds 80 columns #175: FILE: kernel/bpf/verifier.c:13512: + } else if (meta->func_id == special_kfunc_list[KF_bpf_refcount_acquire_impl]) { WARNING: line length of 82 exceeds 80 columns #192: FILE: kernel/bpf/verifier.c:13529: + } else if (meta->func_id == special_kfunc_list[KF_bpf_cast_to_kern_ctx]) { WARNING: line length of 83 exceeds 80 columns #210: FILE: kernel/bpf/verifier.c:13547: + meta->func_id == special_kfunc_list[KF_bpf_dynptr_slice_rdwr]) { WARNING: line length of 99 exceeds 80 columns #211: FILE: kernel/bpf/verifier.c:13548: + enum bpf_type_flag type_flag = get_dynptr_type_flag(meta->initialized_dynptr.type); WARNING: line length of 108 exceeds 80 columns #216: FILE: kernel/bpf/verifier.c:13553: + verbose(env, "verifier internal error: bpf_dynptr_slice(_rdwr) no constant size\n"); WARNING: line length of 84 exceeds 80 columns #222: FILE: kernel/bpf/verifier.c:13559: + /* PTR_MAYBE_NULL will be added when is_kfunc_ret_null is checked */ WARNING: line length of 96 exceeds 80 columns #230: FILE: kernel/bpf/verifier.c:13567: + verbose(env, "the prog does not allow writes to packet data\n"); WARNING: line length of 90 exceeds 80 columns #424: FILE: kernel/bpf/verifier.c:13822: + err = check_special_kfunc(env, &meta, regs, insn_aux, ptr_type, desc_btf); total: 0 errors, 31 warnings, 0 checks, 404 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 6fe0c747e3f1 ("bpf: Remove special_kfunc_set from verifier") 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, 31 warnings, 0 checks, 404 lines checked