========== checkpatch - FAILED WARNING: Possible repeated word: 'are' #8: an IPI, its registers are are passed onto the bpf_die. ERROR: trailing whitespace #66: FILE: include/linux/filter.h:701: +^Ispin_lock_irqsave(&prog->termination_states->per_cpu_state[cpu_id].lock, $ WARNING: line length of 81 exceeds 80 columns #66: FILE: include/linux/filter.h:701: + spin_lock_irqsave(&prog->termination_states->per_cpu_state[cpu_id].lock, WARNING: Missing a blank line after declarations #66: FILE: include/linux/filter.h:701: + u32 cpu_id = raw_smp_processor_id(); + spin_lock_irqsave(&prog->termination_states->per_cpu_state[cpu_id].lock, CHECK: Alignment should match open parenthesis #67: FILE: include/linux/filter.h:702: + spin_lock_irqsave(&prog->termination_states->per_cpu_state[cpu_id].lock, + flags); WARNING: line length of 85 exceeds 80 columns #69: FILE: include/linux/filter.h:704: + spin_unlock_irqrestore(&prog->termination_states->per_cpu_state[cpu_id].lock, CHECK: Alignment should match open parenthesis #70: FILE: include/linux/filter.h:705: + spin_unlock_irqrestore(&prog->termination_states->per_cpu_state[cpu_id].lock, + flags); WARNING: line length of 88 exceeds 80 columns #122: FILE: kernel/bpf/syscall.c:6011: +static bool per_cpu_flag_is_true(struct termination_aux_states *term_states, int cpu_id) ERROR: trailing whitespace #126: FILE: kernel/bpf/syscall.c:6015: +^Ispin_lock_irqsave(&term_states->per_cpu_state[cpu_id].lock, $ CHECK: Alignment should match open parenthesis #127: FILE: kernel/bpf/syscall.c:6016: + spin_lock_irqsave(&term_states->per_cpu_state[cpu_id].lock, + flags); CHECK: Alignment should match open parenthesis #130: FILE: kernel/bpf/syscall.c:6019: + spin_unlock_irqrestore(&term_states->per_cpu_state[cpu_id].lock, + flags); CHECK: Alignment should match open parenthesis #134: FILE: kernel/bpf/syscall.c:6023: + spin_unlock_irqrestore(&term_states->per_cpu_state[cpu_id].lock, + flags); ERROR: open brace '{' following function definitions go on the next line #138: FILE: kernel/bpf/syscall.c:6027: +static int is_bpf_address(struct bpf_prog *prog, unsigned long addr) { CHECK: Blank lines aren't necessary after an open brace '{' #139: FILE: kernel/bpf/syscall.c:6028: +static int is_bpf_address(struct bpf_prog *prog, unsigned long addr) { + ERROR: code indent should use tabs where possible #140: FILE: kernel/bpf/syscall.c:6029: + unsigned long bpf_func_addr = (unsigned long)prog->bpf_func;$ WARNING: please, no spaces at the start of a line #140: FILE: kernel/bpf/syscall.c:6029: + unsigned long bpf_func_addr = (unsigned long)prog->bpf_func;$ ERROR: code indent should use tabs where possible #141: FILE: kernel/bpf/syscall.c:6030: + if ((addr > bpf_func_addr) &&$ WARNING: Missing a blank line after declarations #141: FILE: kernel/bpf/syscall.c:6030: + unsigned long bpf_func_addr = (unsigned long)prog->bpf_func; + if ((addr > bpf_func_addr) && WARNING: please, no spaces at the start of a line #141: FILE: kernel/bpf/syscall.c:6030: + if ((addr > bpf_func_addr) &&$ CHECK: Unnecessary parentheses around 'addr > bpf_func_addr' #141: FILE: kernel/bpf/syscall.c:6030: + if ((addr > bpf_func_addr) && + (addr < bpf_func_addr + prog->jited_len)){ ERROR: code indent should use tabs where possible #142: FILE: kernel/bpf/syscall.c:6031: + (addr < bpf_func_addr + prog->jited_len)){$ CHECK: Alignment should match open parenthesis #142: FILE: kernel/bpf/syscall.c:6031: + if ((addr > bpf_func_addr) && + (addr < bpf_func_addr + prog->jited_len)){ WARNING: please, no spaces at the start of a line #142: FILE: kernel/bpf/syscall.c:6031: + (addr < bpf_func_addr + prog->jited_len)){$ ERROR: space required before the open brace '{' #142: FILE: kernel/bpf/syscall.c:6031: + (addr < bpf_func_addr + prog->jited_len)){ ERROR: code indent should use tabs where possible #143: FILE: kernel/bpf/syscall.c:6032: + return 1;$ WARNING: please, no spaces at the start of a line #143: FILE: kernel/bpf/syscall.c:6032: + return 1;$ ERROR: code indent should use tabs where possible #144: FILE: kernel/bpf/syscall.c:6033: + }$ WARNING: please, no spaces at the start of a line #144: FILE: kernel/bpf/syscall.c:6033: + }$ ERROR: code indent should use tabs where possible #146: FILE: kernel/bpf/syscall.c:6035: + for (int subprog = 1; subprog < prog->aux->func_cnt; subprog++) {$ WARNING: please, no spaces at the start of a line #146: FILE: kernel/bpf/syscall.c:6035: + for (int subprog = 1; subprog < prog->aux->func_cnt; subprog++) {$ ERROR: code indent should use tabs where possible #147: FILE: kernel/bpf/syscall.c:6036: + struct bpf_prog *bpf_subprog = prog->aux->func[subprog];$ WARNING: please, no spaces at the start of a line #147: FILE: kernel/bpf/syscall.c:6036: + struct bpf_prog *bpf_subprog = prog->aux->func[subprog];$ ERROR: code indent should use tabs where possible #148: FILE: kernel/bpf/syscall.c:6037: + unsigned long bpf_subprog_func_addr =$ WARNING: please, no spaces at the start of a line #148: FILE: kernel/bpf/syscall.c:6037: + unsigned long bpf_subprog_func_addr =$ ERROR: code indent should use tabs where possible #149: FILE: kernel/bpf/syscall.c:6038: + (unsigned long)bpf_subprog->bpf_func;$ WARNING: please, no spaces at the start of a line #149: FILE: kernel/bpf/syscall.c:6038: + (unsigned long)bpf_subprog->bpf_func;$ WARNING: line length of 85 exceeds 80 columns #150: FILE: kernel/bpf/syscall.c:6039: + if ((addr > bpf_subprog_func_addr) && (addr < bpf_subprog_func_addr + ERROR: code indent should use tabs where possible #150: FILE: kernel/bpf/syscall.c:6039: + if ((addr > bpf_subprog_func_addr) && (addr < bpf_subprog_func_addr +$ WARNING: please, no spaces at the start of a line #150: FILE: kernel/bpf/syscall.c:6039: + if ((addr > bpf_subprog_func_addr) && (addr < bpf_subprog_func_addr +$ CHECK: Unnecessary parentheses around 'addr > bpf_subprog_func_addr' #150: FILE: kernel/bpf/syscall.c:6039: + if ((addr > bpf_subprog_func_addr) && (addr < bpf_subprog_func_addr + + bpf_subprog->jited_len)) { WARNING: line length of 82 exceeds 80 columns #151: FILE: kernel/bpf/syscall.c:6040: + bpf_subprog->jited_len)) { ERROR: code indent should use tabs where possible #151: FILE: kernel/bpf/syscall.c:6040: + bpf_subprog->jited_len)) {$ WARNING: please, no spaces at the start of a line #151: FILE: kernel/bpf/syscall.c:6040: + bpf_subprog->jited_len)) {$ ERROR: code indent should use tabs where possible #152: FILE: kernel/bpf/syscall.c:6041: + return 1;$ WARNING: please, no spaces at the start of a line #152: FILE: kernel/bpf/syscall.c:6041: + return 1;$ ERROR: code indent should use tabs where possible #153: FILE: kernel/bpf/syscall.c:6042: + }$ WARNING: please, no spaces at the start of a line #153: FILE: kernel/bpf/syscall.c:6042: + }$ ERROR: code indent should use tabs where possible #154: FILE: kernel/bpf/syscall.c:6043: + }$ WARNING: please, no spaces at the start of a line #154: FILE: kernel/bpf/syscall.c:6043: + }$ ERROR: code indent should use tabs where possible #156: FILE: kernel/bpf/syscall.c:6045: + return 0;$ WARNING: please, no spaces at the start of a line #156: FILE: kernel/bpf/syscall.c:6045: + return 0;$ ERROR: code indent should use tabs where possible #160: FILE: kernel/bpf/syscall.c:6049: + struct bpf_prog *prog, unsigned long addr)$ CHECK: Alignment should match open parenthesis #160: FILE: kernel/bpf/syscall.c:6049: +static unsigned long find_offset_in_patch_prog(struct bpf_prog *patch_prog, + struct bpf_prog *prog, unsigned long addr) WARNING: please, no spaces at the start of a line #160: FILE: kernel/bpf/syscall.c:6049: + struct bpf_prog *prog, unsigned long addr)$ CHECK: Blank lines aren't necessary after an open brace '{' #162: FILE: kernel/bpf/syscall.c:6051: +{ + ERROR: code indent should use tabs where possible #163: FILE: kernel/bpf/syscall.c:6052: + unsigned long bpf_func_addr = (unsigned long)prog->bpf_func;$ WARNING: please, no spaces at the start of a line #163: FILE: kernel/bpf/syscall.c:6052: + unsigned long bpf_func_addr = (unsigned long)prog->bpf_func;$ ERROR: code indent should use tabs where possible #164: FILE: kernel/bpf/syscall.c:6053: + if ((addr > bpf_func_addr) &&$ WARNING: Missing a blank line after declarations #164: FILE: kernel/bpf/syscall.c:6053: + unsigned long bpf_func_addr = (unsigned long)prog->bpf_func; + if ((addr > bpf_func_addr) && WARNING: please, no spaces at the start of a line #164: FILE: kernel/bpf/syscall.c:6053: + if ((addr > bpf_func_addr) &&$ CHECK: Unnecessary parentheses around 'addr > bpf_func_addr' #164: FILE: kernel/bpf/syscall.c:6053: + if ((addr > bpf_func_addr) && + (addr < bpf_func_addr + prog->jited_len)){ ERROR: code indent should use tabs where possible #165: FILE: kernel/bpf/syscall.c:6054: + (addr < bpf_func_addr + prog->jited_len)){$ CHECK: Alignment should match open parenthesis #165: FILE: kernel/bpf/syscall.c:6054: + if ((addr > bpf_func_addr) && + (addr < bpf_func_addr + prog->jited_len)){ WARNING: please, no spaces at the start of a line #165: FILE: kernel/bpf/syscall.c:6054: + (addr < bpf_func_addr + prog->jited_len)){$ ERROR: space required before the open brace '{' #165: FILE: kernel/bpf/syscall.c:6054: + (addr < bpf_func_addr + prog->jited_len)){ ERROR: code indent should use tabs where possible #166: FILE: kernel/bpf/syscall.c:6055: + unsigned long offset = addr - (unsigned long)prog->bpf_func;$ WARNING: please, no spaces at the start of a line #166: FILE: kernel/bpf/syscall.c:6055: + unsigned long offset = addr - (unsigned long)prog->bpf_func;$ ERROR: code indent should use tabs where possible #167: FILE: kernel/bpf/syscall.c:6056: + return (unsigned long)patch_prog->bpf_func + offset;$ WARNING: Missing a blank line after declarations #167: FILE: kernel/bpf/syscall.c:6056: + unsigned long offset = addr - (unsigned long)prog->bpf_func; + return (unsigned long)patch_prog->bpf_func + offset; WARNING: please, no spaces at the start of a line #167: FILE: kernel/bpf/syscall.c:6056: + return (unsigned long)patch_prog->bpf_func + offset;$ ERROR: code indent should use tabs where possible #168: FILE: kernel/bpf/syscall.c:6057: + }$ WARNING: please, no spaces at the start of a line #168: FILE: kernel/bpf/syscall.c:6057: + }$ ERROR: code indent should use tabs where possible #170: FILE: kernel/bpf/syscall.c:6059: + for (int subprog = 1; subprog < prog->aux->func_cnt; subprog++) {$ WARNING: please, no spaces at the start of a line #170: FILE: kernel/bpf/syscall.c:6059: + for (int subprog = 1; subprog < prog->aux->func_cnt; subprog++) {$ ERROR: code indent should use tabs where possible #171: FILE: kernel/bpf/syscall.c:6060: + struct bpf_prog *bpf_subprog = prog->aux->func[subprog];$ WARNING: please, no spaces at the start of a line #171: FILE: kernel/bpf/syscall.c:6060: + struct bpf_prog *bpf_subprog = prog->aux->func[subprog];$ ERROR: code indent should use tabs where possible #172: FILE: kernel/bpf/syscall.c:6061: + unsigned long bpf_subprog_func_addr =$ WARNING: please, no spaces at the start of a line #172: FILE: kernel/bpf/syscall.c:6061: + unsigned long bpf_subprog_func_addr =$ ERROR: code indent should use tabs where possible #173: FILE: kernel/bpf/syscall.c:6062: + (unsigned long)bpf_subprog->bpf_func;$ WARNING: please, no spaces at the start of a line #173: FILE: kernel/bpf/syscall.c:6062: + (unsigned long)bpf_subprog->bpf_func;$ WARNING: line length of 85 exceeds 80 columns #174: FILE: kernel/bpf/syscall.c:6063: + if ((addr > bpf_subprog_func_addr) && (addr < bpf_subprog_func_addr + ERROR: code indent should use tabs where possible #174: FILE: kernel/bpf/syscall.c:6063: + if ((addr > bpf_subprog_func_addr) && (addr < bpf_subprog_func_addr +$ WARNING: please, no spaces at the start of a line #174: FILE: kernel/bpf/syscall.c:6063: + if ((addr > bpf_subprog_func_addr) && (addr < bpf_subprog_func_addr +$ CHECK: Unnecessary parentheses around 'addr > bpf_subprog_func_addr' #174: FILE: kernel/bpf/syscall.c:6063: + if ((addr > bpf_subprog_func_addr) && (addr < bpf_subprog_func_addr + + bpf_subprog->jited_len)) { WARNING: line length of 82 exceeds 80 columns #175: FILE: kernel/bpf/syscall.c:6064: + bpf_subprog->jited_len)) { ERROR: code indent should use tabs where possible #175: FILE: kernel/bpf/syscall.c:6064: + bpf_subprog->jited_len)) {$ WARNING: please, no spaces at the start of a line #175: FILE: kernel/bpf/syscall.c:6064: + bpf_subprog->jited_len)) {$ ERROR: code indent should use tabs where possible #176: FILE: kernel/bpf/syscall.c:6065: + unsigned long offset = addr - (unsigned$ WARNING: please, no spaces at the start of a line #176: FILE: kernel/bpf/syscall.c:6065: + unsigned long offset = addr - (unsigned$ ERROR: code indent should use tabs where possible #177: FILE: kernel/bpf/syscall.c:6066: + long)prog->aux->func[subprog]->bpf_func;$ WARNING: please, no spaces at the start of a line #177: FILE: kernel/bpf/syscall.c:6066: + long)prog->aux->func[subprog]->bpf_func;$ WARNING: line length of 96 exceeds 80 columns #178: FILE: kernel/bpf/syscall.c:6067: + return (unsigned long)patch_prog->aux->func[subprog]->bpf_func + offset; ERROR: code indent should use tabs where possible #178: FILE: kernel/bpf/syscall.c:6067: + return (unsigned long)patch_prog->aux->func[subprog]->bpf_func + offset;$ WARNING: please, no spaces at the start of a line #178: FILE: kernel/bpf/syscall.c:6067: + return (unsigned long)patch_prog->aux->func[subprog]->bpf_func + offset;$ ERROR: code indent should use tabs where possible #179: FILE: kernel/bpf/syscall.c:6068: + }$ WARNING: please, no spaces at the start of a line #179: FILE: kernel/bpf/syscall.c:6068: + }$ ERROR: code indent should use tabs where possible #180: FILE: kernel/bpf/syscall.c:6069: + }$ WARNING: please, no spaces at the start of a line #180: FILE: kernel/bpf/syscall.c:6069: + }$ CHECK: Please don't use multiple blank lines #185: FILE: kernel/bpf/syscall.c:6074: + + ERROR: space required before the open parenthesis '(' #198: FILE: kernel/bpf/syscall.c:6087: + if(!per_cpu_flag_is_true(prog->termination_states, cpu_id)) WARNING: Missing a blank line after declarations #219: FILE: kernel/bpf/syscall.c:6108: + unsigned long stack_addr = regs->sp; + while (addr) { WARNING: braces {} are not necessary for single statement blocks #221: FILE: kernel/bpf/syscall.c:6110: + while (*(unsigned long *)stack_addr != addr) { + stack_addr += 1; + } WARNING: line length of 85 exceeds 80 columns #224: FILE: kernel/bpf/syscall.c:6113: + new_addr = find_offset_in_patch_prog(patch_prog, prog, addr); WARNING: line length of 82 exceeds 80 columns #230: FILE: kernel/bpf/syscall.c:6119: + * Could be modular and later extended to other iterators. WARNING: line length of 88 exceeds 80 columns #232: FILE: kernel/bpf/syscall.c:6121: + const char *name = kallsyms_lookup(addr, NULL, NULL, NULL, str); WARNING: Missing a blank line after declarations #233: FILE: kernel/bpf/syscall.c:6122: + const char *name = kallsyms_lookup(addr, NULL, NULL, NULL, str); + if (name) { WARNING: line length of 87 exceeds 80 columns #234: FILE: kernel/bpf/syscall.c:6123: + unsigned long lookup_addr = kallsyms_lookup_name(name); WARNING: line length of 82 exceeds 80 columns #235: FILE: kernel/bpf/syscall.c:6124: + if (lookup_addr && lookup_addr == bpf_loop_addr) { WARNING: Missing a blank line after declarations #235: FILE: kernel/bpf/syscall.c:6124: + unsigned long lookup_addr = kallsyms_lookup_name(name); + if (lookup_addr && lookup_addr == bpf_loop_addr) { WARNING: line length of 86 exceeds 80 columns #236: FILE: kernel/bpf/syscall.c:6125: + while (*(unsigned long *)stack_addr != addr) { WARNING: braces {} are not necessary for single statement blocks #236: FILE: kernel/bpf/syscall.c:6125: + while (*(unsigned long *)stack_addr != addr) { + stack_addr += 1; + } WARNING: line length of 90 exceeds 80 columns #239: FILE: kernel/bpf/syscall.c:6128: + *(unsigned long *)stack_addr = bpf_loop_term_addr; WARNING: void function return statements are not generally useful #250: FILE: kernel/bpf/syscall.c:6139: + return; +} WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP #264: FILE: kernel/bpf/syscall.c:6153: + return -ENOTSUPP; WARNING: usage of NR_CPUS is often wrong - consider using cpu_possible(), num_possible_cpus(), for_each_possible_cpu(), etc #267: FILE: kernel/bpf/syscall.c:6156: + if (cpu_id < 0 && cpu_id >= NR_CPUS) WARNING: line length of 89 exceeds 80 columns #308: FILE: kernel/smp.c:53: +static void __flush_smp_call_function_queue(struct pt_regs *regs, bool warn_cpu_offline); WARNING: line length of 88 exceeds 80 columns #344: FILE: kernel/smp.c:476: +static void __flush_smp_call_function_queue(struct pt_regs *regs, bool warn_cpu_offline) WARNING: Missing a blank line after declarations #355: FILE: kernel/smp.c:544: + struct bpf_prog *prog = (struct bpf_prog *)info; + prog->termination_states-> WARNING: Avoid multiple line dereference - prefer 'prog->termination_states->pre_execution_state[cpu_id]' #356: FILE: kernel/smp.c:545: + prog->termination_states-> + pre_execution_state[cpu_id] = *regs; total: 39 errors, 65 warnings, 15 checks, 317 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 f6913f31413b ("bpf: Runtime part of fast-path termination approach") 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.