From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C1A383DDDBB for ; Mon, 17 Aug 2026 22:35:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787006103; cv=none; b=BfZe1XDENOqMTnyB+9qLOkwMD5+Z8HOdxGYIVUjHaw9m6T0II60HGSEdLeX727bHFgMco69bGPlvIOVAa4nCHLOvKMZf1arefIqZj7KcZzGax91q+So38z3HLEZ7n4EyHtvDtFkbZzvW6K49seqObjDSTRCifIb4DxTkxlHTygA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787006103; c=relaxed/simple; bh=pcPHeGdpciBeRABzMcPVmrjniaqvS1lIyZ8nO0nqYsQ=; h=Date:From:To:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=Ie0KQB/3bpzGzcEXlFNGcff9iMxuWpylmsNWe1T2UvdsoiDlaFgIJRW31RmL6wEtGaSGguQF8pZHAn06U3ylPHJ9XIYMq72oY2bpUaAG9EQi8V6i6bWi3LE7e36+n9NmfX2EGRD70cO0/dyVNdgHEGuUvL385Jyqvust+uNKQn0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=sA83lo8o; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="sA83lo8o" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1150D1F000E9; Mon, 17 Aug 2026 22:35:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=korg; t=1787006102; bh=3tPX9/9lA2HGpLu7Wg6cEAm7Z/kVrysXnxuagUqdMIU=; h=Date:From:To:Subject:In-Reply-To:References; b=sA83lo8ok1wmkMwr/ZGIZ2goQzDlXsCzamAyzAIvL99C/9JgPHezFE7D66o/bZT2x bDrZTOW0okeCLy7Oz1Rc/YwS38s+MHW24zMItGUNVTWAOWQGdgay1X67hb4ldKC93M JGP5NjPB3AW1W33lmewtdx4LUpUtIGzhW8OAc3fc= Date: Mon, 17 Aug 2026 15:35:01 -0700 From: Andrew Morton To: Foxie Flakey , rppt@kernel.org, peterx@redhat.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] userfaultfd: reset err to be 0 when move_pages_ptes succeeded Message-Id: <20260817153501.ee2ee77976e1cd5b1e1c813b@linux-foundation.org> In-Reply-To: <20260817152605.5d2bee3fbf1a2bace4c0eff1@linux-foundation.org> References: <9c936a9f-ed27-e510-872f-5b3b8c680975@gmail.com> <20260817152605.5d2bee3fbf1a2bace4c0eff1@linux-foundation.org> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 17 Aug 2026 15:26:05 -0700 Andrew Morton wrote: > > That behaviour manifested into this at userspace > > > > Source: [ .. unmapped .. ][ .. mapped ..] > > Destination: [ .. mapped .. ][ .. unmapped ..] > > ^ ^ > > \ Kernel moved this far in actuality > > What is reported to userspace on struct > > uffdio_move's move field > > > > When the previous behaviour is > > Source: [ .. unmapped .. ][ .. mapped ..] > > Destination: [ .. mapped .. ][ .. unmapped ..] > > ^ > > Reported to user space via uffdio_move's > > move field Also... I assume the above illuminates lack of coverage in the uffd selftests. Is it hard to add a case to detect this?