diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2020-12-18 23:14:39 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2020-12-18 23:14:39 +0000 |
commit | 673e2dd652156342009930cf1f7d15623e4a543a (patch) | |
tree | 765f627665335f3c58e4e245461589ddb0063a75 /sys/compat/freebsd32/freebsd32_misc.c | |
parent | c5354d593df9a5b97b6c4b1d9999915d93c8e103 (diff) | |
download | src-673e2dd652156342009930cf1f7d15623e4a543a.tar.gz src-673e2dd652156342009930cf1f7d15623e4a543a.zip |
Add ELF flag to disable ASLR stack gap.
Also centralize and unify checks to enable ASLR stack gap in a new
helper exec_stackgap().
PR: 239873
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=368772
Diffstat (limited to 'sys/compat/freebsd32/freebsd32_misc.c')
-rw-r--r-- | sys/compat/freebsd32/freebsd32_misc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 6b7fd2deae35..62fab95c68d1 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -3424,8 +3424,7 @@ freebsd32_copyout_strings(struct image_params *imgp, uintptr_t *stack_base) destp = rounddown2(destp, sizeof(uint32_t)); ustringp = destp; - if (imgp->sysent->sv_stackgap != NULL) - imgp->sysent->sv_stackgap(imgp, &destp); + exec_stackgap(imgp, &destp); if (imgp->auxargs) { /* |