Re: [PATCH 1/2] x86/mm: don't mmap() over 4GB with compat syscall

From: kbuild test robot
Date: Thu Jan 12 2017 - 06:52:16 EST


Hi Dmitry,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.10-rc3 next-20170111]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Dmitry-Safonov/Fix-compatible-mmap-return-pointer-over-4Gb/20170112-185732
config: x86_64-randconfig-x016-201702 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

All errors (new ones prefixed by >>):

arch/x86/kernel/sys_x86_64.c: In function 'find_start_end':
>> arch/x86/kernel/sys_x86_64.c:122:13: error: 'mmap_rnd_compat_bits' undeclared (first use in this function)
1UL << mmap_rnd_compat_bits);
^~~~~~~~~~~~~~~~~~~~
arch/x86/kernel/sys_x86_64.c:122:13: note: each undeclared identifier is reported only once for each function it appears in
arch/x86/kernel/sys_x86_64.c: In function 'arch_get_unmapped_area_topdown':
arch/x86/kernel/sys_x86_64.c:202:31: error: 'mmap_rnd_compat_bits' undeclared (first use in this function)
unsigned long rnd = 1UL << mmap_rnd_compat_bits;
^~~~~~~~~~~~~~~~~~~~

vim +/mmap_rnd_compat_bits +122 arch/x86/kernel/sys_x86_64.c

116 *end = 0x80000000;
117 return;
118 }
119 if (current->thread.status & TS_COMPAT) {
120 if (current->flags & PF_RANDOMIZE)
121 *begin = randomize_page(*begin,
> 122 1UL << mmap_rnd_compat_bits);
123 *end = IA32_PAGE_OFFSET;
124 return;
125 }

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

Attachment: .config.gz
Description: application/gzip