From 59d8f3ff083f7395b85f30888af849eeca42967e Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Thu, 12 Jul 2007 18:01:31 +0000 Subject: Fix a couple of issues with the stack limit for 32-bit processes on 64-bit kernels exposed by the recent fixes to resource limits for 32-bit processes on 64-bit kernels: - Let ABIs expose their maximum stack size via a new pointer in sysentvec and use that in preference to maxssiz during exec() rather than always using maxssiz for all processses. - Apply the ABI's limit fixup to the previous stack size when adjusting RLIMIT_STACK to determine if the existing mapping for the stack needs to be grown or shrunk (as well as how much it should be grown or shrunk). Approved by: re (kensmith) --- sys/amd64/linux32/linux32_sysvec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/amd64/linux32') diff --git a/sys/amd64/linux32/linux32_sysvec.c b/sys/amd64/linux32/linux32_sysvec.c index 89fa72a6dcdd..ba4adc3b6409 100644 --- a/sys/amd64/linux32/linux32_sysvec.c +++ b/sys/amd64/linux32/linux32_sysvec.c @@ -1023,7 +1023,8 @@ struct sysentvec elf_linux_sysvec = { VM_PROT_ALL, linux_copyout_strings, exec_linux_setregs, - linux32_fixlimit + linux32_fixlimit, + &linux32_maxssiz, }; static Elf32_Brandinfo linux_brand = { -- cgit v1.3