From: kernel test robot <lkp@intel.com>
To: Sven Schnelle <svens@linux.ibm.com>
Cc: kbuild-all@lists.01.org, linux-s390@vger.kernel.org,
Vasily Gorbik <gor@linux.ibm.com>
Subject: [s390:for-next 7/9] arch/s390/kernel/signal.c:464:6: warning: no previous prototype for 'arch_do_signal_or_restart'
Date: Tue, 19 Jan 2021 22:17:38 +0800 [thread overview]
Message-ID: <202101192233.vAk0EoTF-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4600 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git for-next
head: 3a790cc1c9ef1b7b613cf648e6fb756a842caa16
commit: 56e62a73702836017564eaacd5212e4d0fa1c01d [7/9] s390: convert to generic entry
config: s390-allyesconfig (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.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://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git/commit/?id=56e62a73702836017564eaacd5212e4d0fa1c01d
git remote add s390 https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git
git fetch --no-tags s390 for-next
git checkout 56e62a73702836017564eaacd5212e4d0fa1c01d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=s390
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/s390/kernel/signal.c:464:6: warning: no previous prototype for 'arch_do_signal_or_restart' [-Wmissing-prototypes]
464 | void arch_do_signal_or_restart(struct pt_regs *regs, bool has_signal)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
vim +/arch_do_signal_or_restart +464 arch/s390/kernel/signal.c
453
454 /*
455 * Note that 'init' is a special process: it doesn't get signals it doesn't
456 * want to handle. Thus you cannot kill init even with a SIGKILL even by
457 * mistake.
458 *
459 * Note that we go through the signals twice: once to check the signals that
460 * the kernel can handle, and then we build all the user-level signal handling
461 * stack-frames in one go after that.
462 */
463
> 464 void arch_do_signal_or_restart(struct pt_regs *regs, bool has_signal)
465 {
466 struct ksignal ksig;
467 sigset_t *oldset = sigmask_to_save();
468
469 /*
470 * Get signal to deliver. When running under ptrace, at this point
471 * the debugger may change all our registers, including the system
472 * call information.
473 */
474 current->thread.system_call =
475 test_pt_regs_flag(regs, PIF_SYSCALL) ? regs->int_code : 0;
476
477 if (has_signal && get_signal(&ksig)) {
478 /* Whee! Actually deliver the signal. */
479 if (current->thread.system_call) {
480 regs->int_code = current->thread.system_call;
481 /* Check for system call restarting. */
482 switch (regs->gprs[2]) {
483 case -ERESTART_RESTARTBLOCK:
484 case -ERESTARTNOHAND:
485 regs->gprs[2] = -EINTR;
486 break;
487 case -ERESTARTSYS:
488 if (!(ksig.ka.sa.sa_flags & SA_RESTART)) {
489 regs->gprs[2] = -EINTR;
490 break;
491 }
492 fallthrough;
493 case -ERESTARTNOINTR:
494 regs->gprs[2] = regs->orig_gpr2;
495 regs->psw.addr =
496 __rewind_psw(regs->psw,
497 regs->int_code >> 16);
498 break;
499 }
500 }
501 /* No longer in a system call */
502 clear_pt_regs_flag(regs, PIF_SYSCALL);
503 clear_pt_regs_flag(regs, PIF_SYSCALL_RESTART);
504 rseq_signal_deliver(&ksig, regs);
505 if (is_compat_task())
506 handle_signal32(&ksig, oldset, regs);
507 else
508 handle_signal(&ksig, oldset, regs);
509 return;
510 }
511
512 /* No handlers present - check for system call restart */
513 clear_pt_regs_flag(regs, PIF_SYSCALL);
514 clear_pt_regs_flag(regs, PIF_SYSCALL_RESTART);
515 if (current->thread.system_call) {
516 regs->int_code = current->thread.system_call;
517 switch (regs->gprs[2]) {
518 case -ERESTART_RESTARTBLOCK:
519 /* Restart with sys_restart_syscall */
520 regs->int_code = __NR_restart_syscall;
521 fallthrough;
522 case -ERESTARTNOHAND:
523 case -ERESTARTSYS:
524 case -ERESTARTNOINTR:
525 /* Restart system call with magic TIF bit. */
526 regs->gprs[2] = regs->orig_gpr2;
527 set_pt_regs_flag(regs, PIF_SYSCALL_RESTART);
528 if (test_thread_flag(TIF_SINGLE_STEP))
529 clear_thread_flag(TIF_PER_TRAP);
530 break;
531 }
532 }
533
534 /*
535 * If there's no signal to deliver, we just put the saved sigmask back.
536 */
537 restore_saved_sigmask();
538 }
539
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 52031 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [s390:for-next 7/9] arch/s390/kernel/signal.c:464:6: warning: no previous prototype for 'arch_do_signal_or_restart'
Date: Tue, 19 Jan 2021 22:17:38 +0800 [thread overview]
Message-ID: <202101192233.vAk0EoTF-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4720 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git for-next
head: 3a790cc1c9ef1b7b613cf648e6fb756a842caa16
commit: 56e62a73702836017564eaacd5212e4d0fa1c01d [7/9] s390: convert to generic entry
config: s390-allyesconfig (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.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://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git/commit/?id=56e62a73702836017564eaacd5212e4d0fa1c01d
git remote add s390 https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git
git fetch --no-tags s390 for-next
git checkout 56e62a73702836017564eaacd5212e4d0fa1c01d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=s390
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/s390/kernel/signal.c:464:6: warning: no previous prototype for 'arch_do_signal_or_restart' [-Wmissing-prototypes]
464 | void arch_do_signal_or_restart(struct pt_regs *regs, bool has_signal)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
vim +/arch_do_signal_or_restart +464 arch/s390/kernel/signal.c
453
454 /*
455 * Note that 'init' is a special process: it doesn't get signals it doesn't
456 * want to handle. Thus you cannot kill init even with a SIGKILL even by
457 * mistake.
458 *
459 * Note that we go through the signals twice: once to check the signals that
460 * the kernel can handle, and then we build all the user-level signal handling
461 * stack-frames in one go after that.
462 */
463
> 464 void arch_do_signal_or_restart(struct pt_regs *regs, bool has_signal)
465 {
466 struct ksignal ksig;
467 sigset_t *oldset = sigmask_to_save();
468
469 /*
470 * Get signal to deliver. When running under ptrace, at this point
471 * the debugger may change all our registers, including the system
472 * call information.
473 */
474 current->thread.system_call =
475 test_pt_regs_flag(regs, PIF_SYSCALL) ? regs->int_code : 0;
476
477 if (has_signal && get_signal(&ksig)) {
478 /* Whee! Actually deliver the signal. */
479 if (current->thread.system_call) {
480 regs->int_code = current->thread.system_call;
481 /* Check for system call restarting. */
482 switch (regs->gprs[2]) {
483 case -ERESTART_RESTARTBLOCK:
484 case -ERESTARTNOHAND:
485 regs->gprs[2] = -EINTR;
486 break;
487 case -ERESTARTSYS:
488 if (!(ksig.ka.sa.sa_flags & SA_RESTART)) {
489 regs->gprs[2] = -EINTR;
490 break;
491 }
492 fallthrough;
493 case -ERESTARTNOINTR:
494 regs->gprs[2] = regs->orig_gpr2;
495 regs->psw.addr =
496 __rewind_psw(regs->psw,
497 regs->int_code >> 16);
498 break;
499 }
500 }
501 /* No longer in a system call */
502 clear_pt_regs_flag(regs, PIF_SYSCALL);
503 clear_pt_regs_flag(regs, PIF_SYSCALL_RESTART);
504 rseq_signal_deliver(&ksig, regs);
505 if (is_compat_task())
506 handle_signal32(&ksig, oldset, regs);
507 else
508 handle_signal(&ksig, oldset, regs);
509 return;
510 }
511
512 /* No handlers present - check for system call restart */
513 clear_pt_regs_flag(regs, PIF_SYSCALL);
514 clear_pt_regs_flag(regs, PIF_SYSCALL_RESTART);
515 if (current->thread.system_call) {
516 regs->int_code = current->thread.system_call;
517 switch (regs->gprs[2]) {
518 case -ERESTART_RESTARTBLOCK:
519 /* Restart with sys_restart_syscall */
520 regs->int_code = __NR_restart_syscall;
521 fallthrough;
522 case -ERESTARTNOHAND:
523 case -ERESTARTSYS:
524 case -ERESTARTNOINTR:
525 /* Restart system call with magic TIF bit. */
526 regs->gprs[2] = regs->orig_gpr2;
527 set_pt_regs_flag(regs, PIF_SYSCALL_RESTART);
528 if (test_thread_flag(TIF_SINGLE_STEP))
529 clear_thread_flag(TIF_PER_TRAP);
530 break;
531 }
532 }
533
534 /*
535 * If there's no signal to deliver, we just put the saved sigmask back.
536 */
537 restore_saved_sigmask();
538 }
539
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 52031 bytes --]
next reply other threads:[~2021-01-19 14:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-19 14:17 kernel test robot [this message]
2021-01-19 14:17 ` [s390:for-next 7/9] arch/s390/kernel/signal.c:464:6: warning: no previous prototype for 'arch_do_signal_or_restart' 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=202101192233.vAk0EoTF-lkp@intel.com \
--to=lkp@intel.com \
--cc=gor@linux.ibm.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-s390@vger.kernel.org \
--cc=svens@linux.ibm.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.