WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #148: new file mode 100644 CHECK: Lines should not end with a '(' #162: FILE: kernel/bpf/verifier.c:20512: +asm ( WARNING: unnecessary whitespace before a quoted newline #163: FILE: kernel/bpf/verifier.c:20513: +" .pushsection .data, \"a\" \n" WARNING: unnecessary whitespace before a quoted newline #164: FILE: kernel/bpf/verifier.c:20514: +" .global inlinable_kfuncs_data \n" WARNING: unnecessary whitespace before a quoted newline #165: FILE: kernel/bpf/verifier.c:20515: +"inlinable_kfuncs_data: \n" WARNING: unnecessary whitespace before a quoted newline #167: FILE: kernel/bpf/verifier.c:20517: +" .global inlinable_kfuncs_data_end \n" WARNING: unnecessary whitespace before a quoted newline #168: FILE: kernel/bpf/verifier.c:20518: +"inlinable_kfuncs_data_end: \n" WARNING: unnecessary whitespace before a quoted newline #169: FILE: kernel/bpf/verifier.c:20519: +" .popsection \n" WARNING: externs should be avoided in .c files #172: FILE: kernel/bpf/verifier.c:20522: +extern void inlinable_kfuncs_data; WARNING: externs should be avoided in .c files #173: FILE: kernel/bpf/verifier.c:20523: +extern void inlinable_kfuncs_data_end; CHECK: Alignment should match open parenthesis #190: FILE: kernel/bpf/verifier.c:20540: +static void *check_inlinable_kfuncs_ptr(struct blob *blob, + void *ptr, u64 size, const char *context) WARNING: printk() should include KERN_ facility level #193: FILE: kernel/bpf/verifier.c:20543: + printk("malformed inlinable kfuncs data: bad offset/size 0x%lx/0x%llx: %s", CHECK: Alignment should match open parenthesis #201: FILE: kernel/bpf/verifier.c:20551: +static void *get_inlinable_kfuncs_ptr(struct blob *blob, + u64 off, u64 size, const char *context) WARNING: line length of 84 exceeds 80 columns #230: FILE: kernel/bpf/verifier.c:20580: + lowest_stack_off = min(lowest_stack_off, insn->off); WARNING: line length of 88 exceeds 80 columns #231: FILE: kernel/bpf/verifier.c:20581: + if (insn->src_reg == BPF_REG_10 && BPF_SRC(insn->code) == BPF_X) WARNING: line length of 84 exceeds 80 columns #236: FILE: kernel/bpf/verifier.c:20586: + lowest_stack_off = min(lowest_stack_off, insn->off); WARNING: line length of 88 exceeds 80 columns #240: FILE: kernel/bpf/verifier.c:20590: + if (insn->src_reg == BPF_REG_10 && BPF_SRC(insn->code) == BPF_X) WARNING: line length of 83 exceeds 80 columns #277: FILE: kernel/bpf/verifier.c:20627: + if (hdr->e_ident[EI_MAG0] != ELFMAG0 || hdr->e_ident[EI_MAG1] != ELFMAG1 || WARNING: line length of 83 exceeds 80 columns #278: FILE: kernel/bpf/verifier.c:20628: + hdr->e_ident[EI_MAG2] != ELFMAG2 || hdr->e_ident[EI_MAG3] != ELFMAG3 || WARNING: line length of 93 exceeds 80 columns #279: FILE: kernel/bpf/verifier.c:20629: + hdr->e_ident[EI_CLASS] != ELFCLASS64 || hdr->e_ident[EI_VERSION] != EV_CURRENT || WARNING: line length of 96 exceeds 80 columns #285: FILE: kernel/bpf/verifier.c:20635: + hdr->e_type != ET_REL || hdr->e_machine != EM_BPF || hdr->e_version != EV_CURRENT) { WARNING: printk() should include KERN_ facility level #286: FILE: kernel/bpf/verifier.c:20636: + printk("malformed inlinable kfuncs data: bad ELF header\n"); WARNING: line length of 88 exceeds 80 columns #292: FILE: kernel/bpf/verifier.c:20642: +static int inlinable_kfuncs_parse_sections(struct blob *blob, struct sh_elf_sections *s) WARNING: line length of 92 exceeds 80 columns #312: FILE: kernel/bpf/verifier.c:20662: + sec_hdrs = get_inlinable_kfuncs_ptr(blob, hdr->e_shoff, 0, "section headers table"); WARNING: line length of 93 exceeds 80 columns #315: FILE: kernel/bpf/verifier.c:20665: + sh_strings = check_inlinable_kfuncs_ptr(blob, &sec_hdrs[hdr->e_shstrndx], sizeof(*s), CHECK: Alignment should match open parenthesis #316: FILE: kernel/bpf/verifier.c:20666: + sh_strings = check_inlinable_kfuncs_ptr(blob, &sec_hdrs[hdr->e_shstrndx], sizeof(*s), + "string table header"); WARNING: line length of 92 exceeds 80 columns #319: FILE: kernel/bpf/verifier.c:20669: + strings = get_inlinable_kfuncs_ptr(blob, sh_strings->sh_offset, sh_strings->sh_size, CHECK: Alignment should match open parenthesis #320: FILE: kernel/bpf/verifier.c:20670: + strings = get_inlinable_kfuncs_ptr(blob, sh_strings->sh_offset, sh_strings->sh_size, + "strings table"); WARNING: printk() should include KERN_ facility level #324: FILE: kernel/bpf/verifier.c:20674: + printk("malformed inlinable kfuncs data: string table is not null terminated\n"); WARNING: line length of 93 exceeds 80 columns #327: FILE: kernel/bpf/verifier.c:20677: + if (!check_inlinable_kfuncs_ptr(blob, &sec_hdrs[hdr->e_shnum - 1], sizeof(*sec_hdrs), CHECK: Alignment should match open parenthesis #328: FILE: kernel/bpf/verifier.c:20678: + if (!check_inlinable_kfuncs_ptr(blob, &sec_hdrs[hdr->e_shnum - 1], sizeof(*sec_hdrs), + "section table")) WARNING: line length of 93 exceeds 80 columns #335: FILE: kernel/bpf/verifier.c:20685: + printk("malformed inlinable kfuncs data: bad section #%u name\n", i); WARNING: printk() should include KERN_ facility level #335: FILE: kernel/bpf/verifier.c:20685: + printk("malformed inlinable kfuncs data: bad section #%u name\n", i); WARNING: line length of 83 exceeds 80 columns #338: FILE: kernel/bpf/verifier.c:20688: + if (!get_inlinable_kfuncs_ptr(blob, shdr->sh_offset, shdr->sh_size, CHECK: Alignment should match open parenthesis #339: FILE: kernel/bpf/verifier.c:20689: + if (!get_inlinable_kfuncs_ptr(blob, shdr->sh_offset, shdr->sh_size, + "section size/offset")) WARNING: printk() should include KERN_ facility level #349: FILE: kernel/bpf/verifier.c:20699: + printk("malformed inlinable kfuncs data: unexpected symtab->sh_entsize: %llu\n", WARNING: printk() should include KERN_ facility level #354: FILE: kernel/bpf/verifier.c:20704: + printk("malformed inlinable kfuncs data: unexpected symtab->sh_size: %llu\n", WARNING: line length of 96 exceeds 80 columns #363: FILE: kernel/bpf/verifier.c:20713: + } else if (strcmp(name, ".BTF") == 0 || strcmp(name, ".BTF.ext") == 0) { WARNING: else is not generally useful after a break or return #366: FILE: kernel/bpf/verifier.c:20716: + break; + } else { WARNING: printk() should include KERN_ facility level #367: FILE: kernel/bpf/verifier.c:20717: + printk("malformed inlinable kfuncs data: unexpected section #%u name ('%s')\n", WARNING: printk() should include KERN_ facility level #374: FILE: kernel/bpf/verifier.c:20724: + printk("malformed inlinable kfuncs data: unexpected relocation section #%u name ('%s')\n", WARNING: printk() should include KERN_ facility level #381: FILE: kernel/bpf/verifier.c:20731: + printk("malformed inlinable kfuncs data: unexpected section #%u type (0x%x)\n", WARNING: printk() should include KERN_ facility level #387: FILE: kernel/bpf/verifier.c:20737: + printk("malformed inlinable kfuncs data: SHT_SYMTAB section is missing\n"); WARNING: printk() should include KERN_ facility level #391: FILE: kernel/bpf/verifier.c:20741: + printk("malformed inlinable kfuncs data: .text section is missing\n"); WARNING: line length of 93 exceeds 80 columns #394: FILE: kernel/bpf/verifier.c:20744: + if (text_rel && (text_rel->sh_info != text_idx || text_rel->sh_link != symtab_idx)) { WARNING: printk() should include KERN_ facility level #395: FILE: kernel/bpf/verifier.c:20745: + printk("malformed inlinable kfuncs data: SHT_REL section #%u '%s' unexpected sh_link %u\n", WARNING: line length of 84 exceeds 80 columns #423: FILE: kernel/bpf/verifier.c:20773: +static int inlinable_kfuncs_apply_relocs(struct sh_elf_sections *s, struct btf *btf) WARNING: printk() should include KERN_ facility level #432: FILE: kernel/bpf/verifier.c:20782: + printk("inlinable_kfuncs_init: no vmlinux btf\n"); WARNING: printk() should include KERN_ facility level #435: FILE: kernel/bpf/verifier.c:20785: + printk("inlinable_kfuncs_init: relocations:\n"); WARNING: printk() should include KERN_ facility level #437: FILE: kernel/bpf/verifier.c:20787: + printk("inlinable_kfuncs_init: tp=0x%llx, sym=0x%llx, off=0x%llx\n", WARNING: line length of 87 exceeds 80 columns #438: FILE: kernel/bpf/verifier.c:20788: + ELF_R_TYPE(rel->r_info), ELF_R_SYM(rel->r_info), rel->r_offset); WARNING: line length of 112 exceeds 80 columns #448: FILE: kernel/bpf/verifier.c:20798: + printk("relocation #%u unexpected relocation type: %llu\n", i, ELF_R_TYPE(rel->r_info)); WARNING: printk() should include KERN_ facility level #448: FILE: kernel/bpf/verifier.c:20798: + printk("relocation #%u unexpected relocation type: %llu\n", i, ELF_R_TYPE(rel->r_info)); WARNING: line length of 90 exceeds 80 columns #454: FILE: kernel/bpf/verifier.c:20804: + printk("relocation #%u symbol index out of bounds: %u\n", i, idx); WARNING: printk() should include KERN_ facility level #454: FILE: kernel/bpf/verifier.c:20804: + printk("relocation #%u symbol index out of bounds: %u\n", i, idx); WARNING: line length of 99 exceeds 80 columns #458: FILE: kernel/bpf/verifier.c:20808: + printk("relocation #%u symbol name out of bounds: %u\n", i, rsym->st_name); WARNING: printk() should include KERN_ facility level #458: FILE: kernel/bpf/verifier.c:20808: + printk("relocation #%u symbol name out of bounds: %u\n", i, rsym->st_name); WARNING: line length of 90 exceeds 80 columns #464: FILE: kernel/bpf/verifier.c:20814: + printk("relocation #%u invalid offset: %llu\n", i, rel->r_offset); WARNING: printk() should include KERN_ facility level #464: FILE: kernel/bpf/verifier.c:20814: + printk("relocation #%u invalid offset: %llu\n", i, rel->r_offset); WARNING: line length of 104 exceeds 80 columns #473: FILE: kernel/bpf/verifier.c:20823: + printk("relocation #%u invalid instruction at offset %llu\n", i, rel->r_offset); WARNING: printk() should include KERN_ facility level #473: FILE: kernel/bpf/verifier.c:20823: + printk("relocation #%u invalid instruction at offset %llu\n", i, rel->r_offset); WARNING: line length of 89 exceeds 80 columns #478: FILE: kernel/bpf/verifier.c:20828: + printk("relocation #%u can't resolve function '%s'\n", i, rname); WARNING: printk() should include KERN_ facility level #478: FILE: kernel/bpf/verifier.c:20828: + printk("relocation #%u can't resolve function '%s'\n", i, rname); WARNING: printk() should include KERN_ facility level #483: FILE: kernel/bpf/verifier.c:20833: + printk("inlinable_kfuncs_init: patching insn %ld, imm=%d, off=%d\n", WARNING: line length of 83 exceeds 80 columns #484: FILE: kernel/bpf/verifier.c:20834: + rinsn - (struct bpf_insn *)s->text, rinsn->imm, rinsn->off); WARNING: line length of 83 exceeds 80 columns #492: FILE: kernel/bpf/verifier.c:20842: + * (but refrain from being overly paranoid, as this ELF is a part of kernel build). WARNING: line length of 87 exceeds 80 columns #531: FILE: kernel/bpf/verifier.c:20881: + printk("malformed inlinable kfuncs data: bad symbol #%u\n", i); WARNING: printk() should include KERN_ facility level #531: FILE: kernel/bpf/verifier.c:20881: + printk("malformed inlinable kfuncs data: bad symbol #%u\n", i); WARNING: printk() should include KERN_ facility level #535: FILE: kernel/bpf/verifier.c:20885: + printk("malformed inlinable kfuncs data: too many helper functions\n"); WARNING: line length of 84 exceeds 80 columns #543: FILE: kernel/bpf/verifier.c:20893: + printk("can't add inlinable kfunc '%s': no btf_id\n", name); WARNING: printk() should include KERN_ facility level #543: FILE: kernel/bpf/verifier.c:20893: + printk("can't add inlinable kfunc '%s': no btf_id\n", name); WARNING: printk() should include KERN_ facility level #551: FILE: kernel/bpf/verifier.c:20901: + printk("adding inlinable kfunc %s at 0x%llx, %u instructions, btf_id=%d\n", WARNING: line length of 96 exceeds 80 columns #561: FILE: kernel/bpf/verifier.c:20911: + &inlinable_kfuncs_data_end - &inlinable_kfuncs_data); WARNING: line length of 82 exceeds 80 columns #579: FILE: kernel/bpf/verifier.c:20929: + * Stack slots used within kfunc body become stack slots of with calling function, WARNING: line length of 94 exceeds 80 columns #582: FILE: kernel/bpf/verifier.c:20932: +static struct bpf_prog *inline_kfunc_call(struct bpf_verifier_env *env, struct bpf_insn *insn, WARNING: line length of 105 exceeds 80 columns #583: FILE: kernel/bpf/verifier.c:20933: + int insn_idx, int *cnt, s32 stack_base, u16 *stack_depth_extra) WARNING: line length of 87 exceeds 80 columns #607: FILE: kernel/bpf/verifier.c:20957: + verbose(env, "can't inline kfunc %s at insn %d, r10 escapes\n", WARNING: line length of 87 exceeds 80 columns #616: FILE: kernel/bpf/verifier.c:20966: + *stack_depth_extra = extra_slots * BPF_REG_SIZE + -regs_usage.lowest_stack_off; WARNING: line length of 83 exceeds 80 columns #623: FILE: kernel/bpf/verifier.c:20973: + verbose(env, "inlining kfunc %s at insn %d\n", sh->name, insn_idx); WARNING: line length of 88 exceeds 80 columns #624: FILE: kernel/bpf/verifier.c:20974: + memcpy(insn_buf + extra_slots, sh->insns, subprog_insn_cnt * sizeof(*insn_buf)); ERROR: code indent should use tabs where possible #629: FILE: kernel/bpf/verifier.c:20979: + * by kfunc before/after inlined function body.$ WARNING: line length of 85 exceeds 80 columns #645: FILE: kernel/bpf/verifier.c:20995: + if (!regs_usage.r10_escapes && (regs_usage.used_regs_mask & BIT(BPF_REG_10))) WARNING: line length of 93 exceeds 80 columns #678: FILE: kernel/bpf/verifier.c:21028: + /* Make sure kernel function calls from within kfunc body could be jitted. */ WARNING: line length of 81 exceeds 80 columns #714: FILE: kernel/bpf/verifier.c:21064: + subprog_extra_stack = max(subprog_extra_stack, call_extra_stack); CHECK: multiple assignments should be avoided #716: FILE: kernel/bpf/verifier.c:21066: + env->prog = prog = new_prog; WARNING: line length of 81 exceeds 80 columns #721: FILE: kernel/bpf/verifier.c:21071: + subprogs[cur_subprog].stack_depth += subprog_extra_stack; CHECK: multiple assignments should be avoided #764: FILE: kernel/bpf/verifier.c:21114: + env->prog = prog = new_prog; total: 1 errors, 77 warnings, 9 checks, 757 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. NOTE: Whitespace errors detected. You may wish to use scripts/cleanpatch or scripts/cleanfile Commit 5a187c10d049 ("bpf: shared BPF/native kfuncs") 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.