aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/freebsd32/freebsd32_misc.c
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2020-12-18 23:14:39 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2020-12-18 23:14:39 +0000
commit673e2dd652156342009930cf1f7d15623e4a543a (patch)
tree765f627665335f3c58e4e245461589ddb0063a75 /sys/compat/freebsd32/freebsd32_misc.c
parentc5354d593df9a5b97b6c4b1d9999915d93c8e103 (diff)
downloadsrc-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.c3
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) {
/*