git: a52b922c05a4 - stable/13 - munmap.2: Unaligned addresses do not return error

From: Ed Maste <emaste_at_FreeBSD.org>
Date: Mon, 20 Jan 2025 14:30:56 UTC
The branch stable/13 has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=a52b922c05a46f594fa604e1af3f17f046aba955

commit a52b922c05a46f594fa604e1af3f17f046aba955
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2025-01-15 16:52:58 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2025-01-20 14:30:43 +0000

    munmap.2: Unaligned addresses do not return error
    
    We previously claimed that non-page-aligned addresses would return
    EINVAL, but the address is in fact rounded down to the page boundary.
    
    Reported by:    Harald Eilertsen <haraldei@anduin.net>
    Reviewed by:    brooks
    Sponsored by:   The FreeBSD Foundation
    Fixes: dabee6fecc67 ("kern_descrip.c: add fdshare()/fdcopy()")
    Differential Revision: https://reviews.freebsd.org/D48465
    
    (cherry picked from commit 9e36aaf0c24cf158e83c69c1d2312c000c3c36f3)
    (cherry picked from commit 61c50909354ace6f07d0b2113f10965f4546e0ed)
---
 lib/libc/sys/munmap.2 | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/lib/libc/sys/munmap.2 b/lib/libc/sys/munmap.2
index 8f5cb0c02e2b..cf8d9ec22b1c 100644
--- a/lib/libc/sys/munmap.2
+++ b/lib/libc/sys/munmap.2
@@ -25,9 +25,8 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\"	@(#)munmap.2	8.3 (Berkeley) 5/27/94
+.Dd January 15, 2025
 .\"
-.Dd June 22, 2017
 .Dt MUNMAP 2
 .Os
 .Sh NAME
@@ -56,8 +55,6 @@ will fail if:
 .Bl -tag -width Er
 .It Bq Er EINVAL
 The
-.Fa addr
-argument was not page aligned, the
 .Fa len
 argument was zero or negative, or
 some part of the region being unmapped is outside the