linux/arch/metag
James Hogan 56ecdc3d9e metag: Reduce maximum stack size to 256MB
commit d71f290b4e upstream.

Specify the maximum stack size for arches where the stack grows upward
(parisc and metag) in asm/processor.h rather than hard coding in
fs/exec.c so that metag can specify a smaller value of 256MB rather than
1GB.

This fixes a BUG on metag if the RLIMIT_STACK hard limit is increased
beyond a safe value by root. E.g. when starting a process after running
"ulimit -H -s unlimited" it will then attempt to use a stack size of the
maximum 1GB which is far too big for metag's limited user virtual
address space (stack_top is usually 0x3ffff000):

BUG: failure at fs/exec.c:589/shift_arg_pages()!

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Helge Deller <deller@gmx.de>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: linux-parisc@vger.kernel.org
Cc: linux-metag@vger.kernel.org
Cc: John David Anglin <dave.anglin@bell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-07 13:25:38 -07:00
..
boot metag: avoid unnecessary builtin dtb rebuilds 2013-04-22 11:23:20 +01:00
configs metag: defconfigs: increase log buffer 8KiB => 128KiB 2013-04-25 13:09:27 +01:00
include metag: Reduce maximum stack size to 256MB 2014-06-07 13:25:38 -07:00
kernel dump_stack: unify debug information printed by show_regs() 2013-04-30 17:04:02 -07:00
lib metag: move usercopy.c exports out of metag_ksyms.c 2013-03-02 20:11:15 +00:00
mm Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2013-05-02 10:16:16 -07:00
oprofile metag: OProfile support 2013-03-15 13:21:05 +00:00
tbx metag: Build infrastructure 2013-03-02 20:09:54 +00:00
Kconfig Removal of GENERIC_GPIO for v3.10 2013-05-09 09:59:16 -07:00
Kconfig.debug metag: Build infrastructure 2013-03-02 20:09:54 +00:00
Kconfig.soc metag: Build infrastructure 2013-03-02 20:09:54 +00:00
Makefile metag: OProfile support 2013-03-15 13:21:05 +00:00