From: kbuild test robot <lkp@intel.com>
To: Kees Cook <keescook@chromium.org>
Cc: kbuild-all@01.org, linux-mm@kvack.org,
Michal Hocko <mhocko@suse.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: [memcg:since-4.16 207/224] arch/tile/mm/mmap.c:53:6: error: conflicting types for 'arch_pick_mmap_layout'
Date: Wed, 11 Apr 2018 19:16:50 +0800 [thread overview]
Message-ID: <201804111943.GtB7X93z%fengguang.wu@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4458 bytes --]
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@tilera.com>
:::::: CC: Chris Metcalf <cmetcalf@tilera.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 16732 bytes --]
next reply other threads:[~2018-04-11 11:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-11 11:16 kbuild test robot [this message]
2018-04-11 11:33 ` Michal Hocko
2018-04-11 12:25 ` [kbuild-all] " Li, Philip
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201804111943.GtB7X93z%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=kbuild-all@01.org \
--cc=keescook@chromium.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox