selftests: proc: Make va_max 1MB
authorMasami Hiramatsu <mhiramat@kernel.org>
Wed, 23 Oct 2019 04:57:40 +0000 (13:57 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 31 Dec 2019 15:45:07 +0000 (16:45 +0100)
commita58f4afe22354a080cc099f5edcde15b8805c410
tree50ac9c16ebf497d69105e4db46135a73c480ac18
parent20832ebf91a654579c029ae627b961137ad47b1a
selftests: proc: Make va_max 1MB

[ Upstream commit 2f3571ea71311bbb2cbb9c3bbefc9c1969a3e889 ]

Currently proc-self-map-files-002.c sets va_max (max test address
of user virtual address) to 4GB, but it is too big for 32bit
arch and 1UL << 32 is overflow on 32bit long.
Also since this value should be enough bigger than vm.mmap_min_addr
(64KB or 32KB by default), 1MB should be enough.

Make va_max 1MB unconditionally.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/proc/proc-self-map-files-002.c