imgact_elf: Disable the stack gap for now

The integration with RLIMIT_STACK is still causing problems for some
programs such as lang/sdcc and syzkaller's executor.  Until this is
resolved by some work currently in progress, disable the stack gap by
default.

PR:		260303
Reviewed by:	kib, emaste
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D33438
This commit is contained in:
Mark Johnston 2021-12-14 16:15:06 -05:00
parent 754c4757c9
commit bfd451210e

View File

@ -201,7 +201,7 @@ SYSCTL_INT(ASLR_NODE_OID, OID_AUTO, honor_sbrk, CTLFLAG_RW,
&__elfN(aslr_honor_sbrk), 0,
__XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) ": assume sbrk is used");
static int __elfN(aslr_stack_gap) = 3;
static int __elfN(aslr_stack_gap) = 0;
SYSCTL_INT(ASLR_NODE_OID, OID_AUTO, stack_gap, CTLFLAG_RW,
&__elfN(aslr_stack_gap), 0,
__XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE))