Hi Song, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v6.1-rc7 next-20221130] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Song-Chen/reorganize-trace_peobe_tmpl-h/20221124-144203 patch link: https://lore.kernel.org/r/1669190524-2894-1-git-send-email-chensong_2000%40189.cn patch subject: [PATCH v2 2/2] kernel/trace: Provide default impelentations defined in trace_probe_tmpl.h config: hexagon-randconfig-r011-20221128 compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 6e4cea55f0d1104408b26ac574566a0e4de48036) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/596b7db0e6685dbed21d4ae5c27492c1d12ab090 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Song-Chen/reorganize-trace_peobe_tmpl-h/20221124-144203 git checkout 596b7db0e6685dbed21d4ae5c27492c1d12ab090 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash kernel/trace/ net/smc/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All errors (new ones prefixed by >>): In file included from kernel/trace/trace_events_synth.c:18: In file included from include/linux/trace_events.h:9: In file included from include/linux/hardirq.h:11: In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/hexagon/include/asm/io.h:334: include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __raw_readb(PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu' #define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) ^ In file included from kernel/trace/trace_events_synth.c:18: In file included from include/linux/trace_events.h:9: In file included from include/linux/hardirq.h:11: In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/hexagon/include/asm/io.h:334: include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu' #define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) ^ In file included from kernel/trace/trace_events_synth.c:18: In file included from include/linux/trace_events.h:9: In file included from include/linux/hardirq.h:11: In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/hexagon/include/asm/io.h:334: include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writeb(value, PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ In file included from kernel/trace/trace_events_synth.c:22: >> kernel/trace/trace_probe_kernel.h:203:9: error: call to undeclared function 'regs_get_register'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] val = regs_get_register(regs, code->param); ^ kernel/trace/trace_probe_kernel.h:203:9: note: did you mean 'kset_register'? include/linux/kobject.h:180:25: note: 'kset_register' declared here extern int __must_check kset_register(struct kset *kset); ^ In file included from kernel/trace/trace_events_synth.c:22: >> kernel/trace/trace_probe_kernel.h:206:9: error: call to undeclared function 'regs_get_kernel_stack_nth'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] val = regs_get_kernel_stack_nth(regs, code->param); ^ >> kernel/trace/trace_probe_kernel.h:209:9: error: call to undeclared function 'kernel_stack_pointer'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] val = kernel_stack_pointer(regs); ^ >> kernel/trace/trace_probe_kernel.h:212:9: error: call to undeclared function 'regs_return_value'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] val = regs_return_value(regs); ^ 6 warnings and 4 errors generated. vim +/regs_get_register +203 kernel/trace/trace_probe_kernel.h 190 191 /* Note that we don't verify it, since the code does not come from user space */ 192 static int 193 process_fetch_insn(struct fetch_insn *code, void *rec, void *dest, 194 void *base) 195 { 196 struct pt_regs *regs = rec; 197 unsigned long val; 198 199 retry: 200 /* 1st stage: get value from context */ 201 switch (code->op) { 202 case FETCH_OP_REG: > 203 val = regs_get_register(regs, code->param); 204 break; 205 case FETCH_OP_STACK: > 206 val = regs_get_kernel_stack_nth(regs, code->param); 207 break; 208 case FETCH_OP_STACKP: > 209 val = kernel_stack_pointer(regs); 210 break; 211 case FETCH_OP_RETVAL: > 212 val = regs_return_value(regs); 213 break; 214 case FETCH_OP_IMM: 215 val = code->immediate; 216 break; 217 case FETCH_OP_COMM: 218 val = (unsigned long)current->comm; 219 break; 220 case FETCH_OP_DATA: 221 val = (unsigned long)code->data; 222 break; 223 #ifdef CONFIG_HAVE_FUNCTION_ARG_ACCESS_API 224 case FETCH_OP_ARG: 225 val = regs_get_kernel_argument(regs, code->param); 226 break; 227 #endif 228 case FETCH_NOP_SYMBOL: /* Ignore a place holder */ 229 code++; 230 goto retry; 231 case FETCH_OP_TP_ARG: 232 val = get_event_field(code, rec); 233 break; 234 default: 235 return -EILSEQ; 236 } 237 code++; 238 239 return process_fetch_insn_bottom(code, val, dest, base); 240 } 241 NOKPROBE_SYMBOL(process_fetch_insn) 242 -- 0-DAY CI Kernel Test Service https://01.org/lkp