From nobody Wed Oct 25 16:56:42 2023 X-Original-To: dev-commits-src-branches@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 4SFw7b1cQfz4xlGZ; Wed, 25 Oct 2023 16:56:43 +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 4SFw7Z5r6Mz4c3r; Wed, 25 Oct 2023 16:56:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698253002; 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=hCouEN66E4bAzwc7i6Bm4z2FDL+ceStAu8PrO6C0qU0=; b=FhUhN4SZNWFW/323VWfDMsoX2jIf99qHUjrnylWJM4liQ0xzVn5W4PcqxGgPnmOYqfT6h+ m6GR3WmqcWV3r4VBtgcMIGVyyxpL2egd6vP9h0TZFyjG1qelclysws1X3r5f+m8Onfzc2W wZGioHyJNU5XRXSV+/ezRnyIF7KG1KoH9rf/eylfPtA2v5CbH4tmjOHJgfmY0THdsTwWXd hFEY2znZ0wVYD8v5ci+N9CWtUhIiK1IteCQRDf43+b72B/lzc8SWVl0zcJum6l7PML+yYB xu17COhIfG6R0lNtLgFojyHjLevtqj7IklpuPxrBScuUs4UnXvvBfM6qmEen8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698253002; a=rsa-sha256; cv=none; b=iatRRdpwqndcFBPBXpq/l91/AgFMn+iFDJh+bMbW29PDZCPAKECJhD+HCB7NFpbskIBPpF hui3S9KaWfgKZAoU9OsblpGxAyQnI5xkGMf2BrOKSldVMkClq6uJ4BD63fsytkSZ7OwK9O vcw27TAJVFkjMxYyzm7BtSweLS7nzRRwxOix8y7qTP/QxlQTkbdB54b4qedaFDtp72vvli Hq3XKuLdnJUc2elOAaXxMr9GoJOsT51+lI48flUCneStbgDrZxFiWS0gner1EWF7JC1jqK Q/fJtbsCaLsyFqs6c/pJKw4C+hIMdMfYIhTbbPwTds0ipChmUkBk2eI3cbIQ2w== 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=1698253002; 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=hCouEN66E4bAzwc7i6Bm4z2FDL+ceStAu8PrO6C0qU0=; b=kajc9JPXblWFTriDdW+cLx5iBmxECSb3TK9nMN2bYVeGBFuWLQGN9oL5Y4NZpUIk1w7PYK fhO9/aF+U/ifEc2xdYTJxtalnKsplM/NBFEnrRATdZTVVmhagNPgcDwgKMvgexopr8N60v MHkYEOvwHEmGeNvSs34Vplcagb8aIN8k81G85pL2dVAXavK0ySUVOPfiSs/11fkVYOSoij ekvEOujE0LmFB3/DMRkiMWpXEBkRipK3tF59/3TNC19cFkfPe/ZOEMSrQXntjU8G2AoYwB LIfc5QGP+Sgv659qnWniJ6KXXjgZZ2ssZTmB8G1CLcZeps1drGjnacRlQrsIhg== 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 4SFw7Z4ngFz1Brs; Wed, 25 Oct 2023 16:56:42 +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 39PGugsF021967; Wed, 25 Oct 2023 16:56:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39PGugdt021964; Wed, 25 Oct 2023 16:56:42 GMT (envelope-from git) Date: Wed, 25 Oct 2023 16:56:42 GMT Message-Id: <202310251656.39PGugdt021964@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: a2c17b534d37 - releng/14.0 - linuxkpi: Fix an assertion in linux_free_kmem() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: a2c17b534d37467d51c865a0830d9186b1aa8a98 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a2c17b534d37467d51c865a0830d9186b1aa8a98 commit a2c17b534d37467d51c865a0830d9186b1aa8a98 Author: Mark Johnston AuthorDate: 2023-10-18 13:43:02 +0000 Commit: Mark Johnston CommitDate: 2023-10-25 16:53:08 +0000 linuxkpi: Fix an assertion in linux_free_kmem() In the LinuxKPI, PAGE_MASK is the logical negation of FreeBSD's PAGE_MASK, so the original assertion was simply incorrect. Approved by: re (gjb) Reported by: trasz Tested by: trasz Fixes: 6223d0b67af9 ("linuxkpi: Handle direct-mapped addresses in linux_free_kmem()") (cherry picked from commit f88bd1174aab1aff7fea7241ab6e103e769d2d7a) (cherry picked from commit 501e1152d2a047f8ff8fba6e6efbd2d5e9872738) --- sys/compat/linuxkpi/common/src/linux_page.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/src/linux_page.c b/sys/compat/linuxkpi/common/src/linux_page.c index 21e338acb089..ead2f24cf5df 100644 --- a/sys/compat/linuxkpi/common/src/linux_page.c +++ b/sys/compat/linuxkpi/common/src/linux_page.c @@ -193,7 +193,7 @@ linux_alloc_kmem(gfp_t flags, unsigned int order) void linux_free_kmem(vm_offset_t addr, unsigned int order) { - KASSERT((addr & PAGE_MASK) == 0, + KASSERT((addr & ~PAGE_MASK) == 0, ("%s: addr %p is not page aligned", __func__, (void *)addr)); if (addr >= VM_MIN_KERNEL_ADDRESS && addr < VM_MAX_KERNEL_ADDRESS) {