From nobody Tue Oct 24 13:38:27 2023 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 4SFCnH3Z5dz4y3kx; Tue, 24 Oct 2023 13:38:27 +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 4SFCnH34ffz4ZTW; Tue, 24 Oct 2023 13:38:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698154707; 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=lTEBW+F+ho5Om9DMUTTEm+TIgLPsZubaimdCvsCvkik=; b=pPbRkS6jtITkiykGjOmJ6JGpWjCUxni/A2J5Zx0xlhtBnfdCfQ87bbaN25vkAVOqZBDDT8 5QuLJeYv/TJ+D+7ZvykJx/XQh8fU8sO+dW3aXEHXHG/MGl8a9hTqTaaEGLxeisUgivNUxN lCkM0RmiJLmdkZLYMUQRaKMIKSo6Pf8cX8VVi9H0flA/d9gqkwg05Z+sjzWDo8TBcA/b0N 1xNnRIX8BG6zIogYXnGZKm5coYaKlHrr4RrfxSRd7fLw6jAqL0C/etj2nC0IWdEhSvbGn0 XnDGP7ljz1/g/vulZuTR9XL/DxzjR/tBUK6wEw7Yf6yT2B5qHPz5BrugetHZ7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698154707; a=rsa-sha256; cv=none; b=a0AyFZxiPEHc54xzIAYGk6azkf7GHx4sR/fohZyz/j3ioZEkwtCI1ySwmDVQPK7DkVfVPw NcnIV2oBFfLpzzmMVOXQNmSB42SKK8YfXnVtPHxmfA98MgaZ7r8SzSM4N9kT6uffBbBapP Xnx8FF6ibmNlnUGGxeZpawQgjyWCGn5qRJ8dW7huiHSFYQcetJfBpdE7rmpT2oM6R8Owbh bK9fEXNzdvPkw2M/khhSe1smsW7PXWyTGUXnwLmu6ARxnSn4m58B9JEVlbPVmwA8FcZoZS lKIr5S/t4fSvmvadGhW+IeRSOOMDf9MG4v8paqZz/iyFemTNT9m3D7BIqqmLXA== 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=1698154707; 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=lTEBW+F+ho5Om9DMUTTEm+TIgLPsZubaimdCvsCvkik=; b=bK1aTWwRfF8VX00y14E0zxbib1uMziAq4IW+jq5nV75HbTWaIVbCYcMXCJCLqjZUpjie09 /yh5Iv8zejoOm6UEII43qEXBCtw68uXtM/IlC6+7G/k0cUfselBogQ7wLJWFSTBiX+LvF1 LHwYH5b2PFYT7jqTSQx+z0kIhhCi2Khc36ZSPhi3yOkNk2nFqjevS9UFyCDG619og2rADO vjRX0lk5aSf6jfkUH1Vd+9AycIPrGKwOcxrwHasM7EeF4EblEj2gXHeNJ4XulJ1c//7Le+ e/51dWlh+RJzoy5wTN0MUYFtP2ALC3srM93M7YRQCRBpgGfqyKalkLgOQzHu5g== 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 4SFCnH20drz97G; Tue, 24 Oct 2023 13:38:27 +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 39ODcRhm089487; Tue, 24 Oct 2023 13:38:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39ODcRYu089484; Tue, 24 Oct 2023 13:38:27 GMT (envelope-from git) Date: Tue, 24 Oct 2023 13:38:27 GMT Message-Id: <202310241338.39ODcRYu089484@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: 501e1152d2a0 - stable/14 - linuxkpi: Fix an assertion in linux_free_kmem() 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 501e1152d2a047f8ff8fba6e6efbd2d5e9872738 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=501e1152d2a047f8ff8fba6e6efbd2d5e9872738 commit 501e1152d2a047f8ff8fba6e6efbd2d5e9872738 Author: Mark Johnston AuthorDate: 2023-10-18 13:43:02 +0000 Commit: Mark Johnston CommitDate: 2023-10-24 13:20:12 +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. Reported by: trasz Tested by: trasz Fixes: 6223d0b67af9 ("linuxkpi: Handle direct-mapped addresses in linux_free_kmem()") (cherry picked from commit f88bd1174aab1aff7fea7241ab6e103e769d2d7a) --- 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) {