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 47D7B10F2 for ; Mon, 26 Jan 2026 23:03:15 +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=1769468595; cv=none; b=N/ItPgJ3rpENqh54zcMEoRSNwXjZSAX2PdhFwe/L7JWEgeYS9KNKKruYz0O8f+DIezhd/d8hYrZQ9UamAhF/3JZ+Hogs8kj9uPdYtUj6fhBJn4GiXPG+OvBTr/UP/BEAP7NlG/GmoQ8X6P5v6shrBrFgocv5PGZ2Rb1+2PLqjLE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769468595; c=relaxed/simple; bh=tnkGgklz3TfkwbdTv4/4KPFnQf9ngexNju9cYOwAffc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=p4jPDOQzF0ReiR5/rqKmwiIg7qk4exnp12thIv382s+tEPZn0xFs8TpSdjI76N/VAgTeVlzRirJOHso5EI16cbWTpPy8TFtGV5x5v7BTMFA9gvdSVb0/N3eGQkkY6xTuXgtkO+v8fau0ksjG3KP7AFRf9Dka1qcQmmSmrW+nrTM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NfiIg12R; 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="NfiIg12R" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BD07FC116C6; Mon, 26 Jan 2026 23:03:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769468594; bh=tnkGgklz3TfkwbdTv4/4KPFnQf9ngexNju9cYOwAffc=; h=From:To:Cc:Subject:Date:From; b=NfiIg12R2d8nWus0tAjQD+vXkAREoCcqoz1/Pt3GvQLJ+U2SUNGh6W/xa67A0zd7+ Jvi523FXVXq/ariuErLivct83sImqpUOAiESDojqRO2QX/Otne/ft2KabsyqAhQPsb tv6OOaoEm9OmTQnd5dXjMIjiRCwHsHu2i3LDNCbuWiVgVqwq5xz6AN64EdUrNlATKd YZeKCZOF7GFry3lbfVZZcZVjajBvQSvDcIb4G6D98sfnUiSBuq9FLg2Oh9bVMh1u4s UpjpvsDgdkOFdrfxzBU52HVxzjr1pVES+8I+cO4OXaBlVutWeSSLy4bWWregdgbIfW V9WkkkkyJ71GA== 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] liveupdate: fixes in error handling Date: Tue, 27 Jan 2026 00:02:51 +0100 Message-ID: <20260126230302.2936817-1-pratyush@kernel.org> X-Mailer: git-send-email 2.52.0.457.g6b5491de43-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 Andrew, This series contains some fixes in LUO's error handling paths. The first patch deals with failed freeze() attempts. The cleanup path calls unfreeze, and that clears some data needed by later unpreserve calls. The second patch is a bit more involved. It deals with failed retrieve() attempts. To do so properly, it reworks some of the error handling logic in luo_file core. Both these fixes are "theoretical" -- in the sense that I have not been able to reproduce either of them in normal operation. The only supported file type right now is memfd, and there is nothing userspace can do right now to make it fail its retrieve or freeze. I need to make the retrieve or freeze fail by artificially injecting errors. The injected errors trigger a use-after-free and a double-free. That said, once more complex file handlers are added or memfd preservation is used in ways not currently expected or covered by the tests, we will be able to see them on real systems. Regards, Pratyush Yadav Pratyush Yadav (Google) (2): liveupdate: luo_file: do not clear serialized_data on unfreeze liveupdate: luo_file: remember retrieve() status include/linux/liveupdate.h | 7 ++++-- kernel/liveupdate/luo_file.c | 43 +++++++++++++++++++++--------------- mm/memfd_luo.c | 7 +++++- 3 files changed, 36 insertions(+), 21 deletions(-) base-commit: 2e833046d66a40f9ad3de2948e6ecd791939fa59 -- 2.52.0.457.g6b5491de43-goog