Re: [edk2-devel] [PATCH 1/1] OvmfPkg/VirtNorFlashDxe: sanity-check variables

2023-12-07 Thread Gerd Hoffmann
Hi, > > + default: > > +DEBUG (( > > + DEBUG_ERROR, > > + "%a: invalid variable state: 0x%x\n", > > + __func__, > > + VarState > > + )); > > Did you want to print VarHeader->State? Yes, indeed. Good catch, thank you, will fix send

Re: [edk2-devel] [PATCH 1/1] OvmfPkg/VirtNorFlashDxe: sanity-check variables

2023-12-06 Thread Mike Maslenkin
Hi Gerd, On Tue, Dec 5, 2023 at 4:51 PM Gerd Hoffmann wrote: > > Extend the ValidateFvHeader function, additionally to the header checks > walk over the list of variables and sanity check them. > > In case we find inconsistencies indicating variable store corruption > return EFI_NOT_FOUND so the

[edk2-devel] [PATCH 1/1] OvmfPkg/VirtNorFlashDxe: sanity-check variables

2023-12-05 Thread Gerd Hoffmann
Extend the ValidateFvHeader function, additionally to the header checks walk over the list of variables and sanity check them. In case we find inconsistencies indicating variable store corruption return EFI_NOT_FOUND so the variable store will be re-initialized. Signed-off-by: Gerd Hoffmann ---