[PATCH] rethook: add riscv rethook implementation.

kernel test robot lkp at intel.com
Thu Sep 22 03:23:53 PDT 2022


Hi Binglei,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on rostedt-trace/for-next]
[also build test ERROR on linus/master v6.0-rc6 next-20220921]
[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/Binglei-Wang/rethook-add-riscv-rethook-implementation/20220922-120748
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git for-next
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20220922/202209221828.DpzmggxE-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 12.1.0
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/3f86f610d114317cd7f7a7a1c9116fa0b916667a
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Binglei-Wang/rethook-add-riscv-rethook-implementation/20220922-120748
        git checkout 3f86f610d114317cd7f7a7a1c9116fa0b916667a
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash arch/s390/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp at intel.com>

All errors (new ones prefixed by >>):

   In file included from arch/s390/kernel/kprobes.c:13:
   include/linux/kprobes.h: In function 'arch_prepare_kretprobe':
   include/linux/kprobes.h:225:47: error: 'struct pt_regs' has no member named 'ra'
     225 |         ri->ret_addr = (kprobe_opcode_t *)regs->ra;
         |                                               ^~
   include/linux/kprobes.h:227:13: error: 'struct pt_regs' has no member named 'ra'
     227 |         regs->ra = (unsigned long) &__kretprobe_trampoline;
         |             ^~
   arch/s390/kernel/kprobes.c: At top level:
>> arch/s390/kernel/kprobes.c:285:6: error: redefinition of 'arch_prepare_kretprobe'
     285 | void arch_prepare_kretprobe(struct kretprobe_instance *ri, struct pt_regs *regs)
         |      ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/kprobes.h:222:29: note: previous definition of 'arch_prepare_kretprobe' with type 'void(struct kretprobe_instance *, struct pt_regs *)'
     222 | static nokprobe_inline void arch_prepare_kretprobe(struct kretprobe_instance *ri,
         |                             ^~~~~~~~~~~~~~~~~~~~~~


vim +/arch_prepare_kretprobe +285 arch/s390/kernel/kprobes.c

4ba069b802c29e Michael Grundy   2006-09-20  284  
7a5388de5c70f7 Heiko Carstens   2014-10-22 @285  void arch_prepare_kretprobe(struct kretprobe_instance *ri, struct pt_regs *regs)
4ba069b802c29e Michael Grundy   2006-09-20  286  {
4ba069b802c29e Michael Grundy   2006-09-20  287  	ri->ret_addr = (kprobe_opcode_t *)regs->gprs[14];
09bc20c8fb35cf Vasily Gorbik    2022-03-05  288  	ri->fp = (void *)regs->gprs[15];
4ba069b802c29e Michael Grundy   2006-09-20  289  
4ba069b802c29e Michael Grundy   2006-09-20  290  	/* Replace the return addr with trampoline addr */
adf8a61a940c49 Masami Hiramatsu 2021-09-14  291  	regs->gprs[14] = (unsigned long)&__kretprobe_trampoline;
4ba069b802c29e Michael Grundy   2006-09-20  292  }
7a5388de5c70f7 Heiko Carstens   2014-10-22  293  NOKPROBE_SYMBOL(arch_prepare_kretprobe);
4ba069b802c29e Michael Grundy   2006-09-20  294  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp



More information about the linux-riscv mailing list