All of lore.kernel.org
 help / color / mirror / Atom feed
* [csky-linux:riscv_compat_v1 12/13] arch/riscv/kernel/compat_signal.c:199:5: warning: no previous prototype for 'compat_setup_rt_frame'
@ 2021-12-22  7:54 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-12-22  7:54 UTC (permalink / raw)
  To: Guo Ren; +Cc: kbuild-all, linux-kernel

tree:   https://github.com/c-sky/csky-linux riscv_compat_v1
head:   60f122c486d0c1c8b30e0b264c215db4a5a0124d
commit: 341104ec427222e0500c50837a7661fb57e42c0f [12/13] riscv: compat: signal: Add rt_frame implementation
config: riscv-allyesconfig (https://download.01.org/0day-ci/archive/20211222/202112221514.cPqrnZR0-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/c-sky/csky-linux/commit/341104ec427222e0500c50837a7661fb57e42c0f
        git remote add csky-linux https://github.com/c-sky/csky-linux
        git fetch --no-tags csky-linux riscv_compat_v1
        git checkout 341104ec427222e0500c50837a7661fb57e42c0f
        # 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

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

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [csky-linux:riscv_compat_v1 12/13] arch/riscv/kernel/compat_signal.c:199:5: warning: no previous prototype for 'compat_setup_rt_frame'
@ 2021-12-22  7:54 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-12-22  7:54 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3292 bytes --]

tree:   https://github.com/c-sky/csky-linux riscv_compat_v1
head:   60f122c486d0c1c8b30e0b264c215db4a5a0124d
commit: 341104ec427222e0500c50837a7661fb57e42c0f [12/13] riscv: compat: signal: Add rt_frame implementation
config: riscv-allyesconfig (https://download.01.org/0day-ci/archive/20211222/202112221514.cPqrnZR0-lkp(a)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/c-sky/csky-linux/commit/341104ec427222e0500c50837a7661fb57e42c0f
        git remote add csky-linux https://github.com/c-sky/csky-linux
        git fetch --no-tags csky-linux riscv_compat_v1
        git checkout 341104ec427222e0500c50837a7661fb57e42c0f
        # 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

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

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-22  7:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-22  7:54 [csky-linux:riscv_compat_v1 12/13] arch/riscv/kernel/compat_signal.c:199:5: warning: no previous prototype for 'compat_setup_rt_frame' kernel test robot
2021-12-22  7:54 ` kernel test robot

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.