From: kernel test robot <lkp@intel.com>
To: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [mhiramat:topic/fprobe-ftrace-regs 15/21] arch/s390/kernel/rethook.c:6:6: error: conflicting types for 'arch_rethook_prepare'; have 'void(struct rethook_node *, struct pt_regs *, bool)' {aka 'void(struct rethook_node *, struct pt_regs *, _Bool)'}
Date: Sat, 2 Sep 2023 05:57:16 +0800 [thread overview]
Message-ID: <202309020520.vTdgQezd-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mhiramat/linux.git topic/fprobe-ftrace-regs
head: 398bcb2fcb442bac23d5e514b6144ef4c32d74e8
commit: e86cf59b1f5e0e053bc45e73a72f11a73874ed83 [15/21] fprobe: rethook: Use ftrace_regs in fprobe exit handler and rethook
config: s390-defconfig (https://download.01.org/0day-ci/archive/20230902/202309020520.vTdgQezd-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230902/202309020520.vTdgQezd-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/202309020520.vTdgQezd-lkp@intel.com/
All errors (new ones prefixed by >>):
>> arch/s390/kernel/rethook.c:6:6: error: conflicting types for 'arch_rethook_prepare'; have 'void(struct rethook_node *, struct pt_regs *, bool)' {aka 'void(struct rethook_node *, struct pt_regs *, _Bool)'}
6 | void arch_rethook_prepare(struct rethook_node *rh, struct pt_regs *regs, bool mcount)
| ^~~~~~~~~~~~~~~~~~~~
In file included from arch/s390/kernel/rethook.c:2:
include/linux/rethook.h:73:6: note: previous declaration of 'arch_rethook_prepare' with type 'void(struct rethook_node *, struct ftrace_regs *, bool)' {aka 'void(struct rethook_node *, struct ftrace_regs *, _Bool)'}
73 | void arch_rethook_prepare(struct rethook_node *node, struct ftrace_regs *regs, bool mcount);
| ^~~~~~~~~~~~~~~~~~~~
>> arch/s390/kernel/rethook.c:16:6: error: conflicting types for 'arch_rethook_fixup_return'; have 'void(struct pt_regs *, long unsigned int)'
16 | void arch_rethook_fixup_return(struct pt_regs *regs,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/rethook.h:88:6: note: previous declaration of 'arch_rethook_fixup_return' with type 'void(struct ftrace_regs *, long unsigned int)'
88 | void arch_rethook_fixup_return(struct ftrace_regs *regs,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
arch/s390/kernel/rethook.c: In function 'arch_rethook_trampoline_callback':
>> arch/s390/kernel/rethook.c:29:43: error: passing argument 1 of 'rethook_trampoline_handler' from incompatible pointer type [-Werror=incompatible-pointer-types]
29 | return rethook_trampoline_handler(regs, regs->gprs[15]);
| ^~~~
| |
| struct pt_regs *
include/linux/rethook.h:92:62: note: expected 'struct ftrace_regs *' but argument is of type 'struct pt_regs *'
92 | unsigned long rethook_trampoline_handler(struct ftrace_regs *regs,
| ~~~~~~~~~~~~~~~~~~~~^~~~
cc1: some warnings being treated as errors
vim +6 arch/s390/kernel/rethook.c
1a280f48c0e403 Vasily Gorbik 2023-01-17 5
1a280f48c0e403 Vasily Gorbik 2023-01-17 @6 void arch_rethook_prepare(struct rethook_node *rh, struct pt_regs *regs, bool mcount)
1a280f48c0e403 Vasily Gorbik 2023-01-17 7 {
1a280f48c0e403 Vasily Gorbik 2023-01-17 8 rh->ret_addr = regs->gprs[14];
1a280f48c0e403 Vasily Gorbik 2023-01-17 9 rh->frame = regs->gprs[15];
1a280f48c0e403 Vasily Gorbik 2023-01-17 10
1a280f48c0e403 Vasily Gorbik 2023-01-17 11 /* Replace the return addr with trampoline addr */
1a280f48c0e403 Vasily Gorbik 2023-01-17 12 regs->gprs[14] = (unsigned long)&arch_rethook_trampoline;
1a280f48c0e403 Vasily Gorbik 2023-01-17 13 }
1a280f48c0e403 Vasily Gorbik 2023-01-17 14 NOKPROBE_SYMBOL(arch_rethook_prepare);
1a280f48c0e403 Vasily Gorbik 2023-01-17 15
1a280f48c0e403 Vasily Gorbik 2023-01-17 @16 void arch_rethook_fixup_return(struct pt_regs *regs,
1a280f48c0e403 Vasily Gorbik 2023-01-17 17 unsigned long correct_ret_addr)
1a280f48c0e403 Vasily Gorbik 2023-01-17 18 {
1a280f48c0e403 Vasily Gorbik 2023-01-17 19 /* Replace fake return address with real one. */
1a280f48c0e403 Vasily Gorbik 2023-01-17 20 regs->gprs[14] = correct_ret_addr;
1a280f48c0e403 Vasily Gorbik 2023-01-17 21 }
1a280f48c0e403 Vasily Gorbik 2023-01-17 22 NOKPROBE_SYMBOL(arch_rethook_fixup_return);
1a280f48c0e403 Vasily Gorbik 2023-01-17 23
1a280f48c0e403 Vasily Gorbik 2023-01-17 24 /*
1a280f48c0e403 Vasily Gorbik 2023-01-17 25 * Called from arch_rethook_trampoline
1a280f48c0e403 Vasily Gorbik 2023-01-17 26 */
1a280f48c0e403 Vasily Gorbik 2023-01-17 27 unsigned long arch_rethook_trampoline_callback(struct pt_regs *regs)
1a280f48c0e403 Vasily Gorbik 2023-01-17 28 {
1a280f48c0e403 Vasily Gorbik 2023-01-17 @29 return rethook_trampoline_handler(regs, regs->gprs[15]);
1a280f48c0e403 Vasily Gorbik 2023-01-17 30 }
1a280f48c0e403 Vasily Gorbik 2023-01-17 31 NOKPROBE_SYMBOL(arch_rethook_trampoline_callback);
1a280f48c0e403 Vasily Gorbik 2023-01-17 32
:::::: The code at line 6 was first introduced by commit
:::::: 1a280f48c0e403903cf0b4231c95b948e664f25a s390/kprobes: replace kretprobe with rethook
:::::: TO: Vasily Gorbik <gor@linux.ibm.com>
:::::: CC: Heiko Carstens <hca@linux.ibm.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-09-01 21:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202309020520.vTdgQezd-lkp@intel.com \
--to=lkp@intel.com \
--cc=mhiramat@kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.