From nobody Tue Oct 06 04:33:24 2026 X-Original-To: dev-commits-src-main@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 4hzNfr1kfDz6Z0tK for ; Tue, 06 Oct 2026 04:33:24 +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 "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hzNfr1DZ6z4pd9 for ; Tue, 06 Oct 2026 04:33:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1791261204; 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=3v5ElYW9g4tp3Dw/JoDs/dZ55VSs6xEpfLGB6ShxIrQ=; b=IlCOW4Xc2PqPn7isKzVPZaM3yGFaEc9qoUOUn/mnRq0TCPi0rqfRZZ6Fet9ddKCbCG1VhY uqKRJ5QMrpHOzXgsNCEo4sZCxl6hB9LyMgMPEFX1G6ikyZAeKQMFNz0BhKg0/g55HtkUHs kqHTk09tuGjidz/CgOXjzDKhkm88l3sKEgUFmv5FLFhFzrfwq6sVC1KuynxQyDT1w2GD7Y PxVHYpRJM/faWE3vCglV0O67rPB6WIdtwOilk1LjYrXY8Oid7FHK2z3YLR13PZbVKnKCg2 FHpnUqwTDsFzxV9zI3gfwAoWSzrkELp8GKa2t7fkMVBz7MvKY4Izn01TJoZgPw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1791261204; b=Vbpg4rmSfyXH7g4O8QxfsucRJV/JnBSUUWkczmEo2KOAzS5qLPc6QOHVe/RS/+rgegDwpn d44ulYsfaYtk4Ej7jBdRSKLMf/CD80fclt0Hxsz6MU62mKu0useJzIka1XK8VyES+fx4kd iEgu4JIQA+6+lYD2nBeld0hfyOmt5Dt9hH+rdd57vhD2axCqXHn0kYs5VR3BsEIBbXCgVw 6lVEJTmWlGJdyGQGFOKtwuQ8AmwEbm6s74X9EZcXSrVWEGX3bRK5Mcb+DNUsrXA2WOkKZ2 Un6gpMOof82HBzx11Bvtxmn/vfBgw/FsU6B4gmJGkVCTO6BrAy17znSFy91AoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1791261204; 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=3v5ElYW9g4tp3Dw/JoDs/dZ55VSs6xEpfLGB6ShxIrQ=; b=sDT/6hhlVaQ5WzFZ//bzSoNP9tauflA/LOG1Ss5DnvGdRIf2nPRS3hJPVynstG3XxIKiM4 W5mjT5FV45QjpGrz+H8aQnSLh496REBp95cbDlM+LiOkQYSxkInESrRugvl3i3BihyKScP c4zI3holuQ908YH3REYq1VGGdw0VusjEbnFEKUAQX8asWJNIFkUP8yaRoyj4bGfw8ab2lO sE+Tu+QbosIUyeWlCrRb2OOcQPWPL0wNB/kiSfZeawWREdCUyjcQn28uLKL/TKkWBkWuzq ckcNBPjijl8SV2hK6JKgvQ+f6WyACE5hkJTbtVnUjguoeUfVbkIE+GAOehvGrA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hzNfr0GF5zrdx for ; Tue, 06 Oct 2026 04:33:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 337b4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Oct 2026 04:33:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Cox Subject: git: d8dfbeb57017 - main - uiomove_object_page: a failed copy can still dirty the page List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d8dfbeb5701769832e84e5bb52f2e8b4e3ab902b Auto-Submitted: auto-generated Date: Tue, 06 Oct 2026 04:33:24 +0000 Message-Id: <6ac47a14.337b4.525b2153@gitrepo.freebsd.org> The branch main has been updated by alc: URL: https://cgit.FreeBSD.org/src/commit/?id=d8dfbeb5701769832e84e5bb52f2e8b4e3ab902b commit d8dfbeb5701769832e84e5bb52f2e8b4e3ab902b Author: Alan Cox AuthorDate: 2026-10-03 17:19:36 +0000 Commit: Alan Cox CommitDate: 2026-10-06 04:30:23 +0000 uiomove_object_page: a failed copy can still dirty the page For writes, if we fail in the middle of reading from the source, the destination may have already been dirtied. For example, the source may cross a page boundary, and the second page is inaccessible. Conservatively mark the destination as dirty, even on errors. Reported by: Claude (Opus 5.5) Reviewed by: kib, markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D60280 --- sys/kern/uipc_shm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/kern/uipc_shm.c b/sys/kern/uipc_shm.c index 7df9d59716c7..3544ebd35336 100644 --- a/sys/kern/uipc_shm.c +++ b/sys/kern/uipc_shm.c @@ -246,8 +246,14 @@ uiomove_object_page(vm_object_t obj, size_t len, struct uio *uio) found: error = uiomove_fromphys(&m, offset, tlen, uio); - if (uio->uio_rw == UIO_WRITE && error == 0) + if (uio->uio_rw == UIO_WRITE) { + /* + * Even a failed copy may have changed the page's contents, + * because uiomove_fromphys() can copy part of the data before + * it fails. + */ vm_page_set_dirty(m); + } vm_page_activate(m); vm_page_sunbusy(m);