GNU/Weeb Mailing List <[email protected]>
 help / color / mirror / Atom feed
* [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'
@ 2022-03-08  9:19 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-03-08  9:19 UTC (permalink / raw)
  To: Guo Ren
  Cc: kbuild-all, GNU/Weeb Mailing List, linux-kernel, Palmer Dabbelt,
	Arnd Bergmann

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/[email protected]/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 <[email protected]>

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 <[email protected]>
:::::: CC: Palmer Dabbelt <[email protected]>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-08  9:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-08  9:19 [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' 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