Hi,

> To clarify, I mean something like the patch below, but with an additional
> callback notification similar to the Emu one in LoadImage(), so that we can
> make sure we only enable the quirk when we load a known-bad grub binary.
> That way we still force distros to ship fixed versions of their code, but
> enable old code to continue running.

> +  /* TODO: Only run this as part of a notify callback in ImageLoad() when
> we
> +           load a grub binary with a known-broken hash */
> +  BOOLEAN is_broken_grub = TRUE;
> +  if (is_broken_grub) {
> +    RealAllocatePages = gBS->AllocatePages;
> +    gBS->AllocatePages = AllocatePagesForceLoaderCode;
> +  }

You left out the hard part, which is the list of hashes.  And I suspect
you underestimate the number of broken grub binaries in the wild ...

take care,
  Gerd



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#97976): https://edk2.groups.io/g/devel/message/97976
Mute This Topic: https://groups.io/mt/93922691/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to