From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [block:tif-task_work 6/7] arch/arm/kernel/signal.c:610:23: error: 'TIF_NOTIFY_SIGNAL' undeclared
Date: Fri, 09 Oct 2020 05:57:55 +0800 [thread overview]
Message-ID: <202010090552.P9vgCXfh-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 8452 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git tif-task_work
head: b673e48d743baf3de46f70ee2616412c33da7836
commit: 50f68fa29821c23c60ec1144e773c14d7bed8363 [6/7] arm: add support for TIF_NOTIFY_SIGNAL
config: arm-randconfig-r013-20201008 (attached as .config)
compiler: arm-linux-gnueabi-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/axboe/linux-block.git/commit/?id=50f68fa29821c23c60ec1144e773c14d7bed8363
git remote add block https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
git fetch --no-tags block tif-task_work
git checkout 50f68fa29821c23c60ec1144e773c14d7bed8363
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
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/arm/kernel/signal.c: In function 'restore_sigframe':
arch/arm/kernel/signal.c:176:15: warning: variable 'aux' set but not used [-Wunused-but-set-variable]
176 | char __user *aux;
| ^~~
arch/arm/kernel/signal.c: At top level:
arch/arm/kernel/signal.c:224:16: warning: no previous prototype for 'sys_sigreturn' [-Wmissing-prototypes]
224 | asmlinkage int sys_sigreturn(struct pt_regs *regs)
| ^~~~~~~~~~~~~
arch/arm/kernel/signal.c:254:16: warning: no previous prototype for 'sys_rt_sigreturn' [-Wmissing-prototypes]
254 | asmlinkage int sys_rt_sigreturn(struct pt_regs *regs)
| ^~~~~~~~~~~~~~~~
In file included from include/asm-generic/preempt.h:5,
from ./arch/arm/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/percpu.h:6,
from include/linux/prandom.h:12,
from include/linux/random.h:118,
from arch/arm/kernel/signal.c:8:
arch/arm/kernel/signal.c: In function 'do_signal':
>> arch/arm/kernel/signal.c:610:23: error: 'TIF_NOTIFY_SIGNAL' undeclared (first use in this function)
610 | if (test_thread_flag(TIF_NOTIFY_SIGNAL))
| ^~~~~~~~~~~~~~~~~
include/linux/thread_info.h:98:45: note: in definition of macro 'test_thread_flag'
98 | test_ti_thread_flag(current_thread_info(), flag)
| ^~~~
arch/arm/kernel/signal.c:610:23: note: each undeclared identifier is reported only once for each function it appears in
610 | if (test_thread_flag(TIF_NOTIFY_SIGNAL))
| ^~~~~~~~~~~~~~~~~
include/linux/thread_info.h:98:45: note: in definition of macro 'test_thread_flag'
98 | test_ti_thread_flag(current_thread_info(), flag)
| ^~~~
arch/arm/kernel/signal.c: At top level:
arch/arm/kernel/signal.c:646:1: warning: no previous prototype for 'do_work_pending' [-Wmissing-prototypes]
646 | do_work_pending(struct pt_regs *regs, unsigned int thread_flags, int syscall)
| ^~~~~~~~~~~~~~~
arch/arm/kernel/signal.c: In function 'do_work_pending':
>> arch/arm/kernel/signal.c:661:42: error: '_TIF_NOTIFY_SIGNAL' undeclared (first use in this function)
661 | if (thread_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL)) {
| ^~~~~~~~~~~~~~~~~~
arch/arm/kernel/signal.c: At top level:
arch/arm/kernel/signal.c:716:17: warning: no previous prototype for 'addr_limit_check_failed' [-Wmissing-prototypes]
716 | asmlinkage void addr_limit_check_failed(void)
| ^~~~~~~~~~~~~~~~~~~~~~~
--
arch/arm/kernel/entry-v7m.S: Assembler messages:
>> arch/arm/kernel/entry-v7m.S:62: Error: invalid operands (*ABS* and *UND* sections) for `|'
vim +/TIF_NOTIFY_SIGNAL +610 arch/arm/kernel/signal.c
568
569 /*
570 * Note that 'init' is a special process: it doesn't get signals it doesn't
571 * want to handle. Thus you cannot kill init even with a SIGKILL even by
572 * mistake.
573 *
574 * Note that we go through the signals twice: once to check the signals that
575 * the kernel can handle, and then we build all the user-level signal handling
576 * stack-frames in one go after that.
577 */
578 static int do_signal(struct pt_regs *regs, int syscall)
579 {
580 unsigned int retval = 0, continue_addr = 0, restart_addr = 0;
581 struct ksignal ksig;
582 int restart = 0;
583
584 /*
585 * If we were from a system call, check for system call restarting...
586 */
587 if (syscall) {
588 continue_addr = regs->ARM_pc;
589 restart_addr = continue_addr - (thumb_mode(regs) ? 2 : 4);
590 retval = regs->ARM_r0;
591
592 /*
593 * Prepare for system call restart. We do this here so that a
594 * debugger will see the already changed PSW.
595 */
596 switch (retval) {
597 case -ERESTART_RESTARTBLOCK:
598 restart -= 2;
599 fallthrough;
600 case -ERESTARTNOHAND:
601 case -ERESTARTSYS:
602 case -ERESTARTNOINTR:
603 restart++;
604 regs->ARM_r0 = regs->ARM_ORIG_r0;
605 regs->ARM_pc = restart_addr;
606 break;
607 }
608 }
609
> 610 if (test_thread_flag(TIF_NOTIFY_SIGNAL))
611 tracehook_notify_signal();
612
613 /*
614 * Get the signal to deliver. When running under ptrace, at this
615 * point the debugger may change all our registers ...
616 */
617 /*
618 * Depending on the signal settings we may need to revert the
619 * decision to restart the system call. But skip this if a
620 * debugger has chosen to restart at a different PC.
621 */
622 if (task_sigpending(current) && get_signal(&ksig)) {
623 /* handler */
624 if (unlikely(restart) && regs->ARM_pc == restart_addr) {
625 if (retval == -ERESTARTNOHAND ||
626 retval == -ERESTART_RESTARTBLOCK
627 || (retval == -ERESTARTSYS
628 && !(ksig.ka.sa.sa_flags & SA_RESTART))) {
629 regs->ARM_r0 = -EINTR;
630 regs->ARM_pc = continue_addr;
631 }
632 }
633 handle_signal(&ksig, regs);
634 } else {
635 /* no handler */
636 restore_saved_sigmask();
637 if (unlikely(restart) && regs->ARM_pc == restart_addr) {
638 regs->ARM_pc = continue_addr;
639 return restart;
640 }
641 }
642 return 0;
643 }
644
645 asmlinkage int
646 do_work_pending(struct pt_regs *regs, unsigned int thread_flags, int syscall)
647 {
648 /*
649 * The assembly code enters us with IRQs off, but it hasn't
650 * informed the tracing code of that for efficiency reasons.
651 * Update the trace code with the current status.
652 */
653 trace_hardirqs_off();
654 do {
655 if (likely(thread_flags & _TIF_NEED_RESCHED)) {
656 schedule();
657 } else {
658 if (unlikely(!user_mode(regs)))
659 return 0;
660 local_irq_enable();
> 661 if (thread_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL)) {
662 int restart = do_signal(regs, syscall);
663 if (unlikely(restart)) {
664 /*
665 * Restart without handlers.
666 * Deal with it without leaving
667 * the kernel space.
668 */
669 return restart;
670 }
671 syscall = 0;
672 } else if (thread_flags & _TIF_UPROBE) {
673 uprobe_notify_resume(regs);
674 } else {
675 tracehook_notify_resume(regs);
676 rseq_handle_notify_resume(NULL, regs);
677 }
678 }
679 local_irq_disable();
680 thread_flags = current_thread_info()->flags;
681 } while (thread_flags & _TIF_WORK_MASK);
682 return 0;
683 }
684
---
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: 25777 bytes --]
reply other threads:[~2020-10-08 21:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202010090552.P9vgCXfh-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/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.