* [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'
@ 2022-04-15 10:36 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-04-15 10:36 UTC (permalink / raw)
To: Guo Ren
Cc: llvm, kbuild-all, GNU/Weeb Mailing List, linux-kernel,
Palmer Dabbelt, Arnd Bergmann
tree: https://github.com/ammarfaizi2/linux-block palmer/linux/riscv-compat
head: d84810b12dce65023c222aea22d30e2b22e3016a
commit: d84810b12dce65023c222aea22d30e2b22e3016a [20/20] riscv: compat: Add COMPAT Kbuild skeletal support
config: riscv-randconfig-r015-20220414 (https://download.01.org/0day-ci/archive/20220415/[email protected]/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 6b7e6ea489f6dd45a9b0da9ac20871560917b9b0)
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/d84810b12dce65023c222aea22d30e2b22e3016a
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block palmer/linux/riscv-compat
git checkout d84810b12dce65023c222aea22d30e2b22e3016a
# 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 arch/riscv/kernel/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
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
7b07d6662e1218 Guo Ren 2022-04-05 197
7b07d6662e1218 Guo Ren 2022-04-05 @198 int compat_setup_rt_frame(struct ksignal *ksig, sigset_t *set,
7b07d6662e1218 Guo Ren 2022-04-05 199 struct pt_regs *regs)
7b07d6662e1218 Guo Ren 2022-04-05 200 {
7b07d6662e1218 Guo Ren 2022-04-05 201 struct compat_rt_sigframe __user *frame;
7b07d6662e1218 Guo Ren 2022-04-05 202 long err = 0;
7b07d6662e1218 Guo Ren 2022-04-05 203
7b07d6662e1218 Guo Ren 2022-04-05 204 frame = compat_get_sigframe(ksig, regs, sizeof(*frame));
7b07d6662e1218 Guo Ren 2022-04-05 205 if (!access_ok(frame, sizeof(*frame)))
7b07d6662e1218 Guo Ren 2022-04-05 206 return -EFAULT;
7b07d6662e1218 Guo Ren 2022-04-05 207
7b07d6662e1218 Guo Ren 2022-04-05 208 err |= copy_siginfo_to_user32(&frame->info, &ksig->info);
7b07d6662e1218 Guo Ren 2022-04-05 209
7b07d6662e1218 Guo Ren 2022-04-05 210 /* Create the ucontext. */
7b07d6662e1218 Guo Ren 2022-04-05 211 err |= __put_user(0, &frame->uc.uc_flags);
7b07d6662e1218 Guo Ren 2022-04-05 212 err |= __put_user(NULL, &frame->uc.uc_link);
7b07d6662e1218 Guo Ren 2022-04-05 213 err |= __compat_save_altstack(&frame->uc.uc_stack, regs->sp);
7b07d6662e1218 Guo Ren 2022-04-05 214 err |= compat_setup_sigcontext(frame, regs);
7b07d6662e1218 Guo Ren 2022-04-05 215 err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
7b07d6662e1218 Guo Ren 2022-04-05 216 if (err)
7b07d6662e1218 Guo Ren 2022-04-05 217 return -EFAULT;
7b07d6662e1218 Guo Ren 2022-04-05 218
7b07d6662e1218 Guo Ren 2022-04-05 219 regs->ra = (unsigned long)COMPAT_VDSO_SYMBOL(
7b07d6662e1218 Guo Ren 2022-04-05 220 current->mm->context.vdso, rt_sigreturn);
7b07d6662e1218 Guo Ren 2022-04-05 221
7b07d6662e1218 Guo Ren 2022-04-05 222 /*
7b07d6662e1218 Guo Ren 2022-04-05 223 * Set up registers for signal handler.
7b07d6662e1218 Guo Ren 2022-04-05 224 * Registers that we don't modify keep the value they had from
7b07d6662e1218 Guo Ren 2022-04-05 225 * user-space at the time we took the signal.
7b07d6662e1218 Guo Ren 2022-04-05 226 * We always pass siginfo and mcontext, regardless of SA_SIGINFO,
7b07d6662e1218 Guo Ren 2022-04-05 227 * since some things rely on this (e.g. glibc's debug/segfault.c).
7b07d6662e1218 Guo Ren 2022-04-05 228 */
7b07d6662e1218 Guo Ren 2022-04-05 229 regs->epc = (unsigned long)ksig->ka.sa.sa_handler;
7b07d6662e1218 Guo Ren 2022-04-05 230 regs->sp = (unsigned long)frame;
7b07d6662e1218 Guo Ren 2022-04-05 231 regs->a0 = ksig->sig; /* a0: signal number */
7b07d6662e1218 Guo Ren 2022-04-05 232 regs->a1 = (unsigned long)(&frame->info); /* a1: siginfo pointer */
7b07d6662e1218 Guo Ren 2022-04-05 233 regs->a2 = (unsigned long)(&frame->uc); /* a2: ucontext pointer */
7b07d6662e1218 Guo Ren 2022-04-05 234
:::::: The code at line 198 was first introduced by commit
:::::: 7b07d6662e1218841c2b618ab9a9255440ccee85 riscv: compat: signal: Add rt_frame implementation
:::::: TO: Guo Ren <[email protected]>
:::::: CC: Palmer Dabbelt <[email protected]>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 2+ messages in thread
* [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'
@ 2022-04-30 13:08 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-04-30 13:08 UTC (permalink / raw)
To: Guo Ren
Cc: llvm, kbuild-all, GNU/Weeb Mailing List, linux-kernel,
Palmer Dabbelt, Arnd Bergmann
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/[email protected]/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 <[email protected]>
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 <[email protected]>
:::::: CC: Palmer Dabbelt <[email protected]>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-04-30 13:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-15 10:36 [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' kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2022-04-30 13:08 kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox