From nobody Fri Jun 14 04:19:04 2024 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 4W0mHr6Mxjz5NKT2; Fri, 14 Jun 2024 04:19:04 +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 4W0mHr5kj4z4mGP; Fri, 14 Jun 2024 04:19:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718338744; 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=5B5VvieNBc+S4Q+9qQ+mmxV7FUWT9vxOV+BN05682Lk=; b=ZdnFvL5XWxKpZfonOuoHyImxsprkpvpQl/cRv1W9Y34gynUVkRrDYWHVsR1pzcH01T9p3u YTrFSjK5GoLPbfjjhQRs8KAu8z5Rzqei1HU6Nh9Qac1Lx5MaE4q8Jhu+0s2gApPG+Nta9r Tg9rHZBPq8/+BQnyuKDLMMess/zNGUbRUTNxfcYV83vJcX1w7eoOM1Oqd5il4Lh1Hc7uYN KEuFLj0Rw25lsD5BFIdhoAHKTtgTIrjEbdFhArn2/zLLMsPNsuCn8ZHNFiZQpcFmwiOItQ h5O8t3Ci2wUqlVmBeTOu/4E/WkhFDs0Dk7BvO/BVEhVdYj6yfs6i5v1HxxQ56A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718338744; a=rsa-sha256; cv=none; b=MZUFpAJeBPtyTkRgiSLn6G75fNEkeKV4OiqHi0DONHLarnsvPlQblu4CRPSFydlyB/+iBX lnyh9rAqvT4iPbHnrYg4bYNh0clueuz0KRcRN/Q4B41MR52rGcmD2Hg/eRTMIRnLOW7P2J 0IznQT88qb5zdLdQiX5ly1lwR5DShaL7bODoe1+5Qia9z14b2/KyHK0bNxYBVDbcJO5ULG qs2EAiw6VXrA//Q6bDuVN2MtN7QnzxkBzrKcpRYawnqRePmXz06UOp64hPRASSD7Lw2znc LLCOylTa9JPxdzCWKaVk4IDgYx21pWnezdxi5vIEhWkpiy5XZSnhrRlm26ZPyw== 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=1718338744; 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=5B5VvieNBc+S4Q+9qQ+mmxV7FUWT9vxOV+BN05682Lk=; b=MFiFWbA/tZhCOXkPmwaMFrBfyrLuxP/KGzsIbdJPolvpCbcnN0tfgkOYQ4a2Dm3GsU7MHd NQRNmGjYzyEM976eeo8+QAetp+C2DG5ZSucTNXXCikE8FBS4dY2noeFGvGwtbSsCVpYctB MGhwS5c2lIBiWzdBHvcV2bcOSn1z0r+pfNtqth2cq0akSC9ILZ7fWbjy5M19gPXM2/bM1Y pVhix0JSmFcC4+5mUiFUwuvQOA3xyW6imJpsT5ffIryGZpB9JkmWMIwtjrCxy3PpqMmwR/ 5wE6kGfQDv1wdjWAm/SMArw3IJlZ/SRFheDwjgmY+99q58DGfPJbQJPNMgeWeg== 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 4W0mHr5L6Yz14vr; Fri, 14 Jun 2024 04:19:04 +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 45E4J46V050323; Fri, 14 Jun 2024 04:19:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45E4J4Tx050320; Fri, 14 Jun 2024 04:19:04 GMT (envelope-from git) Date: Fri, 14 Jun 2024 04:19:04 GMT Message-Id: <202406140419.45E4J4Tx050320@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: fbff6d54da14 - main - vm_phys: Fix vm_phys_find_range() after commit 69cbb18746b6 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fbff6d54da146e98ec2ce4ebfbb86339d4f9fa21 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=fbff6d54da146e98ec2ce4ebfbb86339d4f9fa21 commit fbff6d54da146e98ec2ce4ebfbb86339d4f9fa21 Author: Mark Johnston AuthorDate: 2024-06-14 04:09:45 +0000 Commit: Mark Johnston CommitDate: 2024-06-14 04:18:26 +0000 vm_phys: Fix vm_phys_find_range() after commit 69cbb18746b6 vm_phys_seg_paddr_to_vm_page() expects a PA that's in bounds, but vm_phys_find_range() purposefully returns a pointer to the end of the last page in a segment. Fixes: 69cbb18746b6 ("vm_phys: Add a vm_phys_seg_paddr_to_vm_page() helper") --- sys/vm/vm_phys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/vm/vm_phys.c b/sys/vm/vm_phys.c index a28b3a40691e..53e58283eb9f 100644 --- a/sys/vm/vm_phys.c +++ b/sys/vm/vm_phys.c @@ -1450,7 +1450,7 @@ vm_phys_find_range(vm_page_t bounds[], int segind, int domain, vm_phys_lazy_init_domain(domain, false); #endif bounds[0] = vm_phys_seg_paddr_to_vm_page(seg, pa_start); - bounds[1] = vm_phys_seg_paddr_to_vm_page(seg, pa_end); + bounds[1] = &seg->first_page[atop(pa_end - seg->start)]; return (seg - vm_phys_segs); } return (-1);