From nobody Wed Jan 15 18:10:20 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 4YYDYm5fFfz5kSDq; Wed, 15 Jan 2025 18:10:20 +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 4YYDYm4ccpz3D0C; Wed, 15 Jan 2025 18:10:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736964620; 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=jg+GuHQzjJeoP5DLfMx2QEVpqVzWVvxI71Jt9fkUvSY=; b=aSVrlYoyxWx1IUdlvOGDkillaTLYjEGFrf8mbixYKJLsk3uUipWGUT1AIKLGCJWH4NtSUc yZ/kAXaf+Y+sreHpyZee1lFUx+CaHW/X9R1cOVPhYEze1awLWNKfEEPS+nDoECWvmbvOem Vk8C9bfEcVqwolazAGlikHC6rKoXUAzAv8Uir8bSntA0aRq2LB7CI+nZ7fKfJ2T4P5aMu3 SgwAo8491s4NO7Gv0Q9UCSWtcC7+Sq62CCK6cDXVH4LBGqnh6yybPrAYLzwFC02ZFJNzwE Gv8Egj2tx7IUfOsj8G8ekt6t/8zNxhVpSxwPN4BOHEPDeIX0Ncejt17zcRjB4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736964620; 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=jg+GuHQzjJeoP5DLfMx2QEVpqVzWVvxI71Jt9fkUvSY=; b=sdNMnS1i5srquD/2UTI74vxcLX8Rar5uRLPVuNe8aGBOPPyxoFEohLUs9WCcB+iOrpEpZA pkfOZhrQJoleX1KIXbzXAWnZANSQCQ+r4ZwPsPusmyy4TQJMWNN02q2LMPwV90ofbLEz3J RA/P8fOYLW6qKWs/F/aLifM8bJmPhajBLL8hz2p1Z0KLys+VWw5ku+qDH9ODP56HBAUcQf V3U+8iis4lfnjul4o8L1ecoUVfDJGsKRnX22EwvlGmYIrk4y7EEtAChW6W3lBBfIbADFYj bHJ9B318muMEhh9/4K0iC8lCPl2x12Xb5leJR7x0FpZsfNYxzREx5CZDrrpaog== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1736964620; a=rsa-sha256; cv=none; b=JxxOdlcm0acYPlaphNQWL58pBJlCAbg4b9p8ilxFNim9zwOfWbAT83xD/IGBWAtZlXjhuk 1g8BJPoNStHNUBuNComJReu5A3EWCvMy7DYaUgp+ou5Je4JTEQhtcY7J0ATlCgbAxk6oYt tUhEXePH1o2TlFA0IP6bNDut/7Xn5+o0iGDibOZztCpM8Q4WbvZlCpA8+R146tHxA54E3X rGFX3F+M34KLG6wGPpw3Yq7vF+fAzp83e3GuPFMjnaIng1NN4yh/+iKd5/p/U96tBqH/Gh qJVlae9wnBynKUe7l/5OB+88Ky3jC6gZBzVTkIOSUDh31tUGuXXAO5VVqEce8g== 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 4YYDYm3xMXzxXX; Wed, 15 Jan 2025 18:10:20 +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 50FIAKCu000954; Wed, 15 Jan 2025 18:10:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50FIAKsL000951; Wed, 15 Jan 2025 18:10:20 GMT (envelope-from git) Date: Wed, 15 Jan 2025 18:10:20 GMT Message-Id: <202501151810.50FIAKsL000951@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: 9e36aaf0c24c - main - 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/main X-Git-Reftype: branch X-Git-Commit: 9e36aaf0c24cf158e83c69c1d2312c000c3c36f3 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=9e36aaf0c24cf158e83c69c1d2312c000c3c36f3 commit 9e36aaf0c24cf158e83c69c1d2312c000c3c36f3 Author: Ed Maste AuthorDate: 2025-01-15 16:52:58 +0000 Commit: Ed Maste CommitDate: 2025-01-15 18:09:37 +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 --- lib/libsys/munmap.2 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/libsys/munmap.2 b/lib/libsys/munmap.2 index dce76d355c1f..560ed0056260 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 June 22, 2017 +.Dd January 15, 2025 .Dt MUNMAP 2 .Os .Sh NAME @@ -54,8 +54,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