From nobody Sun Jul 21 08:51:17 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 4WRcZs4pK8z5R4gQ; Sun, 21 Jul 2024 08:51:17 +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 4WRcZs3Y74z4lWG; Sun, 21 Jul 2024 08:51:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721551877; 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=N4dFkmws7SiVyXqy4ieDXJG4w8GIqlGLUoOviYL0NBE=; b=Go5ZwCwtf+FnFeiZnuKgefZ3rBo20Spi/H5x/OzTO8Tt+8uBNMRxrL8oTKcHdKzIJijDT9 aF9bMozpqdS4JFV2l8bYInKUMmrx9MR7x7fS6nNre4dgNkJAKT/rC5tchlMVODuXOW1Z2Y LBnhVXxqi+r9UeWBlXVY+YtPQQ45KPoKXeR1+UqFHJN/dsBQv7PXhXw8P3Db+ej43FYG09 +F1JGLvDdSklMHzfsZuVSzItVnE4LSAHljdQGfMUxrEOkOujI+A9jgj5pInbdlfLf4B+Z4 6JdhFYQAhkuVNzSeIts7xN7wgWkGYdsUJv4S+kM8BTHxFKJEGCvhdMylNzlvbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721551877; a=rsa-sha256; cv=none; b=eFvQECU5h4yFBs6z4tuJtISoKdgIOedxSEIPiQH0+b2DDkvqXy0asqzBWMOzhBQBJ7+7tR NRObeGeeRnq09fQGKn1MRXEH7Cmk+m1KEf0s+AO8wzyT+uHDHZo+FwA7K2RTx6SDtB+YgQ AixwZKCMvVzLP20pkJ4lV5NKEF3E02mhMgzR5qgLtaXNFC+fXRen4R9PK3g+KZ1N8BtyTH wTr+Z3XxNABNgLFOXdD7Mrbbtka44PWZijCeS8qRrZGHzc+8FDHohmPK7T6kGm/+9M8XS7 29yqbRXJTZZMp7mRo3p7FVnJFEWGjQmpfZaQXsv3TTfdYjyj75+zdL3K0vrePg== 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=1721551877; 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=N4dFkmws7SiVyXqy4ieDXJG4w8GIqlGLUoOviYL0NBE=; b=T5kY80Oo7XYeKcm8SdGNWWj8qFTX9ALPgvT01mykJ3AGo4tjzxo4Zjkyc8icljLUX0JrPK Fl9L0zLQ7qnmEaX0R3i+++xl13NTbKiey3s8TExhl68mfV9a7rDMa9L4Z5kiYVcZ6Eu/Ze gFP2+38py82wR8sr0YL02oSGe9PZCNZvzBZ3tkDprAjg4XPaaGSDzGHITB7LRBobPx77nI lGmzivO2+TnK6YuFMmyu/fyaViQsR03G2DiegkB2NlNNSZUb8mJmQKVEE/Tiv8f7KyuI85 qoH3ZB4XgI9HXBYAqeBNxknugqpalfPa9BI43ugnRX6PDIL6sjy0DcD3TGc2ng== 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 4WRcZs38j1ztV1; Sun, 21 Jul 2024 08:51:17 +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 46L8pHcD071271; Sun, 21 Jul 2024 08:51:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46L8pHfd071268; Sun, 21 Jul 2024 08:51:17 GMT (envelope-from git) Date: Sun, 21 Jul 2024 08:51:17 GMT Message-Id: <202407210851.46L8pHfd071268@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 010f09a7b16c - stable/14 - amd64 pmap_allocpte_nosleep(): stop testing tautological condition 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 010f09a7b16c2799d23161ba819a67f309318ef6 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=010f09a7b16c2799d23161ba819a67f309318ef6 commit 010f09a7b16c2799d23161ba819a67f309318ef6 Author: Konstantin Belousov AuthorDate: 2024-07-13 04:07:18 +0000 Commit: Konstantin Belousov CommitDate: 2024-07-21 08:50:29 +0000 amd64 pmap_allocpte_nosleep(): stop testing tautological condition (cherry picked from commit 10a6ae0ddffb1de842a0ba6a6ca29786de6d3bfd) --- sys/amd64/amd64/pmap.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 50a52d89db85..0d364dec7c82 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -4704,8 +4704,8 @@ pmap_allocpte_nosleep(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp, *pml5 = VM_PAGE_TO_PHYS(m) | PG_U | PG_RW | PG_V | PG_A | PG_M; if (pmap->pm_pmltopu != NULL && pml5index < NUPML5E) { - if (pmap->pm_ucr3 != PMAP_NO_CR3) - *pml5 |= pg_nx; + MPASS(pmap->pm_ucr3 != PMAP_NO_CR3); + *pml5 |= pg_nx; pml5u = &pmap->pm_pmltopu[pml5index]; *pml5u = VM_PAGE_TO_PHYS(m) | PG_U | PG_RW | PG_V | @@ -4725,6 +4725,8 @@ pmap_allocpte_nosleep(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp, if (!pmap_is_la57(pmap) && pmap->pm_pmltopu != NULL && pml4index < NUPML4E) { + MPASS(pmap->pm_ucr3 != PMAP_NO_CR3); + /* * PTI: Make all user-space mappings in the * kernel-mode page table no-execute so that @@ -4732,8 +4734,7 @@ pmap_allocpte_nosleep(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp, * the kernel-mode page table active on return * to user space. */ - if (pmap->pm_ucr3 != PMAP_NO_CR3) - *pml4 |= pg_nx; + *pml4 |= pg_nx; pml4u = &pmap->pm_pmltopu[pml4index]; *pml4u = VM_PAGE_TO_PHYS(m) | PG_U | PG_RW | PG_V |