Re: [PATCH v2 6/9] mm: Make hugetlb mappings go through mm_get_unmapped_area_vmflags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Oscar,

kernel test robot noticed the following build warnings:

[auto build test WARNING on s390/features]
[also build test WARNING on akpm-mm/mm-everything powerpc/next powerpc/fixes deller-parisc/for-next arnd-asm-generic/master linus/master v6.11-rc2 next-20240805]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Oscar-Salvador/mm-mmap-Teach-generic_get_unmapped_area-_topdown-to-handle-hugetlb-mappings/20240729-171449
base:   https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git features
patch link:    https://lore.kernel.org/r/20240729091018.2152-7-osalvador%40suse.de
patch subject: [PATCH v2 6/9] mm: Make hugetlb mappings go through mm_get_unmapped_area_vmflags
config: x86_64-randconfig-012-20240802 (https://download.01.org/0day-ci/archive/20240806/202408060456.yBmmX9hr-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240806/202408060456.yBmmX9hr-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408060456.yBmmX9hr-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> arch/x86/mm/hugetlbpage.c:84:1: warning: no previous prototype for 'hugetlb_get_unmapped_area' [-Wmissing-prototypes]
      84 | hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
         | ^~~~~~~~~~~~~~~~~~~~~~~~~


vim +/hugetlb_get_unmapped_area +84 arch/x86/mm/hugetlbpage.c

^1da177e4c3f41 arch/i386/mm/hugetlbpage.c Linus Torvalds         2005-04-16   82  
^1da177e4c3f41 arch/i386/mm/hugetlbpage.c Linus Torvalds         2005-04-16   83  unsigned long
^1da177e4c3f41 arch/i386/mm/hugetlbpage.c Linus Torvalds         2005-04-16  @84  hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
^1da177e4c3f41 arch/i386/mm/hugetlbpage.c Linus Torvalds         2005-04-16   85  		unsigned long len, unsigned long pgoff, unsigned long flags)
^1da177e4c3f41 arch/i386/mm/hugetlbpage.c Linus Torvalds         2005-04-16   86  {
39c11e6c05b7fe arch/x86/mm/hugetlbpage.c  Andi Kleen             2008-07-23   87  	struct hstate *h = hstate_file(file);
^1da177e4c3f41 arch/i386/mm/hugetlbpage.c Linus Torvalds         2005-04-16   88  	struct mm_struct *mm = current->mm;
^1da177e4c3f41 arch/i386/mm/hugetlbpage.c Linus Torvalds         2005-04-16   89  	struct vm_area_struct *vma;
^1da177e4c3f41 arch/i386/mm/hugetlbpage.c Linus Torvalds         2005-04-16   90  
39c11e6c05b7fe arch/x86/mm/hugetlbpage.c  Andi Kleen             2008-07-23   91  	if (len & ~huge_page_mask(h))
^1da177e4c3f41 arch/i386/mm/hugetlbpage.c Linus Torvalds         2005-04-16   92  		return -EINVAL;
44b04912fa7248 arch/x86/mm/hugetlbpage.c  Kirill A. Shutemov     2017-07-17   93  
^1da177e4c3f41 arch/i386/mm/hugetlbpage.c Linus Torvalds         2005-04-16   94  	if (len > TASK_SIZE)
^1da177e4c3f41 arch/i386/mm/hugetlbpage.c Linus Torvalds         2005-04-16   95  		return -ENOMEM;
^1da177e4c3f41 arch/i386/mm/hugetlbpage.c Linus Torvalds         2005-04-16   96  
1e0f25dbf2464d arch/x86/mm/hugetlbpage.c  Kirill A. Shutemov     2017-11-15   97  	/* No address checking. See comment at mmap_address_hint_valid() */
5a8130f2b186ac arch/i386/mm/hugetlbpage.c Benjamin Herrenschmidt 2007-05-06   98  	if (flags & MAP_FIXED) {
a5516438959d90 arch/x86/mm/hugetlbpage.c  Andi Kleen             2008-07-23   99  		if (prepare_hugepage_range(file, addr, len))
5a8130f2b186ac arch/i386/mm/hugetlbpage.c Benjamin Herrenschmidt 2007-05-06  100  			return -EINVAL;
5a8130f2b186ac arch/i386/mm/hugetlbpage.c Benjamin Herrenschmidt 2007-05-06  101  		return addr;
5a8130f2b186ac arch/i386/mm/hugetlbpage.c Benjamin Herrenschmidt 2007-05-06  102  	}
5a8130f2b186ac arch/i386/mm/hugetlbpage.c Benjamin Herrenschmidt 2007-05-06  103  
^1da177e4c3f41 arch/i386/mm/hugetlbpage.c Linus Torvalds         2005-04-16  104  	if (addr) {
1e0f25dbf2464d arch/x86/mm/hugetlbpage.c  Kirill A. Shutemov     2017-11-15  105  		addr &= huge_page_mask(h);
1e0f25dbf2464d arch/x86/mm/hugetlbpage.c  Kirill A. Shutemov     2017-11-15  106  		if (!mmap_address_hint_valid(addr, len))
1e0f25dbf2464d arch/x86/mm/hugetlbpage.c  Kirill A. Shutemov     2017-11-15  107  			goto get_unmapped_area;
1e0f25dbf2464d arch/x86/mm/hugetlbpage.c  Kirill A. Shutemov     2017-11-15  108  
^1da177e4c3f41 arch/i386/mm/hugetlbpage.c Linus Torvalds         2005-04-16  109  		vma = find_vma(mm, addr);
1e0f25dbf2464d arch/x86/mm/hugetlbpage.c  Kirill A. Shutemov     2017-11-15  110  		if (!vma || addr + len <= vm_start_gap(vma))
^1da177e4c3f41 arch/i386/mm/hugetlbpage.c Linus Torvalds         2005-04-16  111  			return addr;
^1da177e4c3f41 arch/i386/mm/hugetlbpage.c Linus Torvalds         2005-04-16  112  	}
1e0f25dbf2464d arch/x86/mm/hugetlbpage.c  Kirill A. Shutemov     2017-11-15  113  
1e0f25dbf2464d arch/x86/mm/hugetlbpage.c  Kirill A. Shutemov     2017-11-15  114  get_unmapped_area:
529ce23a764f25 arch/x86/mm/hugetlbpage.c  Rick Edgecombe         2024-03-25  115  	if (!test_bit(MMF_TOPDOWN, &mm->flags))
^1da177e4c3f41 arch/i386/mm/hugetlbpage.c Linus Torvalds         2005-04-16  116  		return hugetlb_get_unmapped_area_bottomup(file, addr, len,
^1da177e4c3f41 arch/i386/mm/hugetlbpage.c Linus Torvalds         2005-04-16  117  				pgoff, flags);
^1da177e4c3f41 arch/i386/mm/hugetlbpage.c Linus Torvalds         2005-04-16  118  	else
^1da177e4c3f41 arch/i386/mm/hugetlbpage.c Linus Torvalds         2005-04-16  119  		return hugetlb_get_unmapped_area_topdown(file, addr, len,
^1da177e4c3f41 arch/i386/mm/hugetlbpage.c Linus Torvalds         2005-04-16  120  				pgoff, flags);
^1da177e4c3f41 arch/i386/mm/hugetlbpage.c Linus Torvalds         2005-04-16  121  }
fd8526ad14c182 arch/x86/mm/hugetlbpage.c  Kirill A. Shutemov     2013-11-19  122  #endif /* CONFIG_HUGETLB_PAGE */
^1da177e4c3f41 arch/i386/mm/hugetlbpage.c Linus Torvalds         2005-04-16  123  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux