All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org
Subject: [mhiramat:kprobes/fprobe 8/12] arch/x86/kernel/rethook.c:14:23: warning: no previous prototype for function 'arch_rethook_trampoline_callback'
Date: Wed, 9 Mar 2022 04:36:08 +0800	[thread overview]
Message-ID: <202203090445.eMw6Gp37-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mhiramat/linux.git kprobes/fprobe
head:   0bd36e652ac2be74b19f414d0b20aaef6521ac82
commit: 23f61cf25dd4c1cf50adce7ebe0e2ae65bef5b78 [8/12] fprobe: Add exit_handler support
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20220309/202203090445.eMw6Gp37-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 4e115b7d881136947c083e12f62010bc6b1d3f00)
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://git.kernel.org/pub/scm/linux/kernel/git/mhiramat/linux.git/commit/?id=23f61cf25dd4c1cf50adce7ebe0e2ae65bef5b78
        git remote add mhiramat https://git.kernel.org/pub/scm/linux/kernel/git/mhiramat/linux.git
        git fetch --no-tags mhiramat kprobes/fprobe
        git checkout 23f61cf25dd4c1cf50adce7ebe0e2ae65bef5b78
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/kernel/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> arch/x86/kernel/rethook.c:14:23: warning: no previous prototype for function 'arch_rethook_trampoline_callback' [-Wmissing-prototypes]
   __used __visible void arch_rethook_trampoline_callback(struct pt_regs *regs)
                         ^
   arch/x86/kernel/rethook.c:14:18: note: declare 'static' if the function is not intended to be used outside of this translation unit
   __used __visible void arch_rethook_trampoline_callback(struct pt_regs *regs)
                    ^
                    static 
   1 warning generated.


vim +/arch_rethook_trampoline_callback +14 arch/x86/kernel/rethook.c

31ffbcef413de8 Masami Hiramatsu 2022-02-09  10  
31ffbcef413de8 Masami Hiramatsu 2022-02-09  11  /*
31ffbcef413de8 Masami Hiramatsu 2022-02-09  12   * Called from arch_rethook_trampoline
31ffbcef413de8 Masami Hiramatsu 2022-02-09  13   */
31ffbcef413de8 Masami Hiramatsu 2022-02-09 @14  __used __visible void arch_rethook_trampoline_callback(struct pt_regs *regs)
31ffbcef413de8 Masami Hiramatsu 2022-02-09  15  {
31ffbcef413de8 Masami Hiramatsu 2022-02-09  16  	unsigned long *frame_pointer;
31ffbcef413de8 Masami Hiramatsu 2022-02-09  17  
31ffbcef413de8 Masami Hiramatsu 2022-02-09  18  	/* fixup registers */
31ffbcef413de8 Masami Hiramatsu 2022-02-09  19  	regs->cs = __KERNEL_CS;
31ffbcef413de8 Masami Hiramatsu 2022-02-09  20  #ifdef CONFIG_X86_32
31ffbcef413de8 Masami Hiramatsu 2022-02-09  21  	regs->gs = 0;
31ffbcef413de8 Masami Hiramatsu 2022-02-09  22  #endif
31ffbcef413de8 Masami Hiramatsu 2022-02-09  23  	regs->ip = (unsigned long)&arch_rethook_trampoline;
31ffbcef413de8 Masami Hiramatsu 2022-02-09  24  	regs->orig_ax = ~0UL;
31ffbcef413de8 Masami Hiramatsu 2022-02-09  25  	regs->sp += sizeof(long);
31ffbcef413de8 Masami Hiramatsu 2022-02-09  26  	frame_pointer = &regs->sp + 1;
31ffbcef413de8 Masami Hiramatsu 2022-02-09  27  
31ffbcef413de8 Masami Hiramatsu 2022-02-09  28  	/*
31ffbcef413de8 Masami Hiramatsu 2022-02-09  29  	 * The return address at 'frame_pointer' is recovered by the
31ffbcef413de8 Masami Hiramatsu 2022-02-09  30  	 * arch_rethook_fixup_return() which called from this
31ffbcef413de8 Masami Hiramatsu 2022-02-09  31  	 * rethook_trampoline_handler().
31ffbcef413de8 Masami Hiramatsu 2022-02-09  32  	 */
31ffbcef413de8 Masami Hiramatsu 2022-02-09  33  	rethook_trampoline_handler(regs, (unsigned long)frame_pointer);
31ffbcef413de8 Masami Hiramatsu 2022-02-09  34  
31ffbcef413de8 Masami Hiramatsu 2022-02-09  35  	/*
31ffbcef413de8 Masami Hiramatsu 2022-02-09  36  	 * Copy FLAGS to 'pt_regs::sp' so that arch_rethook_trapmoline()
31ffbcef413de8 Masami Hiramatsu 2022-02-09  37  	 * can do RET right after POPF.
31ffbcef413de8 Masami Hiramatsu 2022-02-09  38  	 */
31ffbcef413de8 Masami Hiramatsu 2022-02-09  39  	regs->sp = regs->flags;
31ffbcef413de8 Masami Hiramatsu 2022-02-09  40  }
31ffbcef413de8 Masami Hiramatsu 2022-02-09  41  NOKPROBE_SYMBOL(arch_rethook_trampoline_callback);
31ffbcef413de8 Masami Hiramatsu 2022-02-09  42  

:::::: The code at line 14 was first introduced by commit
:::::: 31ffbcef413de82a1b0afc177b5d85364495f0cd rethook: x86: Add rethook x86 implementation

:::::: TO: Masami Hiramatsu <mhiramat@kernel.org>
:::::: CC: Masami Hiramatsu <mhiramat@kernel.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

                 reply	other threads:[~2022-03-08 20:37 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=202203090445.eMw6Gp37-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=mhiramat@kernel.org \
    /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.