From nobody Mon Mar 04 01:00:47 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tp0k84rQYz5Ch3V; Mon, 4 Mar 2024 01:00:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tp0k82GQ5z4ltL; Mon, 4 Mar 2024 01:00:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709514048; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3vah6gSgKTudtOLCvrukw08yUXS/yr3B+c0KPcV1Bys=; b=I/ktrX6uuGWjDGZKARFADqLoNvKuVzijz/iwR00Oz6tjUfg3MbknyH2XzkOAXqaE+yPoIh hZYQmfatYnAWtUI7A6Rm4IzAC6cx2VwzUH5ASDmZPHjlj1I8cKUY+wDDT1i5tY3vbDevjb cK36M+AzGH0gUhNffJUtjgSS/MpGcgAW1Au1T1c4SdvXNiksJBubtzr0wx/ij0H2gvgrY7 S3g/aJGKc0ckg4Y6VfC2Z7fnSJemTF8jk7+z8iX/IRT5UK3C1otXlDsCFfo3LcrJwdVRne ycALdcn4+MRwQ3Pa4i119VFXN4L26Zo4JsbvBXyZ5EZOiW2/QeXj1nmzcUFneg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709514048; a=rsa-sha256; cv=none; b=V+NfZUy9lHZU6kDziHuRkg+OKOUlK+vM0P+Ny1LaHz+uDj/OF0LcpELiQTNnOjeQt1Outm 2/RdLHRknhTIdm/IifVtl4gGk5mtBVrE8/uRip1IT5sE8t+EhjVxwERn8XA5BZOJOMxHJL yIWlzF/tMNuOAHmPW/OcdE7c9C6TrIpLT2N4nfFZJI/rUmye2tTJ+LpQtKEkd9lOsIv2hL U0sAt535bsAaGJ2mhRCX89e8g8KIwWWhdVE/tLZBNWALCcidlHtwl8591TIVo/GpoE3tta F2i2sv+B1mp4oRAzTZjXFiOX4UEUeL0kgiPVq+jJrsDvl3WWphDMdQLH2arXUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709514048; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3vah6gSgKTudtOLCvrukw08yUXS/yr3B+c0KPcV1Bys=; b=gTk5hQW2poip7zzf8xrmdgXEsbXGxCIN/iDrWNo9vP88Iu1ZcUbaEpP4iUSwxKDBkLyLCM T5NRexu7Gpgc0hw4RLUTbu/s6q/hyNvWadU0L267/PDP7fctSVpgblQcoO0EWnmin2sudq lVXtruDaGfXU2D7klIc1tqmqYYApiBH+nMQhLmJPmZ9/p36REHoyUsuMiIkCLv9eYR/0Si 8lojA0KFl5eLTNg80DlGRiuPg+HYFF588EblI1h1BZxCrnjY0YjGcbiiPnNt3vTs3cSX/o tte6ytHeTZ5ow008pLtWk5L7IYi2lEfhsisM9QyUWV+4RbxqBcgLaOmwIoBtmQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tp0k764k2z11Sl; Mon, 4 Mar 2024 01:00:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42410lYj004242; Mon, 4 Mar 2024 01:00:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42410lco004239; Mon, 4 Mar 2024 01:00:47 GMT (envelope-from git) Date: Mon, 4 Mar 2024 01:00:47 GMT Message-Id: <202403040100.42410lco004239@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: a725a7a24de5 - main - posix_spawn(3): document POSIX_SPAWN_DISABLE_ASLR_NP List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a725a7a24de585e996f21e190b5af41261ebc774 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a725a7a24de585e996f21e190b5af41261ebc774 commit a725a7a24de585e996f21e190b5af41261ebc774 Author: Konstantin Belousov AuthorDate: 2024-03-03 22:19:22 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-04 01:00:39 +0000 posix_spawn(3): document POSIX_SPAWN_DISABLE_ASLR_NP Sponsored by: The FreeBSD Foundation MFC after: 1 week --- lib/libc/gen/posix_spawn.3 | 12 +++++++++++- lib/libc/gen/posix_spawnattr_getflags.3 | 3 ++- 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