All of lore.kernel.org
 help / color / mirror / Atom feed
* [dynticks:preempt/dynamic-v4 8/8] arch/x86/include/asm/entry-common.h:20:25: error: implicit declaration of function 'native_save_fl'
@ 2021-01-20 20:50 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-01-20 20:50 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git preempt/dynamic-v4
head:   b5f3b1da9df4197d0b0ffe0f55f0f6a8c838d75f
commit: b5f3b1da9df4197d0b0ffe0f55f0f6a8c838d75f [8/8] preempt/dynamic: Support dynamic preempt with preempt= boot option
config: um-i386_defconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git/commit/?id=b5f3b1da9df4197d0b0ffe0f55f0f6a8c838d75f
        git remote add dynticks https://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
        git fetch --no-tags dynticks preempt/dynamic-v4
        git checkout b5f3b1da9df4197d0b0ffe0f55f0f6a8c838d75f
        # save the attached .config to linux build tree
        make W=1 ARCH=um SUBARCH=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 >>):

   cc1: warning: arch/um/include/uapi: No such file or directory [-Wmissing-include-dirs]
   In file included from arch/x86/include/asm/entry-common.h:7,
                    from include/linux/entry-common.h:11,
                    from kernel/sched/core.c:15:
   arch/x86/include/asm/nospec-branch.h: In function 'mds_clear_cpu_buffers':
>> arch/x86/include/asm/nospec-branch.h:267:24: error: '__KERNEL_DS' undeclared (first use in this function); did you mean 'KERNEL_DS'?
     267 |  static const u16 ds = __KERNEL_DS;
         |                        ^~~~~~~~~~~
         |                        KERNEL_DS
   arch/x86/include/asm/nospec-branch.h:267:24: note: each undeclared identifier is reported only once for each function it appears in
   In file included from arch/x86/include/asm/entry-common.h:8,
                    from include/linux/entry-common.h:11,
                    from kernel/sched/core.c:15:
   arch/x86/include/asm/io_bitmap.h: At top level:
>> arch/x86/include/asm/io_bitmap.h:13:23: error: 'IO_BITMAP_LONGS' undeclared here (not in a function); did you mean 'IDA_BITMAP_LONGS'?
      13 |  unsigned long bitmap[IO_BITMAP_LONGS];
         |                       ^~~~~~~~~~~~~~~
         |                       IDA_BITMAP_LONGS
   In file included from include/linux/entry-common.h:11,
                    from kernel/sched/core.c:15:
   arch/x86/include/asm/entry-common.h: In function 'arch_check_user_regs':
>> arch/x86/include/asm/entry-common.h:20:25: error: implicit declaration of function 'native_save_fl' [-Werror=implicit-function-declaration]
      20 |   unsigned long flags = native_save_fl();
         |                         ^~~~~~~~~~~~~~
>> arch/x86/include/asm/entry-common.h:26:7: error: implicit declaration of function 'boot_cpu_has'; did you mean 'boot_cpu_init'? [-Werror=implicit-function-declaration]
      26 |   if (boot_cpu_has(X86_FEATURE_SMAP) ||
         |       ^~~~~~~~~~~~
         |       boot_cpu_init
   In file included from ./arch/um/include/generated/asm/bug.h:1,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:12,
                    from include/asm-generic/current.h:5,
                    from ./arch/um/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/kthread.h:6,
                    from include/trace/events/sched.h:8,
                    from kernel/sched/core.c:10:
>> arch/x86/include/asm/entry-common.h:40:17: error: implicit declaration of function 'on_thread_stack'; did you mean 'setup_thread_stack'? [-Werror=implicit-function-declaration]
      40 |   WARN_ON_ONCE(!on_thread_stack());
         |                 ^~~~~~~~~~~~~~~
   include/asm-generic/bug.h:145:27: note: in definition of macro 'WARN_ON_ONCE'
     145 |  int __ret_warn_once = !!(condition);   \
         |                           ^~~~~~~~~
   In file included from include/linux/entry-common.h:11,
                    from kernel/sched/core.c:15:
   arch/x86/include/asm/entry-common.h: In function 'arch_exit_to_user_mode_prepare':
>> arch/x86/include/asm/entry-common.h:51:16: error: '_TIF_USER_RETURN_NOTIFY' undeclared (first use in this function)
      51 |  if (ti_work & _TIF_USER_RETURN_NOTIFY)
         |                ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/err.h:5,
                    from include/linux/kthread.h:5,
                    from include/trace/events/sched.h:8,
                    from kernel/sched/core.c:10:
>> arch/x86/include/asm/entry-common.h:54:25: error: '_TIF_IO_BITMAP' undeclared (first use in this function)
      54 |  if (unlikely(ti_work & _TIF_IO_BITMAP))
         |                         ^~~~~~~~~~~~~~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
>> arch/x86/include/asm/entry-common.h:58:25: error: '_TIF_NEED_FPU_LOAD' undeclared (first use in this function)
      58 |  if (unlikely(ti_work & _TIF_NEED_FPU_LOAD))
         |                         ^~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   kernel/sched/core.c: In function 'ttwu_stat':
   kernel/sched/core.c:2895:13: warning: variable 'rq' set but not used [-Wunused-but-set-variable]
    2895 |  struct rq *rq;
         |             ^~
   kernel/sched/core.c: In function 'schedule_tail':
   kernel/sched/core.c:4239:13: warning: variable 'rq' set but not used [-Wunused-but-set-variable]
    4239 |  struct rq *rq;
         |             ^~
   cc1: some warnings being treated as errors


vim +/native_save_fl +20 arch/x86/include/asm/entry-common.h

167fd210ec0555d3 Thomas Gleixner 2020-07-23  10  
27d6b4d14f5c3ab2 Thomas Gleixner 2020-07-23  11  /* Check that the stack and regs on entry from user mode are sane. */
27d6b4d14f5c3ab2 Thomas Gleixner 2020-07-23  12  static __always_inline void arch_check_user_regs(struct pt_regs *regs)
27d6b4d14f5c3ab2 Thomas Gleixner 2020-07-23  13  {
27d6b4d14f5c3ab2 Thomas Gleixner 2020-07-23  14  	if (IS_ENABLED(CONFIG_DEBUG_ENTRY)) {
27d6b4d14f5c3ab2 Thomas Gleixner 2020-07-23  15  		/*
27d6b4d14f5c3ab2 Thomas Gleixner 2020-07-23  16  		 * Make sure that the entry code gave us a sensible EFLAGS
27d6b4d14f5c3ab2 Thomas Gleixner 2020-07-23  17  		 * register.  Native because we want to check the actual CPU
27d6b4d14f5c3ab2 Thomas Gleixner 2020-07-23  18  		 * state, not the interrupt state as imagined by Xen.
27d6b4d14f5c3ab2 Thomas Gleixner 2020-07-23  19  		 */
27d6b4d14f5c3ab2 Thomas Gleixner 2020-07-23 @20  		unsigned long flags = native_save_fl();
662a0221893a3d58 Peter Zijlstra  2020-09-02  21  		unsigned long mask = X86_EFLAGS_DF | X86_EFLAGS_NT;
662a0221893a3d58 Peter Zijlstra  2020-09-02  22  
662a0221893a3d58 Peter Zijlstra  2020-09-02  23  		/*
662a0221893a3d58 Peter Zijlstra  2020-09-02  24  		 * For !SMAP hardware we patch out CLAC on entry.
662a0221893a3d58 Peter Zijlstra  2020-09-02  25  		 */
662a0221893a3d58 Peter Zijlstra  2020-09-02 @26  		if (boot_cpu_has(X86_FEATURE_SMAP) ||
662a0221893a3d58 Peter Zijlstra  2020-09-02  27  		    (IS_ENABLED(CONFIG_64_BIT) && boot_cpu_has(X86_FEATURE_XENPV)))
662a0221893a3d58 Peter Zijlstra  2020-09-02  28  			mask |= X86_EFLAGS_AC;
662a0221893a3d58 Peter Zijlstra  2020-09-02  29  
662a0221893a3d58 Peter Zijlstra  2020-09-02  30  		WARN_ON_ONCE(flags & mask);
27d6b4d14f5c3ab2 Thomas Gleixner 2020-07-23  31  
27d6b4d14f5c3ab2 Thomas Gleixner 2020-07-23  32  		/* We think we came from user mode. Make sure pt_regs agrees. */
27d6b4d14f5c3ab2 Thomas Gleixner 2020-07-23  33  		WARN_ON_ONCE(!user_mode(regs));
27d6b4d14f5c3ab2 Thomas Gleixner 2020-07-23  34  
27d6b4d14f5c3ab2 Thomas Gleixner 2020-07-23  35  		/*
27d6b4d14f5c3ab2 Thomas Gleixner 2020-07-23  36  		 * All entries from user mode (except #DF) should be on the
27d6b4d14f5c3ab2 Thomas Gleixner 2020-07-23  37  		 * normal thread stack and should have user pt_regs in the
27d6b4d14f5c3ab2 Thomas Gleixner 2020-07-23  38  		 * correct location.
27d6b4d14f5c3ab2 Thomas Gleixner 2020-07-23  39  		 */
27d6b4d14f5c3ab2 Thomas Gleixner 2020-07-23 @40  		WARN_ON_ONCE(!on_thread_stack());
27d6b4d14f5c3ab2 Thomas Gleixner 2020-07-23  41  		WARN_ON_ONCE(regs != task_pt_regs(current));
27d6b4d14f5c3ab2 Thomas Gleixner 2020-07-23  42  	}
27d6b4d14f5c3ab2 Thomas Gleixner 2020-07-23  43  }
27d6b4d14f5c3ab2 Thomas Gleixner 2020-07-23  44  #define arch_check_user_regs arch_check_user_regs
27d6b4d14f5c3ab2 Thomas Gleixner 2020-07-23  45  
167fd210ec0555d3 Thomas Gleixner 2020-07-23  46  #define ARCH_SYSCALL_EXIT_WORK		(_TIF_SINGLESTEP)
167fd210ec0555d3 Thomas Gleixner 2020-07-23  47  
167fd210ec0555d3 Thomas Gleixner 2020-07-23  48  static inline void arch_exit_to_user_mode_prepare(struct pt_regs *regs,
167fd210ec0555d3 Thomas Gleixner 2020-07-23  49  						  unsigned long ti_work)
167fd210ec0555d3 Thomas Gleixner 2020-07-23  50  {
167fd210ec0555d3 Thomas Gleixner 2020-07-23 @51  	if (ti_work & _TIF_USER_RETURN_NOTIFY)
167fd210ec0555d3 Thomas Gleixner 2020-07-23  52  		fire_user_return_notifiers();
167fd210ec0555d3 Thomas Gleixner 2020-07-23  53  
167fd210ec0555d3 Thomas Gleixner 2020-07-23 @54  	if (unlikely(ti_work & _TIF_IO_BITMAP))
167fd210ec0555d3 Thomas Gleixner 2020-07-23  55  		tss_update_io_bitmap();
167fd210ec0555d3 Thomas Gleixner 2020-07-23  56  
167fd210ec0555d3 Thomas Gleixner 2020-07-23  57  	fpregs_assert_state_consistent();
167fd210ec0555d3 Thomas Gleixner 2020-07-23 @58  	if (unlikely(ti_work & _TIF_NEED_FPU_LOAD))
167fd210ec0555d3 Thomas Gleixner 2020-07-23  59  		switch_fpu_return();
167fd210ec0555d3 Thomas Gleixner 2020-07-23  60  

:::::: The code at line 20 was first introduced by commit
:::::: 27d6b4d14f5c3ab21c4aef87dd04055a2d7adf14 x86/entry: Use generic syscall entry function

:::::: TO: Thomas Gleixner <tglx@linutronix.de>
:::::: CC: Thomas Gleixner <tglx@linutronix.de>

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-20 20:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-20 20:50 [dynticks:preempt/dynamic-v4 8/8] arch/x86/include/asm/entry-common.h:20:25: error: implicit declaration of function 'native_save_fl' 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.