aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2024-03-03 22:19:22 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2024-03-11 00:25:58 +0000
commit7178cd5f810809d0329327131f8181d2c954918f (patch)
tree695a049059d7e7dca299ba87664a06f1a120e3be /lib
parentb5e95d17ec8958e26efe70368405e6dd18df6336 (diff)
posix_spawn(3): document POSIX_SPAWN_DISABLE_ASLR_NP
(cherry picked from commit a725a7a24de585e996f21e190b5af41261ebc774)
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/posix_spawn.312
-rw-r--r--lib/libc/gen/posix_spawnattr_getflags.33
2 files changed, 13 insertions, 2 deletions
diff --git a/lib/libc/gen/posix_spawn.3 b/lib/libc/gen/posix_spawn.3
index a9ff7b2b21da..55559ae7222b 100644
--- a/lib/libc/gen/posix_spawn.3
+++ b/lib/libc/gen/posix_spawn.3
@@ -32,7 +32,7 @@
.\" the referee document. The original Standard can be obtained online at
.\" http://www.opengroup.org/unix/online.html.
.\"
-.Dd November 28, 2021
+.Dd March 4, 2024
.Dt POSIX_SPAWN 3
.Os
.Sh NAME
@@ -297,6 +297,15 @@ and the signals being indicated in the spawn-sigdefault attribute
of the object referenced by
.Fa attrp .
.Pp
+The Address Space Layout Randomization for the newly spawned process
+can be disabled by specifying the
+.Dv POSIX_SPAWN_DISABLE_ASLR_NP
+flag in the spawn-flags attribute.
+This setting is inherited by future children of the child as well.
+See
+.Xr procctl 2
+for more details.
+.Pp
If the value of the
.Fa attrp
pointer is NULL, then the default values are used.
@@ -432,6 +441,7 @@ action.
.Xr execve 2 ,
.Xr fcntl 2 ,
.Xr open 2 ,
+.Xr procctl 2 ,
.Xr sched_setparam 2 ,
.Xr sched_setscheduler 2 ,
.Xr setpgid 2 ,
diff --git a/lib/libc/gen/posix_spawnattr_getflags.3 b/lib/libc/gen/posix_spawnattr_getflags.3
index 18cf6683e935..308bbb386d76 100644
--- a/lib/libc/gen/posix_spawnattr_getflags.3
+++ b/lib/libc/gen/posix_spawnattr_getflags.3
@@ -32,7 +32,7 @@
.\" the referee document. The original Standard can be obtained online at
.\" http://www.opengroup.org/unix/online.html.
.\"
-.Dd March 24, 2008
+.Dd March 4, 2024
.Dt POSIX_SPAWNATTR_GETFLAGS 3
.Os
.Sh NAME
@@ -75,6 +75,7 @@ It is the bitwise-inclusive OR of zero or more of the following flags
.It Dv POSIX_SPAWN_SETSIGMASK
.It Dv POSIX_SPAWN_SETSCHEDPARAM
.It Dv POSIX_SPAWN_SETSCHEDULER
+.It Dv POSIX_SPAWN_DISABLE_ASLR_NP
.El
.Pp
These flags are defined in