From nobody Thu Jan 16 17:53:12 2025 X-Original-To: dev-commits-src-all@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 4YYr7X3TTLz5kjw6; Thu, 16 Jan 2025 17:53:12 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YYr7X2lS9z3QKs; Thu, 16 Jan 2025 17:53:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737049992; 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=N6wrK5to06BYBV2wG4RDNiPgaAFNeQ/hn8k/7fO5FDM=; b=PPV2/iEuqcwmGgvG4oqsthUSYWyqDY1wB3TzaK6JwQMCqB/g+j9xdFeobbJ2LT+o4itKRI dlBZQXIM+e5lFDQ0Ijgbi73cGA+WzMKkZrEsqCbRgHLAijXxP2Ny6KlLIt4zkqlA4FtxEK wa/QhTelwWveFbXYs6SlCDOnkibJRcFtfcIBfBeywrjJiVb5uKEwD9rqDHS+NJsinVno9x ABiUIFTDkxGzwKG2Yf2d4tWRrf12pOQhhNH5EjjcOqvHS4FJjxqkxB9ou0nd7FMvv/jcD7 kaC8ZDuY4u9zN2j+RBBwv5iRQ617FaiKhMpQIbbZB3dTewgYpuMzlQNhyXAkyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737049992; 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=N6wrK5to06BYBV2wG4RDNiPgaAFNeQ/hn8k/7fO5FDM=; b=RrIi9fFRO+i9CeZrvJkZYf+GIzYikTnEry0KKbCpm38ml3aa/ZrCEHUnLumgR8Ha1xtSuR yEr1PkbrQfjhija5KM9dE2cau4SPl7s05I1OFLRrIpv748IXKbMMh9zcjamMnlJU5VpEtV 4CurvEiCrg3CskYxlbyFKI+VTxf7KkQ1m/3DlaMCprav83gqPFihi5yFe3AvDC4/H0cowO IFv6ekyc02frvDqu15527vsSCtmi2dP58GnoLfKwRd7786NJppDaEv1tiDjxn5iveyCgtn 1AC+OKt+Eg/50XmKPZsQKdr+yqRStLuiErWDjEZANDFH/LGOo+nvubeM1SyjRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737049992; a=rsa-sha256; cv=none; b=rbZsf9n0Rnyn6PpbjBPl61aIS7SPDlmR8ime3PZusJO52PHgoHrR1qxIlVkl8MKyCNGmMt +D9Q8bbzHYo+2c+v/m3R7ykvbSfUMrTgBGmO5c3E/Joy/NPW7Dy4BigzezEmice2cZDTAX LN/oGzbfWN7P0acSbDO6jh+fHbZ2UwDWBKkDK8IEZ+/2uWcNkdHoKEXlN21mlRfT2/fQPF MBp2uQyhqRXExWiTCep3M/EwUPlSP6AJ+KzJrAoMMPpxajeiuOcM1e5SA9ntNLF0WCsZ2W lxZKsV3td5XYmCeEkexrBPjsC3PkHzUSK8AMQ6Yl6gWzD9cCDDlbEnCmftCUFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4YYr7X2B2xzk7N; Thu, 16 Jan 2025 17:53:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50GHrCNi069993; Thu, 16 Jan 2025 17:53:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50GHrCWD069990; Thu, 16 Jan 2025 17:53:12 GMT (envelope-from git) Date: Thu, 16 Jan 2025 17:53:12 GMT Message-Id: <202501161753.50GHrCWD069990@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 724e383bd4c4 - main - munmap.2: Add STANDARDS and note about portability List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 724e383bd4c40ea7db4bf2f1e9b8d2c741c6b481 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=724e383bd4c40ea7db4bf2f1e9b8d2c741c6b481 commit 724e383bd4c40ea7db4bf2f1e9b8d2c741c6b481 Author: Ed Maste AuthorDate: 2025-01-15 21:43:49 +0000 Commit: Ed Maste CommitDate: 2025-01-16 17:50:47 +0000 munmap.2: Add STANDARDS and note about portability POSIX used to specify that munmap shall fail with EINVAL if the addr argument is not a multiple of the page size, but that was changed to may fail. Note that we conform to contemporary POSIX and include a brief note for portable programs. Reviewed by: brooks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48481 --- lib/libsys/munmap.2 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/libsys/munmap.2 b/lib/libsys/munmap.2 index d6b53f1bcf19..5c587d652a42 100644 --- a/lib/libsys/munmap.2 +++ b/lib/libsys/munmap.2 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 15, 2025 +.Dd January 16, 2025 .Dt MUNMAP 2 .Os .Sh NAME @@ -66,6 +66,15 @@ valid address range for a process. .Xr mprotect 2 , .Xr msync 2 , .Xr getpagesize 3 +.Sh STANDARDS +The +.Fn munmap +system call conforms to +.St -p1003.1-2024 . +Portable programs should ensure that +.Fa addr +is a multiple of the page size as returned by +.Xr sysconf 3 . .Sh HISTORY The .Fn munmap