* Re: [RFC PATCH 2/5] fprobe: rethook: Use fprobe_regs in fprobe exit handler and rethook
[not found] <169124749229.186149.1426658495303367593.stgit@devnote2>
@ 2023-08-05 18:08 ` kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-08-05 18:08 UTC (permalink / raw)
To: Masami Hiramatsu (Google); +Cc: llvm, oe-kbuild-all
Hi Masami,
[This is a private test report for your RFC patch.]
kernel test robot noticed the following build errors:
[auto build test ERROR on bpf-next/master]
[also build test ERROR on bpf/master tip/x86/core linus/master v6.5-rc4 next-20230804]
[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/Masami-Hiramatsu-Google/fprobe-Use-fprobe_regs-in-fprobe-entry-handler/20230805-230025
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link: https://lore.kernel.org/r/169124749229.186149.1426658495303367593.stgit%40devnote2
patch subject: [RFC PATCH 2/5] fprobe: rethook: Use fprobe_regs in fprobe exit handler and rethook
config: i386-randconfig-r014-20230805 (https://download.01.org/0day-ci/archive/20230806/202308060258.tcSDAfJA-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce: (https://download.01.org/0day-ci/archive/20230806/202308060258.tcSDAfJA-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308060258.tcSDAfJA-lkp@intel.com/
All errors (new ones prefixed by >>):
>> kernel/kprobes.c:2146:25: error: call to undeclared function 'ftrace_get_regs'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
struct pt_regs *regs = ftrace_get_regs(fregs);
^
>> kernel/kprobes.c:2146:18: error: incompatible integer to pointer conversion initializing 'struct pt_regs *' with an expression of type 'int' [-Wint-conversion]
struct pt_regs *regs = ftrace_get_regs(fregs);
^ ~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
--
>> arch/x86/kernel/rethook.c:111:25: error: call to undeclared function 'ftrace_get_regs'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
struct pt_regs *regs = ftrace_get_regs(fregs);
^
>> arch/x86/kernel/rethook.c:111:18: error: incompatible integer to pointer conversion initializing 'struct pt_regs *' with an expression of type 'int' [-Wint-conversion]
struct pt_regs *regs = ftrace_get_regs(fregs);
^ ~~~~~~~~~~~~~~~~~~~~~~
arch/x86/kernel/rethook.c:121:25: error: call to undeclared function 'ftrace_get_regs'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
struct pt_regs *regs = ftrace_get_regs(fregs);
^
arch/x86/kernel/rethook.c:121:18: error: incompatible integer to pointer conversion initializing 'struct pt_regs *' with an expression of type 'int' [-Wint-conversion]
struct pt_regs *regs = ftrace_get_regs(fregs);
^ ~~~~~~~~~~~~~~~~~~~~~~
4 errors generated.
--
>> kernel/trace/rethook.c:298:2: error: call to undeclared function 'ftrace_regs_set_instruction_pointer'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
ftrace_regs_set_instruction_pointer(fregs, correct_ret_addr);
^
1 error generated.
vim +/ftrace_get_regs +2146 kernel/kprobes.c
2140
2141 static void kretprobe_rethook_handler(struct rethook_node *rh, void *data,
2142 unsigned long ret_addr,
2143 struct ftrace_regs *fregs)
2144 {
2145 struct kretprobe *rp = (struct kretprobe *)data;
> 2146 struct pt_regs *regs = ftrace_get_regs(fregs);
2147 struct kretprobe_instance *ri;
2148 struct kprobe_ctlblk *kcb;
2149
2150 /* This is bug because this depends on HAVE_PT_REGS_COMPAT_FTRACE_REGS */
2151 if (WARN_ON_ONCE(!regs))
2152 return;
2153
2154 /* The data must NOT be null. This means rethook data structure is broken. */
2155 if (WARN_ON_ONCE(!data) || !rp->handler)
2156 return;
2157
2158 __this_cpu_write(current_kprobe, &rp->kp);
2159 kcb = get_kprobe_ctlblk();
2160 kcb->kprobe_status = KPROBE_HIT_ACTIVE;
2161
2162 ri = container_of(rh, struct kretprobe_instance, node);
2163 rp->handler(ri, regs);
2164
2165 __this_cpu_write(current_kprobe, NULL);
2166 }
2167 NOKPROBE_SYMBOL(kretprobe_rethook_handler);
2168
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-08-05 18:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <169124749229.186149.1426658495303367593.stgit@devnote2>
2023-08-05 18:08 ` [RFC PATCH 2/5] fprobe: rethook: Use fprobe_regs in fprobe exit handler and rethook kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox