Re: [PATCHv5 1/5] x86/mm: introduce arch_rnd() to compute 32/64 mmap rnd

From: Dmitry Safonov
Date: Wed Feb 15 2017 - 04:41:03 EST


On 02/15/2017 01:22 AM, kbuild test robot wrote:
Hi Dmitry,
...
vim +/mmap_rnd_compat_bits +58 arch/x86/mm/mmap.c

52 * Leave an at least ~128 MB hole with possible stack randomization.
53 */
54 #define MIN_GAP (128*1024*1024UL + stack_maxrandom_size())
55 #define MAX_GAP (TASK_SIZE/6*5)
56
57 #ifdef CONFIG_64BIT
> 58 # define mmap32_rnd_bits mmap_rnd_compat_bits
59 # define mmap64_rnd_bits mmap_rnd_bits
60 #else
61 # define mmap32_rnd_bits mmap_rnd_bits
62 # define mmap64_rnd_bits mmap_rnd_bits
63 #endif

Yep, thanks - it's better be ifdef CONFIG_COMPAT.
Will resend today with this trivial fixup.

--
Dmitry