[memcg:since-4.16 207/224] arch/tile/mm/mmap.c:53:6: error: conflicting types for 'arch_pick_mmap_layout'

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mhocko/mm.git since-4.16
head:   e5edc6faef45baae632fc4c76096a2ab69145c11
commit: a18ed29e39bde6c1aaf0fb449732ba8423bc5964 [207/224] exec: pass stack rlimit into mm layout functions
config: tile-tilegx_defconfig (attached as .config)
compiler: tilegx-linux-gcc (GCC) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout a18ed29e39bde6c1aaf0fb449732ba8423bc5964
        # save the attached .config to linux build tree
        make.cross ARCH=tile 

All errors (new ones prefixed by >>):

>> arch/tile/mm/mmap.c:53:6: error: conflicting types for 'arch_pick_mmap_layout'
    void arch_pick_mmap_layout(struct mm_struct *mm)
         ^~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/slab.h:18:0,
                    from arch/tile/include/asm/pgtable.h:27,
                    from include/linux/memremap.h:8,
                    from include/linux/mm.h:27,
                    from arch/tile/mm/mmap.c:17:
   include/linux/sched/mm.h:107:13: note: previous declaration of 'arch_pick_mmap_layout' was here
    extern void arch_pick_mmap_layout(struct mm_struct *mm,
                ^~~~~~~~~~~~~~~~~~~~~

vim +/arch_pick_mmap_layout +53 arch/tile/mm/mmap.c

867e359b Chris Metcalf 2010-05-28  48  
867e359b Chris Metcalf 2010-05-28  49  /*
867e359b Chris Metcalf 2010-05-28  50   * This function, called very early during the creation of a new
867e359b Chris Metcalf 2010-05-28  51   * process VM image, sets up which VM layout function to use:
867e359b Chris Metcalf 2010-05-28  52   */
867e359b Chris Metcalf 2010-05-28 @53  void arch_pick_mmap_layout(struct mm_struct *mm)
867e359b Chris Metcalf 2010-05-28  54  {
867e359b Chris Metcalf 2010-05-28  55  #if !defined(__tilegx__)
867e359b Chris Metcalf 2010-05-28  56  	int is_32bit = 1;
867e359b Chris Metcalf 2010-05-28  57  #elif defined(CONFIG_COMPAT)
867e359b Chris Metcalf 2010-05-28  58  	int is_32bit = is_compat_task();
867e359b Chris Metcalf 2010-05-28  59  #else
867e359b Chris Metcalf 2010-05-28  60  	int is_32bit = 0;
867e359b Chris Metcalf 2010-05-28  61  #endif
b2eca427 Tony Lu       2013-08-09  62  	unsigned long random_factor = 0UL;
b2eca427 Tony Lu       2013-08-09  63  
b2eca427 Tony Lu       2013-08-09  64  	/*
b2eca427 Tony Lu       2013-08-09  65  	 *  8 bits of randomness in 32bit mmaps, 24 address space bits
b2eca427 Tony Lu       2013-08-09  66  	 * 12 bits of randomness in 64bit mmaps, 28 address space bits
b2eca427 Tony Lu       2013-08-09  67  	 */
b2eca427 Tony Lu       2013-08-09  68  	if (current->flags & PF_RANDOMIZE) {
b2eca427 Tony Lu       2013-08-09  69  		if (is_32bit)
b2eca427 Tony Lu       2013-08-09  70  			random_factor = get_random_int() % (1<<8);
b2eca427 Tony Lu       2013-08-09  71  		else
b2eca427 Tony Lu       2013-08-09  72  			random_factor = get_random_int() % (1<<12);
b2eca427 Tony Lu       2013-08-09  73  
b2eca427 Tony Lu       2013-08-09  74  		random_factor <<= PAGE_SHIFT;
b2eca427 Tony Lu       2013-08-09  75  	}
867e359b Chris Metcalf 2010-05-28  76  
867e359b Chris Metcalf 2010-05-28  77  	/*
867e359b Chris Metcalf 2010-05-28  78  	 * Use standard layout if the expected stack growth is unlimited
867e359b Chris Metcalf 2010-05-28  79  	 * or we are running native 64 bits.
867e359b Chris Metcalf 2010-05-28  80  	 */
b2eca427 Tony Lu       2013-08-09  81  	if (rlimit(RLIMIT_STACK) == RLIM_INFINITY) {
b2eca427 Tony Lu       2013-08-09  82  		mm->mmap_base = TASK_UNMAPPED_BASE + random_factor;
867e359b Chris Metcalf 2010-05-28  83  		mm->get_unmapped_area = arch_get_unmapped_area;
867e359b Chris Metcalf 2010-05-28  84  	} else {
867e359b Chris Metcalf 2010-05-28  85  		mm->mmap_base = mmap_base(mm);
867e359b Chris Metcalf 2010-05-28  86  		mm->get_unmapped_area = arch_get_unmapped_area_topdown;
867e359b Chris Metcalf 2010-05-28  87  	}
867e359b Chris Metcalf 2010-05-28  88  }
b2eca427 Tony Lu       2013-08-09  89  

:::::: The code at line 53 was first introduced by commit
:::::: 867e359b97c970a60626d5d76bbe2a8fadbf38fb arch/tile: core support for Tilera 32-bit chips.

:::::: TO: Chris Metcalf <cmetcalf@xxxxxxxxxx>
:::::: CC: Chris Metcalf <cmetcalf@xxxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[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