Re: [PATCH v2 0/6] convert efivarfs to manage object data correctly

Ard Biesheuvel
2025-01-09T16:11:57Z

On Thu, 9 Jan 2025 at 16:50, James Bottomley
<James.Bottomley@hansenpartnership.com> wrote:
>
> On Thu, 2025-01-09 at 10:50 +0100, Ard Biesheuvel wrote:
> > On Tue, 7 Jan 2025 at 03:36, James Bottomley
> > <James.Bottomley@hansenpartnership.com> wrote:
> [...]
> > > James Bottomley (6):
> > > efivarfs: remove unused efi_varaible.Attributes and .kobj
> > > efivarfs: add helper to convert from UC16 name and GUID to utf8
> > > name
> > > efivarfs: make variable_is_present use dcache lookup
> > > efivarfs: move freeing of variable entry into evict_inode
> > > efivarfs: remove unused efivarfs_list
> > > efivarfs: fix error on write to new variable leaving remnants
> > >
> >
> > Thanks James,
> >
> > I've tentatively queued up this series, as well as the hibernate one,
> > to get some coverage from the robots while I run some tests myself.
> >
> > Are there any existing test suites that cover efivarfs that you could
> > recommend?
>
> I'm afraid I couldn't find any. I finally wrote a few shell scripts to
> try out multiple threads updating the same variable. I think I can
> probably work out how to add these to the kselftest infrastructure.
> Hibernation was a real pain because it doesn't work with secure boot,
> but I finally wrote a UEFI shell script to modify variables and reset.
> Unfortunately I don't think we have a testing framework I can add these
> to.
>

I tested the hibernation changes using QEMU/arm64, using a
non-persistent varstore image, and checked whether adding and/or
deleting variables via efivarfs resulted in the expected behavior
after a resume from hibernate.

I also checked the behavior regarding zero sized files, and that looks
sound to me. But I didn't go as far as torture test it with concurrent
updates as you have.

All in all, I think it is reasonable to queue this up so it gets some
wider exposure.