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: i386-randconfig-r016-20210617 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
#
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
make W=1 ARCH=i386
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/lib/insn-eval.c: In function 'get_desc':
> arch/x86/lib/insn-eval.c:616:8: error: implicit declaration of
function 'nmi_uaccess_ok'; did you mean 'nmi_uaccess_okay'?
[-Werror=implicit-function-declaration]
616 | if (!nmi_uaccess_ok())
| ^~~~~~~~~~~~~~
| nmi_uaccess_okay
cc1: some warnings being treated as errors
--
arch/x86/events/core.c: In function 'get_segment_base':
> arch/x86/events/core.c:2780:8: error: implicit declaration of
function 'nmi_uaccess_ok'; did you mean 'nmi_uaccess_okay'?
[-Werror=implicit-function-declaration]
2780 | if (!nmi_uaccess_ok())
| ^~~~~~~~~~~~~~
| nmi_uaccess_okay
cc1: some warnings being treated as errors
vim +616 arch/x86/lib/insn-eval.c
584
585 /**
586 * get_desc() - Obtain contents of a segment descriptor
587 * @out: Segment descriptor contents on success
588 * @sel: Segment selector
589 *
590 * Given a segment selector, obtain a pointer to the segment descriptor.
591 * Both global and local descriptor tables are supported.
592 *
593 * Returns:
594 *
595 * True on success, false on failure.
596 *
597 * NULL on error.
598 */
599 static bool get_desc(struct desc_struct *out, unsigned short sel)
600 {
601 struct desc_ptr gdt_desc = {0, 0};
602 unsigned long desc_base;
603
604 #ifdef CONFIG_MODIFY_LDT_SYSCALL
605 if ((sel & SEGMENT_TI_MASK) == SEGMENT_LDT) {
606 bool success = false;
607 struct ldt_struct *ldt;
608
609 /* Bits [15:3] contain the index of the desired entry. */
610 sel >>= 3;
611
612 /*
613 * If we're not in a valid context with a real (not just lazy)
614 * user mm, then don't even try.
615 */
616 if (!nmi_uaccess_ok())
617 return false;
618
619 mutex_lock(¤t->mm->context.lock);
620 ldt = current->mm->context.ldt;
621 if (ldt && sel < ldt->nr_entries) {
622 *out = ldt->entries[sel];
623 success = true;
624 }
625
626 mutex_unlock(¤t->mm->context.lock);
627
628 return success;
629 }
630 #endif
631 native_store_gdt(&gdt_desc);
632
633 /*
634 * Segment descriptors have a size of 8 bytes. Thus, the index is
635 * multiplied by 8 to obtain the memory offset of the desired descriptor
636 * from the base of the GDT. As bits [15:3] of the segment selector
637 * contain the index, it can be regarded as multiplied by 8 already.
638 * All that remains is to clear bits [2:0].
639 */
640 desc_base = sel & ~(SEGMENT_RPL_MASK | SEGMENT_TI_MASK);
641
642 if (desc_base > gdt_desc.size)
643 return false;
644
645 *out = *(struct desc_struct *)(gdt_desc.address + desc_base);
646 return true;
647 }
648
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org