linux/arch/arm64
Rik van Riel cf92251dc5 arm64/mmap: properly account for stack randomization in mmap_base
When RLIMIT_STACK is, for example, 256MB, the current code results in a
gap between the top of the task and mmap_base of 256MB, failing to take
into account the amount by which the stack address was randomized.  In
other words, the stack gets less than RLIMIT_STACK space.

Ensure that the gap between the stack and mmap_base always takes stack
randomization and the stack guard gap into account.

Obtained from Daniel Micay's linux-hardened tree.

Link: http://lkml.kernel.org/r/20170622200033.25714-3-riel@redhat.com
Signed-off-by: Daniel Micay <danielmicay@gmail.com>
Signed-off-by: Rik van Riel <riel@redhat.com>
Reported-by: Florian Weimer <fweimer@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Daniel Micay <danielmicay@gmail.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Hugh Dickins <hughd@google.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-07-12 16:26:03 -07:00
..
boot Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-07-05 12:31:59 -07:00
configs ARM: SoC 64-bit changes 2017-07-04 14:53:26 -07:00
crypto crypto: arm64/sha - avoid non-standard inline asm tricks 2017-05-18 13:19:52 +08:00
include arm64: ascii armor the arm64 boot init stack canary 2017-07-12 16:26:03 -07:00
kernel pci-v4.13-changes 2017-07-08 15:51:57 -07:00
kvm The new features of this release: 2017-07-06 19:45:45 -07:00
lib arm64: switch to RAW_COPY_USER 2017-03-28 18:23:24 -04:00
mm arm64/mmap: properly account for stack randomization in mmap_base 2017-07-12 16:26:03 -07:00
net arm64 updates for 4.13: 2017-07-05 17:09:27 -07:00
xen xen/privcmd: Add IOCTL_PRIVCMD_DM_OP 2017-02-14 15:13:43 -05:00
Kconfig include/linux/string.h: add the option of fortified string.h functions 2017-07-12 16:26:03 -07:00
Kconfig.debug arm64: relocation testing module 2017-04-04 17:03:32 +01:00
Kconfig.platforms ARM: SoC 64-bit changes 2017-07-04 14:53:26 -07:00
Makefile arm64: pass endianness info to sparse 2017-06-26 10:15:06 +01:00