On Mon, 31 Mar 2025 at 14:42, Christian Brauner <brauner@xxxxxxxxxx> wrote: > > Allow efivarfs to partake to resync variable state during system > hibernation and suspend. Add freeze/thaw support. > > This is a pretty straightforward implementation. We simply add regular > freeze/thaw support for both userspace and the kernel. This works > without any big issues and congrats afaict efivars is the first > pseudofilesystem that adds support for filesystem freezing and thawing. > > The simplicity comes from the fact that we simply always resync variable > state after efivarfs has been frozen. It doesn't matter whether that's > because of suspend, userspace initiated freeze or hibernation. Efivars > is simple enough that it doesn't matter that we walk all dentries. There > are no directories and there aren't insane amounts of entries and both > freeze/thaw are already heavy-handed operations. If userspace initiated > a freeze/thaw cycle they would need CAP_SYS_ADMIN in the initial user > namespace (as that's where efivarfs is mounted) so it can't be triggered > by random userspace. IOW, we really really don't care. > > @Ard, if you're fine with this (and agree with the patch) I'd carry this > on a stable branch vfs-6.16.super that you can pull into efivarfs once > -rc1 is out. > > Signed-off-by: Christian Brauner <brauner@xxxxxxxxxx> > --- > Christian Brauner (2): > libfs: export find_next_child() > efivarfs: support freeze/thaw > This looks fine to me: I'm a EFI expert not a VFS expert so I am quite pleased that you have taken the time to implement this properly. Acked-by: Ard Biesheuvel <ardb@xxxxxxxxxx> I don't anticipate a lot of parallel development going on in efivarfs so taking this through the VFS tree is fine. I'll let you know if/when I merge it into the EFI tree so feel free to rebase/tweak the branch otherwise.