All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Guo Ren <guoren@linux.alibaba.com>
Cc: kbuild-all@lists.01.org,
	GNU/Weeb Mailing List <gwml@vger.gnuweeb.org>,
	linux-kernel@vger.kernel.org,
	Palmer Dabbelt <palmer@rivosinc.com>,
	Arnd Bergmann <arnd@arndb.de>
Subject: [ammarfaizi2-block:palmer/linux/riscv-compat 20/20] arch/riscv/kernel/compat_signal.c:199:5: warning: no previous prototype for 'compat_setup_rt_frame'
Date: Tue, 8 Mar 2022 17:19:30 +0800	[thread overview]
Message-ID: <202203081736.viunH1fl-lkp@intel.com> (raw)

tree:   https://github.com/ammarfaizi2/linux-block palmer/linux/riscv-compat
head:   ab7e33a6b819f009c3c9ccf69b2f44c1ad84a5a0
commit: ab7e33a6b819f009c3c9ccf69b2f44c1ad84a5a0 [20/20] riscv: compat: Add COMPAT Kbuild skeletal support
config: riscv-allyesconfig (https://download.01.org/0day-ci/archive/20220308/202203081736.viunH1fl-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 11.2.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/ammarfaizi2/linux-block/commit/ab7e33a6b819f009c3c9ccf69b2f44c1ad84a5a0
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block palmer/linux/riscv-compat
        git checkout ab7e33a6b819f009c3c9ccf69b2f44c1ad84a5a0
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=riscv SHELL=/bin/bash arch/riscv/kernel/ arch/riscv/mm/

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/riscv/kernel/compat_signal.c:199:5: warning: no previous prototype for 'compat_setup_rt_frame' [-Wmissing-prototypes]
     199 | int compat_setup_rt_frame(struct ksignal *ksig, sigset_t *set,
         |     ^~~~~~~~~~~~~~~~~~~~~


vim +/compat_setup_rt_frame +199 arch/riscv/kernel/compat_signal.c

7fbcda00016ec9 Guo Ren 2022-02-28  198  
7fbcda00016ec9 Guo Ren 2022-02-28 @199  int compat_setup_rt_frame(struct ksignal *ksig, sigset_t *set,
7fbcda00016ec9 Guo Ren 2022-02-28  200  	struct pt_regs *regs)
7fbcda00016ec9 Guo Ren 2022-02-28  201  {
7fbcda00016ec9 Guo Ren 2022-02-28  202  	struct compat_rt_sigframe __user *frame;
7fbcda00016ec9 Guo Ren 2022-02-28  203  	long err = 0;
7fbcda00016ec9 Guo Ren 2022-02-28  204  
7fbcda00016ec9 Guo Ren 2022-02-28  205  	frame = compat_get_sigframe(ksig, regs, sizeof(*frame));
7fbcda00016ec9 Guo Ren 2022-02-28  206  	if (!access_ok(frame, sizeof(*frame)))
7fbcda00016ec9 Guo Ren 2022-02-28  207  		return -EFAULT;
7fbcda00016ec9 Guo Ren 2022-02-28  208  
7fbcda00016ec9 Guo Ren 2022-02-28  209  	err |= copy_siginfo_to_user32(&frame->info, &ksig->info);
7fbcda00016ec9 Guo Ren 2022-02-28  210  
7fbcda00016ec9 Guo Ren 2022-02-28  211  	/* Create the ucontext. */
7fbcda00016ec9 Guo Ren 2022-02-28  212  	err |= __put_user(0, &frame->uc.uc_flags);
7fbcda00016ec9 Guo Ren 2022-02-28  213  	err |= __put_user(NULL, &frame->uc.uc_link);
7fbcda00016ec9 Guo Ren 2022-02-28  214  	err |= __compat_save_altstack(&frame->uc.uc_stack, regs->sp);
7fbcda00016ec9 Guo Ren 2022-02-28  215  	err |= compat_setup_sigcontext(frame, regs);
7fbcda00016ec9 Guo Ren 2022-02-28  216  	err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
7fbcda00016ec9 Guo Ren 2022-02-28  217  	if (err)
7fbcda00016ec9 Guo Ren 2022-02-28  218  		return -EFAULT;
7fbcda00016ec9 Guo Ren 2022-02-28  219  
7fbcda00016ec9 Guo Ren 2022-02-28  220  	regs->ra = (unsigned long)COMPAT_VDSO_SYMBOL(
7fbcda00016ec9 Guo Ren 2022-02-28  221  			current->mm->context.vdso, rt_sigreturn);
7fbcda00016ec9 Guo Ren 2022-02-28  222  
7fbcda00016ec9 Guo Ren 2022-02-28  223  	/*
7fbcda00016ec9 Guo Ren 2022-02-28  224  	 * Set up registers for signal handler.
7fbcda00016ec9 Guo Ren 2022-02-28  225  	 * Registers that we don't modify keep the value they had from
7fbcda00016ec9 Guo Ren 2022-02-28  226  	 * user-space at the time we took the signal.
7fbcda00016ec9 Guo Ren 2022-02-28  227  	 * We always pass siginfo and mcontext, regardless of SA_SIGINFO,
7fbcda00016ec9 Guo Ren 2022-02-28  228  	 * since some things rely on this (e.g. glibc's debug/segfault.c).
7fbcda00016ec9 Guo Ren 2022-02-28  229  	 */
7fbcda00016ec9 Guo Ren 2022-02-28  230  	regs->epc = (unsigned long)ksig->ka.sa.sa_handler;
7fbcda00016ec9 Guo Ren 2022-02-28  231  	regs->sp = (unsigned long)frame;
7fbcda00016ec9 Guo Ren 2022-02-28  232  	regs->a0 = ksig->sig;                     /* a0: signal number */
7fbcda00016ec9 Guo Ren 2022-02-28  233  	regs->a1 = (unsigned long)(&frame->info); /* a1: siginfo pointer */
7fbcda00016ec9 Guo Ren 2022-02-28  234  	regs->a2 = (unsigned long)(&frame->uc);   /* a2: ucontext pointer */
7fbcda00016ec9 Guo Ren 2022-02-28  235  

:::::: The code at line 199 was first introduced by commit
:::::: 7fbcda00016ec95ced8262fb949bead0549c9727 riscv: compat: signal: Add rt_frame implementation

:::::: TO: Guo Ren <guoren@linux.alibaba.com>
:::::: CC: Palmer Dabbelt <palmer@rivosinc.com>

---
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  9:20 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=202203081736.viunH1fl-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=arnd@arndb.de \
    --cc=guoren@linux.alibaba.com \
    --cc=gwml@vger.gnuweeb.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=palmer@rivosinc.com \
    /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.