-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MdeModulePkg: Remove ASSERT which prevents VOLUME_CORRUPTED image status from being returned #58
Conversation
…being returned When DEBUG_RAISE is disabled then PeCoffInitializeContext within BasePeCoffLib2 will return VOLUME_CORRUPTED for certain image errors. These errors then hit the removed ASSERT. Without it these status codes pass back out of gBS->LoadImage as desired.
On reflection, there are several other recently added |
Desired by whom? I hope in the near future uefi-format branch will be merged and the behavior will change to the following 7d97eab#diff-7716cd945ce4a34439a613ef76374c82b389ac12470368e183138d48df361e73R1246 |
Desired by anyone who isn't debugging the internals of that particular module, but wants to be able to use a DEBUG or NOOPT build (e.g. so as to be able to step between external code and the library), only expecting the library code to stop and assert if it detects it's own unexpected internal state, not on valid responses to input (particularly, input - such as corrupt or invalid images - which the calling code might itself want to be testing it's own handling for - that's a specific case of what I take to be a general principle). |
|
@MikhailKrichanov, the code in this pull request looks correct to me. Why should we freeze firmware upon trying to load a corrupted image from userspace? We should simply reject.
|
Just to be clear:
|
@MikhailKrichanov - Looking at the current If I'm right that that is the wrong status, then when fixed code here will already do what I'm aiming at, thank you. |
@vit9696, the requirements are implemented in the latest fix. |
Azure should install code coverage tool (lcov), it didn't exist on Fedora and Ubuntu by default. Update docker setting, pick below solution between 47addc9 and 3b3eb8f 3b3eb8f Fixes and improvements to dev containers (#69) 54e5bd1 Enable GTK on Fedora QEMU (#63) f1c7a20 Fedora: install code coverage tools for GCC (#62) 2ce82af Ubuntu-22: Add initial Ubuntu-22 image (#61) 14d2aba Add Fedora 37 image with gcc12 (#60) 5b8a008 Add dotnet runtime to fedora build (#57) f5c874a Fix platform build file name for EDK2 change (#58) 48540ad Ubuntu-20: Fix dev image entrypoint (#55) 98e849d Fedora-35: Add Powershell to build image (#52) Cc: Michael D Kinney <[email protected]> Cc: Sean Brogan <[email protected]> Cc: Michael Kubacki <[email protected]> Cc: Oliver Steffen <[email protected]> Cc: Chris Fernald <[email protected]> Signed-off-by: Gua Guo <[email protected]> Reviewed-by: Michael D Kinney <[email protected]> Reviewed-by: Michael Kubacki <[email protected]> Reviewed-by: Chris Fernald <[email protected]>
When DEBUG_RAISE is disabled then PeCoffInitializeContext within BasePeCoffLib2 will return VOLUME_CORRUPTED for certain image errors. These errors then hit the ASSERT removed by this PR. Without it these status codes pass back out of gBS->LoadImage in DEBUG builds, as desired.