On Mon, 11 Dec 2023 at 15:33, Laszlo Ersek wrote:
>
> On 12/11/23 11:55, Gerd Hoffmann wrote:
> >> + //
> >> + // Work around shim's terminally broken use of the EFI memory attributes
> >> + // protocol, by uninstalling it if requested on the QEMU command line.
> >> + //
> >> + // E.g.,
> >>
On 12/11/23 11:55, Gerd Hoffmann wrote:
>> + //
>> + // Work around shim's terminally broken use of the EFI memory attributes
>> + // protocol, by uninstalling it if requested on the QEMU command line.
>> + //
>> + // E.g.,
>> + // -fw_cfg
> + //
> + // Work around shim's terminally broken use of the EFI memory attributes
> + // protocol, by uninstalling it if requested on the QEMU command line.
> + //
> + // E.g.,
> + // -fw_cfg opt/org.tianocore/UninstallMemAttrProtocol,string=y
> + //
> + // This is only needed on
From: Ard Biesheuvel
Shim's PE loader uses the EFI memory attributes protocol in a way that
results in an immediate crash when invoking the loaded image, unless the
base and size of its executable segment are both aligned to 4k.
If this is not the case, it will strip the memory allocation of