lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Sat, 30 Apr 2022 21:08:06 +0800
From:   kernel test robot <lkp@...el.com>
To:     Guo Ren <guoren@...ux.alibaba.com>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        GNU/Weeb Mailing List <gwml@...r.gnuweeb.org>,
        linux-kernel@...r.kernel.org, Palmer Dabbelt <palmer@...osinc.com>,
        Arnd Bergmann <arnd@...db.de>
Subject: [ammarfaizi2-block:palmer/linux/riscv-compat 20/20]
 arch/riscv/kernel/compat_signal.c:198:5: warning: no previous prototype for
 function 'compat_setup_rt_frame'

tree:   https://github.com/ammarfaizi2/linux-block palmer/linux/riscv-compat
head:   e2009fdf858d6fe01f0b24e35d8347fc8da3210f
commit: e2009fdf858d6fe01f0b24e35d8347fc8da3210f [20/20] riscv: compat: Add COMPAT Kbuild skeletal support
config: riscv-randconfig-r042-20220428 (https://download.01.org/0day-ci/archive/20220430/202204302108.jfVPwbXj-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 400775649969b9baf3bc2a510266e7912bb16ae9)
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
        # install riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # https://github.com/ammarfaizi2/linux-block/commit/e2009fdf858d6fe01f0b24e35d8347fc8da3210f
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block palmer/linux/riscv-compat
        git checkout e2009fdf858d6fe01f0b24e35d8347fc8da3210f
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash arch/riscv/kernel/

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

All warnings (new ones prefixed by >>):

>> arch/riscv/kernel/compat_signal.c:198:5: warning: no previous prototype for function 'compat_setup_rt_frame' [-Wmissing-prototypes]
   int compat_setup_rt_frame(struct ksignal *ksig, sigset_t *set,
       ^
   arch/riscv/kernel/compat_signal.c:198:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int compat_setup_rt_frame(struct ksignal *ksig, sigset_t *set,
   ^
   static 
   1 warning generated.


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

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

:::::: The code at line 198 was first introduced by commit
:::::: 44be29735fe7065c7d32d1d2cc26b68487ac07b6 riscv: compat: signal: Add rt_frame implementation

:::::: TO: Guo Ren <guoren@...ux.alibaba.com>
:::::: CC: Palmer Dabbelt <palmer@...osinc.com>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ