* [s390:for-next 7/9] arch/s390/kernel/signal.c:464:6: warning: no previous prototype for 'arch_do_signal_or_restart'
@ 2021-01-19 14:17 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-01-19 14:17 UTC (permalink / raw)
To: Sven Schnelle; +Cc: kbuild-all, linux-s390, Vasily Gorbik
[-- 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 --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* [s390:for-next 7/9] arch/s390/kernel/signal.c:464:6: warning: no previous prototype for 'arch_do_signal_or_restart'
@ 2021-01-19 14:17 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-01-19 14:17 UTC (permalink / raw)
To: kbuild-all
[-- 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 --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-19 14:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2021-01-19 14:17 ` kernel test robot
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.