[arm-platforms:kvm/protected-memory 9/16] arch/powerpc/kvm/../../../virt/kvm/kvm_main.c:2745:31: error: 'struct mm_struct' has no member named 'mmap_sem'; did you mean
kernel test robot
lkp at intel.com
Wed Sep 16 08:08:09 EDT 2020
tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git kvm/protected-memory
head: d9455e6eabef4b9be5f33c418a8046e0389edade
commit: 842821613f3ec8a3357ddb6b4b45740bccc38aeb [9/16] KVM: Protected memory extension
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-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
git checkout 842821613f3ec8a3357ddb6b4b45740bccc38aeb
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
All errors (new ones prefixed by >>):
arch/powerpc/kvm/../../../virt/kvm/kvm_main.c: In function 'protect_memory':
>> arch/powerpc/kvm/../../../virt/kvm/kvm_main.c:2745:31: error: 'struct mm_struct' has no member named 'mmap_sem'; did you mean 'mmap_base'?
2745 | if (down_write_killable(&mm->mmap_sem))
| ^~~~~~~~
| mmap_base
arch/powerpc/kvm/../../../virt/kvm/kvm_main.c:2799:16: error: 'struct mm_struct' has no member named 'mmap_sem'; did you mean 'mmap_base'?
2799 | up_write(&mm->mmap_sem);
| ^~~~~~~~
| mmap_base
# https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/commit/?id=842821613f3ec8a3357ddb6b4b45740bccc38aeb
git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git
git fetch --no-tags arm-platforms kvm/protected-memory
git checkout 842821613f3ec8a3357ddb6b4b45740bccc38aeb
vim +2745 arch/powerpc/kvm/../../../virt/kvm/kvm_main.c
2738
2739 static int protect_memory(unsigned long start, unsigned long end, bool protect)
2740 {
2741 struct mm_struct *mm = current->mm;
2742 struct vm_area_struct *vma, *prev;
2743 int ret;
2744
> 2745 if (down_write_killable(&mm->mmap_sem))
2746 return -EINTR;
2747
2748 ret = -ENOMEM;
2749 vma = find_vma(current->mm, start);
2750 if (!vma)
2751 goto out;
2752
2753 ret = -EINVAL;
2754 if (vma->vm_start > start)
2755 goto out;
2756
2757 if (start > vma->vm_start)
2758 prev = vma;
2759 else
2760 prev = vma->vm_prev;
2761
2762 ret = 0;
2763 while (true) {
2764 unsigned long newflags, tmp;
2765
2766 tmp = vma->vm_end;
2767 if (tmp > end)
2768 tmp = end;
2769
2770 newflags = vma->vm_flags;
2771 if (protect)
2772 newflags |= VM_KVM_PROTECTED;
2773 else
2774 newflags &= ~VM_KVM_PROTECTED;
2775
2776 /* The VMA has been handled as part of other memslot */
2777 if (newflags == vma->vm_flags)
2778 goto next;
2779
2780 ret = mprotect_fixup(vma, &prev, start, tmp, newflags);
2781 if (ret)
2782 goto out;
2783
2784 next:
2785 start = tmp;
2786 if (start < prev->vm_end)
2787 start = prev->vm_end;
2788
2789 if (start >= end)
2790 goto out;
2791
2792 vma = prev->vm_next;
2793 if (!vma || vma->vm_start != start) {
2794 ret = -ENOMEM;
2795 goto out;
2796 }
2797 }
2798 out:
2799 up_write(&mm->mmap_sem);
2800 return ret;
2801 }
2802
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 70419 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20200916/868e8c73/attachment-0001.gz>
More information about the linux-arm-kernel
mailing list