On Tue, Jun 21, 2022 at 05:36:18PM +0200, Ard Biesheuvel wrote: > Avoid the efivars layer and simply call the newly introduced EFI > varstore helpers instead. This simplifies the code substantially, and > also allows us to remove some hacks in the shared efivars layer that > were added for efi-pstore specifically. > > Since we don't store the name of the associated EFI variable into each > pstore record when enumerating them, we have to guess the variable name > it was constructed from at deletion time, since we no longer keep a > shadow copy of the variable store. To make this a bit more exact, store > the CRC-32 of the ASCII name into the pstore record's ECC region so we > can use it later to make an educated guess regarding the name of the EFI > variable. I wonder if pstore_record should have a "private" field for backends to use? That seems like it solve the need for overloading the ecc field, and allow for arbitrarily more information to be stored (i.e. store full efi var name instead of an easily-colliding crc32?) -- Kees Cook