All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [luto:x86/fixes 26/26] kernel/entry/common.c:472:19: error: 'KENTRY_DEPTH_NMI' undeclared
Date: Tue, 02 Mar 2021 16:30:18 +0800	[thread overview]
Message-ID: <202103021614.4PFr7AAN-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 4436 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git x86/fixes
head:   5a71c0b98407b8fc659967e261ce84da00270892
commit: 5a71c0b98407b8fc659967e261ce84da00270892 [26/26] kentry: Add debugging checks for proper kentry API usage
config: i386-randconfig-s002-20210302 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-241-geaceeafa-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/commit/?id=5a71c0b98407b8fc659967e261ce84da00270892
        git remote add luto https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git
        git fetch --no-tags luto x86/fixes
        git checkout 5a71c0b98407b8fc659967e261ce84da00270892
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 

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 >>):

   kernel/entry/common.c: In function 'kentry_syscall_begin':
   kernel/entry/common.c:136:35: error: 'KENTRY_SYSCALL_STATE_IN_SYSCALL' undeclared (first use in this function)
     136 |   current->kentry_syscall_state = KENTRY_SYSCALL_STATE_IN_SYSCALL;
         |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/entry/common.c:136:35: note: each undeclared identifier is reported only once for each function it appears in
   In file included from arch/x86/include/asm/bug.h:93,
                    from include/linux/bug.h:5,
                    from include/linux/jump_label.h:250,
                    from include/linux/static_key.h:1,
                    from arch/x86/include/asm/nospec-branch.h:6,
                    from arch/x86/include/asm/irqflags.h:9,
                    from include/linux/irqflags.h:16,
                    from include/linux/rcupdate.h:26,
                    from include/linux/rculist.h:11,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/context_tracking.h:5,
                    from kernel/entry/common.c:3:
   kernel/entry/common.c: In function 'exit_to_user_mode_prepare':
   kernel/entry/common.c:230:6: error: 'KENTRY_SYSCALL_STATE_IN_SYSCALL' undeclared (first use in this function)
     230 |      KENTRY_SYSCALL_STATE_IN_SYSCALL,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/bug.h:157:27: note: in definition of macro 'WARN_ONCE'
     157 |  int __ret_warn_once = !!(condition);   \
         |                           ^~~~~~~~~
   kernel/entry/common.c: In function 'kentry_syscall_end':
   kernel/entry/common.c:324:8: error: 'KENTRY_SYSCALL_STATE_IN_SYSCALL' undeclared (first use in this function)
     324 |        KENTRY_SYSCALL_STATE_IN_SYSCALL),
         |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/bug.h:157:27: note: in definition of macro 'WARN_ONCE'
     157 |  int __ret_warn_once = !!(condition);   \
         |                           ^~~~~~~~~
   kernel/entry/common.c: In function 'kentry_nmi_enter':
>> kernel/entry/common.c:472:19: error: 'KENTRY_DEPTH_NMI' undeclared (first use in this function)
     472 |  kentry_depth_add(KENTRY_DEPTH_NMI);
         |                   ^~~~~~~~~~~~~~~~
   kernel/entry/common.c: In function 'kentry_nmi_exit':
   kernel/entry/common.c:490:21: error: 'KENTRY_DEPTH_NMI' undeclared (first use in this function)
     490 |  kentry_depth_check(KENTRY_DEPTH_NMI);
         |                     ^~~~~~~~~~~~~~~~


vim +/KENTRY_DEPTH_NMI +472 kernel/entry/common.c

   465	
   466	kentry_state_t noinstr kentry_nmi_enter(struct pt_regs *regs)
   467	{
   468		kentry_state_t irq_state;
   469	
   470		irq_state.lockdep = lockdep_hardirqs_enabled();
   471	
 > 472		kentry_depth_add(KENTRY_DEPTH_NMI);
   473	
   474		__nmi_enter();
   475		lockdep_hardirqs_off(CALLER_ADDR0);
   476		lockdep_hardirq_enter();
   477		rcu_nmi_enter();
   478	
   479		instrumentation_begin();
   480		trace_hardirqs_off_finish();
   481		ftrace_nmi_enter();
   482		instrumentation_end();
   483	
   484		return irq_state;
   485	}
   486	

---
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: 33900 bytes --]

                 reply	other threads:[~2021-03-02  8:30 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=202103021614.4PFr7AAN-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.