tree:
https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git sched/lazymm
head: ecc3992c36cb88087df9c537e2326efb51c95e31
commit: 1211e1eda2ec9d4ed78a480d8a795dce3312f80c [9/10] x86/events, x86/insn-eval: Remove
incorrect active_mm references
config: x86_64-randconfig-b001-20210617 (attached as .config)
compiler: clang version 13.0.0 (
https://github.com/llvm/llvm-project
64720f57bea6a6bf033feef4a5751ab9c0c3b401)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
#
https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/commit/?id...
git remote add luto
https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git
git fetch --no-tags luto sched/lazymm
git checkout 1211e1eda2ec9d4ed78a480d8a795dce3312f80c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
> arch/x86/events/core.c:2780:8: error: implicit declaration of
function 'nmi_uaccess_ok' [-Werror,-Wimplicit-function-declaration]
if (!nmi_uaccess_ok())
^
arch/x86/events/core.c:2780:8: note: did you mean 'nmi_uaccess_okay'?
arch/x86/include/asm/tlbflush.h:159:6: note: 'nmi_uaccess_okay' declared here
bool nmi_uaccess_okay(void);
^
1 error generated.
--
> arch/x86/lib/insn-eval.c:616:8: error: implicit declaration of
function 'nmi_uaccess_ok' [-Werror,-Wimplicit-function-declaration]
if (!nmi_uaccess_ok())
^
arch/x86/lib/insn-eval.c:616:8: note: did you mean 'nmi_uaccess_okay'?
arch/x86/include/asm/tlbflush.h:159:6: note: 'nmi_uaccess_okay' declared here
bool nmi_uaccess_okay(void);
^
1 error generated.
vim +/nmi_uaccess_ok +2780 arch/x86/events/core.c
2766
2767 static unsigned long get_segment_base(unsigned int segment)
2768 {
2769 struct desc_struct *desc;
2770 unsigned int idx = segment >> 3;
2771
2772 if ((segment & SEGMENT_TI_MASK) == SEGMENT_LDT) {
2773 #ifdef CONFIG_MODIFY_LDT_SYSCALL
2774 struct ldt_struct *ldt;
2775
2776 /*
2777 * If we're not in a valid context with a real (not just lazy)
2778 * user mm, then don't even try.
2779 */
2780 if (!nmi_uaccess_ok())
2781 return 0;
2782
2783 /* IRQs are off, so this synchronizes with smp_store_release */
2784 ldt = READ_ONCE(current->mm->context.ldt);
2785 if (!ldt || idx >= ldt->nr_entries)
2786 return 0;
2787
2788 desc = &ldt->entries[idx];
2789 #else
2790 return 0;
2791 #endif
2792 } else {
2793 if (idx >= GDT_ENTRIES)
2794 return 0;
2795
2796 desc = raw_cpu_ptr(gdt_page.gdt) + idx;
2797 }
2798
2799 return get_desc_base(desc);
2800 }
2801
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org