Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [linux-next:master 3551/8679] arch/riscv/kernel/compat_signal.c:220:28: error: use of undeclared identifier 'compat__vdso_rt_sigreturn_offset'
@ 2025-05-07  7:31 kernel test robot
  2025-05-08 16:33 ` Nathan Chancellor
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2025-05-07  7:31 UTC (permalink / raw)
  To: Xi Ruoyao; +Cc: llvm, oe-kbuild-all, Palmer Dabbelt

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   0a00723f4c2d0b273edd0737f236f103164a08eb
commit: 89079520cef65d6da1e864eab4464effe5396e23 [3551/8679] RISC-V: vDSO: Wire up getrandom() vDSO implementation
config: riscv-defconfig (https://download.01.org/0day-ci/archive/20250507/202505071542.jdBqsSPB-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project f819f46284f2a79790038e1f6649172789734ae8)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250507/202505071542.jdBqsSPB-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202505071542.jdBqsSPB-lkp@intel.com/

All errors (new ones prefixed by >>):

>> arch/riscv/kernel/compat_signal.c:220:28: error: use of undeclared identifier 'compat__vdso_rt_sigreturn_offset'
     220 |         regs->ra = (unsigned long)COMPAT_VDSO_SYMBOL(
         |                                   ^
   arch/riscv/include/asm/vdso.h:29:42: note: expanded from macro 'COMPAT_VDSO_SYMBOL'
      29 |         (void __user *)((unsigned long)(base) + compat__vdso_##name##_offset)
         |                                                 ^
   <scratch space>:315:1: note: expanded from here
     315 | compat__vdso_rt_sigreturn_offset
         | ^
   1 error generated.


vim +/compat__vdso_rt_sigreturn_offset +220 arch/riscv/kernel/compat_signal.c

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

:::::: The code at line 220 was first introduced by commit
:::::: 7383ee05314be58f8f9f018ee0ac53bef3808aea 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
https://github.com/intel/lkp-tests/wiki

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

* Re: [linux-next:master 3551/8679] arch/riscv/kernel/compat_signal.c:220:28: error: use of undeclared identifier 'compat__vdso_rt_sigreturn_offset'
  2025-05-07  7:31 [linux-next:master 3551/8679] arch/riscv/kernel/compat_signal.c:220:28: error: use of undeclared identifier 'compat__vdso_rt_sigreturn_offset' kernel test robot
@ 2025-05-08 16:33 ` Nathan Chancellor
  0 siblings, 0 replies; 2+ messages in thread
From: Nathan Chancellor @ 2025-05-08 16:33 UTC (permalink / raw)
  To: kernel test robot; +Cc: Xi Ruoyao, llvm, oe-kbuild-all, Palmer Dabbelt

On Wed, May 07, 2025 at 03:31:13PM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   0a00723f4c2d0b273edd0737f236f103164a08eb
> commit: 89079520cef65d6da1e864eab4464effe5396e23 [3551/8679] RISC-V: vDSO: Wire up getrandom() vDSO implementation
> config: riscv-defconfig (https://download.01.org/0day-ci/archive/20250507/202505071542.jdBqsSPB-lkp@intel.com/config)
> compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project f819f46284f2a79790038e1f6649172789734ae8)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250507/202505071542.jdBqsSPB-lkp@intel.com/reproduce)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202505071542.jdBqsSPB-lkp@intel.com/
> 
> All errors (new ones prefixed by >>):
> 
> >> arch/riscv/kernel/compat_signal.c:220:28: error: use of undeclared identifier 'compat__vdso_rt_sigreturn_offset'
>      220 |         regs->ra = (unsigned long)COMPAT_VDSO_SYMBOL(
>          |                                   ^
>    arch/riscv/include/asm/vdso.h:29:42: note: expanded from macro 'COMPAT_VDSO_SYMBOL'
>       29 |         (void __user *)((unsigned long)(base) + compat__vdso_##name##_offset)
>          |                                                 ^
>    <scratch space>:315:1: note: expanded from here
>      315 | compat__vdso_rt_sigreturn_offset
>          | ^
>    1 error generated.

I think this happens because the compat vDSO errored earlier, it should
be fixed with

  https://lore.kernel.org/20250423-riscv-fix-compat_vdso-lld-v2-1-b7bbbc244501@kernel.org/

Cheers,
Nathan

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

end of thread, other threads:[~2025-05-08 16:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-07  7:31 [linux-next:master 3551/8679] arch/riscv/kernel/compat_signal.c:220:28: error: use of undeclared identifier 'compat__vdso_rt_sigreturn_offset' kernel test robot
2025-05-08 16:33 ` Nathan Chancellor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox