public inbox for linux-mm@kvack.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] liveupdate: prevent double preservation
@ 2026-03-25 18:20 Pasha Tatashin
  2026-03-25 18:20 ` [PATCH v3 1/2] liveupdate: prevent double management of files Pasha Tatashin
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Pasha Tatashin @ 2026-03-25 18:20 UTC (permalink / raw)
  To: linux-kselftest, rppt, shuah, akpm, linux-mm, linux-kernel,
	pasha.tatashin, dmatlack, pratyush, skhawaja

Currently, LUO does not prevent the same file from being preserved twice
across different active sessions.

Because LUO preserves files of absolutely different types: memfd, and
upcoming vfiofd [1], iommufd [2], guestmefd (and possible kvmfd/cpufd).
There is no common private data or guarantee on how to prevent that the
same file is not preserved twice beside using inode or some slower and
expensive method like hashtables.

[1] https://lore.kernel.org/all/20260129212510.967611-1-dmatlack@google.com
[2] https://lore.kernel.org/all/20260203220948.2176157-1-skhawaja@google.com

Changelog:
v3:
 - Renamed luo_preserved_files_xa to luo_preserved_files (Mike)
 - Added xa inserts during restoration, so a file that is not yet finished is
   not preserved at the same time. (Sashiko)
v2:
 - Because inodes of preserved files can be shared, we cannot rely on a
   flag in the inode. Therefore, use an xarray to prevent preserving
   duplicated files.

Pasha Tatashin (2):
  liveupdate: prevent double management of files
  selftests: liveupdate: add test for double preservation

 kernel/liveupdate/luo_file.c                  | 26 ++++++++++--
 .../testing/selftests/liveupdate/liveupdate.c | 41 +++++++++++++++++++
 2 files changed, 64 insertions(+), 3 deletions(-)


base-commit: 785f0eb2f85decbe7c1ef9ae922931f0194ffc2e
-- 
2.43.0



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-03-26  9:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-25 18:20 [PATCH v3 0/2] liveupdate: prevent double preservation Pasha Tatashin
2026-03-25 18:20 ` [PATCH v3 1/2] liveupdate: prevent double management of files Pasha Tatashin
2026-03-25 18:56   ` Mike Rapoport
2026-03-25 20:20   ` Pratyush Yadav
2026-03-25 20:33     ` David Matlack
2026-03-25 21:08       ` Pasha Tatashin
2026-03-25 21:35         ` Pasha Tatashin
2026-03-26  9:04         ` Mike Rapoport
2026-03-25 18:20 ` [PATCH v3 2/2] selftests: liveupdate: add test for double preservation Pasha Tatashin
2026-03-25 23:14 ` [PATCH v3 0/2] liveupdate: prevent " Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox