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, linux-kernel@vger.kernel.org
Subject: [csky-linux:riscv_compat_v1 12/13] arch/riscv/kernel/compat_signal.c:199:5: warning: no previous prototype for 'compat_setup_rt_frame'
Date: Wed, 22 Dec 2021 15:54:25 +0800	[thread overview]
Message-ID: <202112221514.cPqrnZR0-lkp@intel.com> (raw)

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

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [csky-linux:riscv_compat_v1 12/13] arch/riscv/kernel/compat_signal.c:199:5: warning: no previous prototype for 'compat_setup_rt_frame'
Date: Wed, 22 Dec 2021 15:54:25 +0800	[thread overview]
Message-ID: <202112221514.cPqrnZR0-lkp@intel.com> (raw)

[-- 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

             reply	other threads:[~2021-12-22  7:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-22  7:54 kernel test robot [this message]
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

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=202112221514.cPqrnZR0-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=guoren@linux.alibaba.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.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.