From nobody Tue Oct 06 04:33:24 2026 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 4hzNfx4kjdz6Z0qq for ; Tue, 06 Oct 2026 04:33:29 +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 4hzNfx32pNz4pYD for ; Tue, 06 Oct 2026 04:33:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1791261209; 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=HbxGgJeiNpxVCwfjAIX2E4Q1C3093kmXRGPDCHMWR95DyIs78iKSlEHE74X+KMrMUBM5q8 kmINOly2i8VhaZCKysU887UB/BiC2yak5Z8mwHnIWeVAwIRmnf6UEMutwdKebR+eewdheA QZa7HT2mwZrmbhOG+iFOsp0MpxyLyPxSH8fN9pr3RfRMs8V4L2w8L3NalsCO9AhRT8qiY8 lcvlraXx2bTFjqDgk8fB95qmL4+a9w4xid06sV7aoMERUtTcvgtQUaj0AqU+R6xpwKYUas PKc5AgAZwYTHUgtLfAws9h5YbkSbENp2jbvqebcb92Nmzca4tHBZGjgQ0tbGNA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1791261209; b=XzKkxmrVhix3zqlHP8JvbM6tqnabi+QwCEfoD0J/zAGdi567kMrEbJcZOn86haf4dr4DHO GRXHss7d3qvV0/PNYNUAnOiqaXMyhRxFLqpJuOM0yaeCQkMs5WoLn6RHTvIwfE42Ufy0nF wNu7z8q7wxgXOh+12GI0pBxErNifPANg0iKRB+uvN28WvX9//uT2LSPqya+bnEQz7z9Sk3 n8WhoP+UTfTiT+U7jQ6YXLW/EUWm6/QME8eY3ttAKspPANOMZj20lmBS9jhne2zrh7DaSZ xbQZ48UhF+D8mY/Nwqv9ZTT/yi42XwI+z+AlXtaN1JXl+e5OBSM/0ACz71AZCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1791261209; 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=Fjf1hKeINY5Wnx1XJXponU9JrPksoAgFc6K5XNL1C70k+QQlTSCsM3QyEAdyaJpvzxM3+L gT1rpVP70pfcaRGOwVf0AFv5tTtZrO33FaJim17Vycg0EBIJLzoqiU9UP6PG2mNdXH/+P1 1YE21jy36d2p4k86B/QY25g0AoV0TyoKhfa7yji9cvsRsliUzLLS0KjLKw8dkxn4JJNp6Q G/KKo1FEUzuOlrUKZlxPewt1YnEArU4pCj4dR15Gv6+f8ETOPMTQxeMQxz8Y4h5XQh5ohv RuONdFFZvcor78r9Pe3udXqDWTz4i1yKdN2cZNyssLWtc8ZxES1zHj9QLuoBZA== 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 4hzNfx26vyzqyJ for ; Tue, 06 Oct 2026 04:33:29 +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 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 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);