From nobody Tue Mar 01 17:41:56 2022 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 9341019DC527; Tue, 1 Mar 2022 17:41:57 +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 4K7Ph46yv6z4ZT5; Tue, 1 Mar 2022 17:41:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646156517; 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=4nEOrpWG246P2Dv4kUzmgKMLXSYL8P/l31pIsoPxgHU=; b=cYkN2aHnxYsP//Z9l7SnosRBj16E7OG9NfS5E8akRmuAA9v2mKjA5+wY5vCWYz7mhbjbdY MYLwmwHH0ojjHNxiEgBSK3yaE1lHVU9GDEF7ZjYWdqTX5fzeYIU1x150lS9wuOpn7JIvX2 qtxojB+Yew2HbyT2QRr0h75+4p12DvqUZjo3pqcjjOqgLMN85ySPML3kDybz1yvVikmGG7 8hMzXqr1wyXRzoof85S6U3tCHPtZ62+lO+a4ktWdhN1a9y0uBHcuWcp2BrZ2VhpgCcdijR LAS2bgl6Cf8BwqC+Fz+COslcHU+0BsrpKT/Qq8RqZa/uRWTQHQPUAQg1DGaCAw== 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 B8F0113E2D; Tue, 1 Mar 2022 17:41:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 221HfuKR093329; Tue, 1 Mar 2022 17:41:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 221HfurS093328; Tue, 1 Mar 2022 17:41:56 GMT (envelope-from git) Date: Tue, 1 Mar 2022 17:41:56 GMT Message-Id: <202203011741.221HfurS093328@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: 83958173eb7d - main - fasttrap: Assert that fasttrap_fork() successfully unmaps scratch space 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/main X-Git-Reftype: branch X-Git-Commit: 83958173eb7d3f9d402e6dc81e66d179a808dd63 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646156517; 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=4nEOrpWG246P2Dv4kUzmgKMLXSYL8P/l31pIsoPxgHU=; b=RQTwNtHDhwbFnQ1iKHIG6mcyNBqyot9tKbcfOWaLj0s52+eB+9BifYku+3p/F8Xw18V/Rd w7PYdvrMSmpyXarG+a3bBTtjtHh9Y3jrLPeoiPKURa6kzFyiSIkmZRm8nz44bgSajHQnih /YFisYO0+eZYouGKeYjpLgS4hjX91dOoo+GYiiLfPtHILavwJKzgbgc2I7oKgJUjMCnfB/ oT89HzyMEXfC6rrEzBSla/l705RIs8Gdc/Tt5Bcy26CRAdpkArOVUO5cDdlPx9KcWHDnuQ tTNV2jod1R8rL9AuvzunDeRgOd0L7fOGNcy1ZAnJAEX0HN2oOBncfRlAMRku6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646156517; a=rsa-sha256; cv=none; b=f9sr88kjq1Cw4rWZ0ZJHKTku2kClhxZq2ylSWLJ1zIK+l+6P3JqrxxZaxnmydDfApOCxcI 0sj45tkbtZpAf+i+RzxMc4x6YrhKsswnbPDY83Fyue3spU/rsDTx6y0aamLNC9xPXNHa5N wK8sy7S8HPO0yFWE9vRe7fYcq/4oJhLDUslRfm5oyF1nP0eJrUEnuGYyBz01FEyh/l74Ss SxhxMwn58HRxSR26oWqv7lDvnz+/QYpPFllf/XsJL+20BKx3ZRSJamrtXh8YXd8gIfVN8K AHtbE5IX5bJVMa+I8rPAFqy8R4YNmvQn6PXD53Mmq1wM6LMm5t0bbYcnMKuYZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=83958173eb7d3f9d402e6dc81e66d179a808dd63 commit 83958173eb7d3f9d402e6dc81e66d179a808dd63 Author: Mark Johnston AuthorDate: 2022-03-01 16:52:39 +0000 Commit: Mark Johnston CommitDate: 2022-03-01 17:40:35 +0000 fasttrap: Assert that fasttrap_fork() successfully unmaps scratch space No functional change intended. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation --- sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c b/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c index 4771a67a9f09..d96d3f44182e 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c +++ b/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c @@ -588,7 +588,7 @@ fasttrap_fork(proc_t *p, proc_t *cp) fasttrap_proc_t *fprc = NULL; #endif pid_t ppid = p->p_pid; - int i; + int error, i; ASSERT(curproc == p); #ifdef illumos @@ -678,9 +678,10 @@ fasttrap_fork(proc_t *p, proc_t *cp) if (fprc != NULL) { mutex_enter(&fprc->ftpc_mtx); LIST_FOREACH(scrblk, &fprc->ftpc_scrblks, ftsb_next) { - vm_map_remove(&cp->p_vmspace->vm_map, + error = vm_map_remove(&cp->p_vmspace->vm_map, scrblk->ftsb_addr, scrblk->ftsb_addr + FASTTRAP_SCRBLOCK_SIZE); + ASSERT(error == KERN_SUCCESS); } mutex_exit(&fprc->ftpc_mtx); }