diff options
| author | Gary Lin <glin@suse.com> | 2021-03-05 15:00:29 +0800 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2021-03-06 19:02:58 -0500 |
| commit | 74d26654d55a4f32e58b76757efca50ceedefef4 (patch) | |
| tree | a06a1a13abfcbdd53ed7d342fe74cd6c74d9186a /Cryptlib/OpenSSL/crypto/asn1/t_req.c | |
| parent | 6b742f2b718919854100f79e191b8401166d48e8 (diff) | |
| download | efi-boot-shim-74d26654d55a4f32e58b76757efca50ceedefef4.tar.gz efi-boot-shim-74d26654d55a4f32e58b76757efca50ceedefef4.zip | |
Restore loaded image of shim at Exit()
When grub2 invoked Exit() in AArch64 AAVMF, the VM crashed with the
following messsages:
Unloading driver at 0x000B7D7B000
Synchronous Exception at 0x00000000BF5D5E68
AllocatePool: failed to allocate 800 bytes
Synchronous Exception at 0x00000000BF5D5E68
The similar error also showed when I modified MokManager to call
gBS->Exit() at the end of efi_main(). However, if MokManager just
returned, the error never showed. One significant difference is
whether the loaded image was restored or not, and the firmware seems
to need the original ImageBase pointer to do clean-up.
To avoid the potential crash, this commit adds restore_loaded_image() so
that we can restore the loaded image both in start_image() and
do_exit().
Signed-off-by: Gary Lin <glin@suse.com>
Diffstat (limited to 'Cryptlib/OpenSSL/crypto/asn1/t_req.c')
0 files changed, 0 insertions, 0 deletions
