From: kernel test robot <lkp@intel.com>
To: Saleem Abdulrasool <abdulras@google.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
linux-kernel@vger.kernel.org,
Palmer Dabbelt <palmerdabbelt@google.com>
Subject: arch/riscv/kernel/signal.c:197:28: error: use of undeclared identifier '__vdso_rt_sigreturn_offset'
Date: Sun, 10 Apr 2022 09:33:24 +0800 [thread overview]
Message-ID: <202204100900.7BeXEmpM-lkp@intel.com> (raw)
Hi Saleem,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: e1f700ebd6bea293abe3c7e2807b252018efde01
commit: fde9c59aebafb91caeed816cc510b56f14aa63ae riscv: explicitly use symbol offsets for VDSO
date: 8 months ago
config: riscv-randconfig-r011-20220410 (https://download.01.org/0day-ci/archive/20220410/202204100900.7BeXEmpM-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 256c6b0ba14e8a7ab6373b61b7193ea8c0a3651c)
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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fde9c59aebafb91caeed816cc510b56f14aa63ae
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout fde9c59aebafb91caeed816cc510b56f14aa63ae
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> arch/riscv/kernel/signal.c:197:28: error: use of undeclared identifier '__vdso_rt_sigreturn_offset'
regs->ra = (unsigned long)VDSO_SYMBOL(
^
arch/riscv/include/asm/vdso.h:20:42: note: expanded from macro 'VDSO_SYMBOL'
(void __user *)((unsigned long)(base) + __vdso_##name##_offset)
^
<scratch space>:237:1: note: expanded from here
__vdso_rt_sigreturn_offset
^
arch/riscv/kernel/signal.c:309:27: warning: no previous prototype for function 'do_notify_resume' [-Wmissing-prototypes]
asmlinkage __visible void do_notify_resume(struct pt_regs *regs,
^
arch/riscv/kernel/signal.c:309:22: note: declare 'static' if the function is not intended to be used outside of this translation unit
asmlinkage __visible void do_notify_resume(struct pt_regs *regs,
^
static
1 warning and 1 error generated.
vim +/__vdso_rt_sigreturn_offset +197 arch/riscv/kernel/signal.c
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 173
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 174 static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 175 struct pt_regs *regs)
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 176 {
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 177 struct rt_sigframe __user *frame;
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 178 long err = 0;
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 179
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 180 frame = get_sigframe(ksig, regs, sizeof(*frame));
96d4f267e40f95 Linus Torvalds 2019-01-03 181 if (!access_ok(frame, sizeof(*frame)))
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 182 return -EFAULT;
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 183
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 184 err |= copy_siginfo_to_user(&frame->info, &ksig->info);
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 185
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 186 /* Create the ucontext. */
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 187 err |= __put_user(0, &frame->uc.uc_flags);
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 188 err |= __put_user(NULL, &frame->uc.uc_link);
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 189 err |= __save_altstack(&frame->uc.uc_stack, regs->sp);
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 190 err |= setup_sigcontext(frame, regs);
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 191 err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 192 if (err)
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 193 return -EFAULT;
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 194
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 195 /* Set up to return from userspace. */
6bd33e1ece528f Christoph Hellwig 2019-10-28 196 #ifdef CONFIG_MMU
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 @197 regs->ra = (unsigned long)VDSO_SYMBOL(
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 198 current->mm->context.vdso, rt_sigreturn);
6bd33e1ece528f Christoph Hellwig 2019-10-28 199 #else
6bd33e1ece528f Christoph Hellwig 2019-10-28 200 /*
6bd33e1ece528f Christoph Hellwig 2019-10-28 201 * For the nommu case we don't have a VDSO. Instead we push two
6bd33e1ece528f Christoph Hellwig 2019-10-28 202 * instructions to call the rt_sigreturn syscall onto the user stack.
6bd33e1ece528f Christoph Hellwig 2019-10-28 203 */
6bd33e1ece528f Christoph Hellwig 2019-10-28 204 if (copy_to_user(&frame->sigreturn_code, __user_rt_sigreturn,
6bd33e1ece528f Christoph Hellwig 2019-10-28 205 sizeof(frame->sigreturn_code)))
6bd33e1ece528f Christoph Hellwig 2019-10-28 206 return -EFAULT;
6bd33e1ece528f Christoph Hellwig 2019-10-28 207 regs->ra = (unsigned long)&frame->sigreturn_code;
6bd33e1ece528f Christoph Hellwig 2019-10-28 208 #endif /* CONFIG_MMU */
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 209
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 210 /*
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 211 * Set up registers for signal handler.
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 212 * Registers that we don't modify keep the value they had from
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 213 * user-space at the time we took the signal.
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 214 * We always pass siginfo and mcontext, regardless of SA_SIGINFO,
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 215 * since some things rely on this (e.g. glibc's debug/segfault.c).
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 216 */
a4c3733d32a72f Christoph Hellwig 2019-10-28 217 regs->epc = (unsigned long)ksig->ka.sa.sa_handler;
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 218 regs->sp = (unsigned long)frame;
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 219 regs->a0 = ksig->sig; /* a0: signal number */
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 220 regs->a1 = (unsigned long)(&frame->info); /* a1: siginfo pointer */
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 221 regs->a2 = (unsigned long)(&frame->uc); /* a2: ucontext pointer */
e2c0cdfba7f699 Palmer Dabbelt 2017-07-10 222
:::::: The code at line 197 was first introduced by commit
:::::: e2c0cdfba7f69925afc92b20cd9835d81e11a4f1 RISC-V: User-facing API
:::::: TO: Palmer Dabbelt <palmer@dabbelt.com>
:::::: CC: Palmer Dabbelt <palmer@dabbelt.com>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
next reply other threads:[~2022-04-10 1:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-10 1:33 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-08-03 2:29 arch/riscv/kernel/signal.c:197:28: error: use of undeclared identifier '__vdso_rt_sigreturn_offset' kernel test robot
2022-06-25 2:58 kernel test robot
2022-05-20 23:25 kernel test robot
2021-11-05 5:23 kernel test robot
2021-11-05 5:23 ` 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=202204100900.7BeXEmpM-lkp@intel.com \
--to=lkp@intel.com \
--cc=abdulras@google.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=palmerdabbelt@google.com \
/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.