From: Pasha Tatashin <pasha.tatashin@soleen.com>
To: brauner@kernel.org, linux-kselftest@vger.kernel.org,
rppt@kernel.org, jack@suse.cz, shuah@kernel.org,
linux-fsdevel@vger.kernel.org, akpm@linux-foundation.org,
linux-mm@kvack.org, viro@zeniv.linux.org.uk,
linux-kernel@vger.kernel.org, pasha.tatashin@soleen.com,
dmatlack@google.com, pratyush@kernel.org, skhawaja@google.com
Subject: [PATCH 0/2] liveupdate: prevent double management of files
Date: Sat, 21 Mar 2026 17:58:06 +0000 [thread overview]
Message-ID: <20260321175808.57942-1-pasha.tatashin@soleen.com> (raw)
Currently, LUO does not prevent the same file from being
preserved or managed by multiple active sessions simultaneously.
This can lead to conflicts and inconsistent state.
This series introduces a mechanism to prevent double management by:
1. Adding an I_LUO_MANAGED flag to the inode's i_state.
2. Updating the LUO core to set/check this flag during preservation
and restoration.
3. Adding a selftest to verify that double preservation is correctly
prevented with -EBUSY.
Background:
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
v1:
- Rename I_LUO_PRESERVED to I_LUO_MANAGED (Pratyush Yadav)
- Set flag in luo_retrieve_file() and clear in luo_file_finish() (Pratyush Yadav)
- Added trailing comma to enum (Jan Kara)
- Added selftests.
RFC:
https://lore.kernel.org/all/20260317023834.487682-1-pasha.tatashin@soleen.com
Pasha Tatashin (2):
liveupdate: prevent double management of files
selftests: liveupdate: add test for double preservation
include/linux/fs.h | 5 ++-
kernel/liveupdate/luo_file.c | 27 ++++++++++--
.../testing/selftests/liveupdate/liveupdate.c | 41 +++++++++++++++++++
3 files changed, 69 insertions(+), 4 deletions(-)
--
2.43.0
next reply other threads:[~2026-03-21 17:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-21 17:58 Pasha Tatashin [this message]
2026-03-21 17:58 ` [PATCH 1/2] liveupdate: prevent double management of files Pasha Tatashin
2026-03-22 1:04 ` Pasha Tatashin
2026-03-23 11:55 ` Christian Brauner
2026-03-23 13:18 ` Pasha Tatashin
2026-03-24 8:51 ` Christian Brauner
2026-03-24 18:40 ` Andrew Morton
2026-03-25 2:43 ` Pasha Tatashin
2026-03-21 17:58 ` [PATCH 2/2] selftests: liveupdate: add test for double preservation Pasha Tatashin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260321175808.57942-1-pasha.tatashin@soleen.com \
--to=pasha.tatashin@soleen.com \
--cc=akpm@linux-foundation.org \
--cc=brauner@kernel.org \
--cc=dmatlack@google.com \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pratyush@kernel.org \
--cc=rppt@kernel.org \
--cc=shuah@kernel.org \
--cc=skhawaja@google.com \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox