lay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YcCSJ19Fkz3CNM; Mon, 20 Jan 2025 14:30:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737383456; 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=YUpPC8TUDOBbQ9TrAr3Tty3EilHY1wzpTtCTs84L5v0=; b=TlRLm2Iw8f3SZ4ad+8YiRJarVW/13gBs34zGTpBrYG+cdoRNRJdspJQwwJRH6Vbp7zlO+v He0id7ev/nlTLtTJVNSQs1UzNUWQG3w+jtaqJFjSaYOGhJ2IyRZYXxMH1EzFmS1ZxHnPbi 7k6olKZEa0yifGVjXzxAdrQgy8ZWHnoB9WfuumnVYVFIXDNAXIwkyXfnneD441gbyLZwY3 WIBMjt95CvQlxLyVX0ooH9C6Sr28pizwH13Kcb2HF8eARhVqTgCltVLl2YXV7XfswCrfAh eMFnb84K/xZ0GwRH4XdEMVLk2zKc9s6/vMJ3AEbmjqpbv7a5cKLDMIeED9NoJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737383456; 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=YUpPC8TUDOBbQ9TrAr3Tty3EilHY1wzpTtCTs84L5v0=; b=vFz5+Bh9PPlD0aWkNfpIZR+wxGNjxvqC0VvwbtMmQLSrqNWrx5Rsu8SKxfg15NpSE2SFJf MZFzQ76H46FkoCXL9yBPrTKV8x+KMDLVJbIyHoSqV/q4T2uIK3xAHwtcdahzI2gsipZbyJ /A0DBRmqU3g1bsAZhvUF5r4mXmkTLb9gvPVIC4RRCTR33m0Cfvk7mS22S+U473w7xK4j+m gL8jwKEA/GD9kWL2mVJLmoSO62dEFZYO5M3M6Ni3mlUP+iZS+drZUqIuYz9ZrguERpMLIF nZCidl+zWbKpRGe8MLJjvuqa5WhyWrGQiGaT4suhpCOFRZBlddwE4xFqGnl4Mg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737383456; a=rsa-sha256; cv=none; b=b6KfGkWfGISSbtUtbkrDiXo9qB04gGUpg4937aW808ztnSajA+ofERNTaPuexYgmlwfUCO IBIwHQiaTPubOjJ71zHgUAZt6TgUIEeogbWVMNansxcVszCtqtQBKxp4mLBOoVA25Ceh4S 18E+xlvku9g9QF/RbOxe+/eDuQmyc+Qggvphgv8W8+UJzWwzlgEYGvwpP8jlV9ul5W+tXJ G0ol9DNRekb52ABYjxB6iBhl/mxcJ8AkuDURwnW6aEC/+OvM0xCHB8ojTdfZh7O72OfPUy CmFukJ0w3TGIqPUk96fQNCWzQJpnjiNJoTV/3zBFiQK7fTgzXZKIWXaz84gTZg== 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 4YcCSJ0lP1z8Rl; Mon, 20 Jan 2025 14:30:56 +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 50KEUuXG002476; Mon, 20 Jan 2025 14:30:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50KEUuUP002473; Mon, 20 Jan 2025 14:30:56 GMT (envelope-from git) Date: Mon, 20 Jan 2025 14:30:56 GMT Message-Id: <202501201430.50KEUuUP002473@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: a52b922c05a4 - stable/13 - munmap.2: Unaligned addresses do not return error 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/stable/13 X-Git-Reftype: branch X-Git-Commit: a52b922c05a46f594fa604e1af3f17f046aba955 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a52b922c05a46f594fa604e1af3f17f046aba955 commit a52b922c05a46f594fa604e1af3f17f046aba955 Author: Ed Maste AuthorDate: 2025-01-15 16:52:58 +0000 Commit: Ed Maste 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 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