From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 C21C1331219 for ; Mon, 23 Feb 2026 17:39:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771868383; cv=none; b=n+Ewj8ZYgsTXO5R9P0FgkmDvL7fy64RMWD+24kNPjjXdRfBL28uNrTSIli2Q/+DNHi3MZSAF0hfKs9tgs3+W0Napp/FBux2d7x1GFT+u0OMVvLHpTUIOBV3OJoaivVR6fiU9bLHRot71zssCZudvef5ZDLvi1Uv24HzCVvzB0QU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771868383; c=relaxed/simple; bh=1609qBNCFT64/6Ur2waJiWhfmIJVYp2lmLTA0HMQLO8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=aRznd3nGvN7INpo0YEhDZRVguJPrJOXj0SWAOHvSPquQbTPNeTC0xfnKEveUbx4sasyadXL8Dm3Hy5vLjzQU+jsvksBYgojNsIjNnxwx6NdIV1osezyycKrwDWVwfJajXYpoFOmpoo2sKvrTNnM+6OecP6VMF8dgb+BEqOApV7Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qUv4S4TD; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qUv4S4TD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4A7A9C116C6; Mon, 23 Feb 2026 17:39:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771868383; bh=1609qBNCFT64/6Ur2waJiWhfmIJVYp2lmLTA0HMQLO8=; h=From:To:Cc:Subject:Date:From; b=qUv4S4TD/2QP47A0z2Zydcj7HQU9+B22YONNft7F8OPmrXfoWTEwHRFFSfjn0A6bG 5lN62eNjaSx71rwo0ri3px8bClLxdKrvNsPedRYg983bW2pHIJxqBIydZpBfPhFujE JmJ0Yq+xUPfvQ2+Nl1eTBc2lR8Hlj4s3+sp8BPz+IbaXYE+PqlZW3BG1viokZL6JeE VON1XoeCR21pQUBMvVsAhAZ6OB5sjpDow2zQLZB5ElcO3qjZrYQ8a3upfVarnwCNMK gNA6J+SoopfwExe07mWlYgVqpt8PzXfqhCr0JlZvEaQJOpIlTgqDRE1cJ2k7rxHlt4 /VpZ06rebBg7w== From: Pratyush Yadav To: Pasha Tatashin , Mike Rapoport , Pratyush Yadav , Andrew Morton Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 0/2] mm: memfd_luo: fixes for folio flag preservation Date: Mon, 23 Feb 2026 18:39:27 +0100 Message-ID: <20260223173931.2221759-1-pratyush@kernel.org> X-Mailer: git-send-email 2.53.0.371.g1d285c8824-goog Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: "Pratyush Yadav (Google)" Hi, This series contains a couple fixes for flag preservation for memfd live update. The first patch fixes memfd preservation when fallocate() was used to pre-allocate some pages. For these memfds, all the writes to fallocated pages touched after preserve were lost. The second patch fixes dirty flag tracking. If the dirty flag is not tracked correctly, the next kernel might incorrectly reclaim some folios under memory pressure, losing user data. This is a theoretical bug that I observed when reading the code, and haven't been able to reproduce it. Regards, Pratyush Yadav Pratyush Yadav (Google) (2): mm: memfd_luo: always make all folios uptodate mm: memfd_luo: always dirty all folios mm/memfd_luo.c | 49 +++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 6 deletions(-) base-commit: 8bf22c33e7a172fbc72464f4cc484d23a6b412ba -- 2.53.0.371.g1d285c8824-goog