Skip to content

MdeModulePkg: Correct CoreRemoveDebugImageInfoEntry() #11019

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xypron
Copy link
Contributor

@xypron xypron commented Apr 28, 2025

Description

The UEFI specification does not allow NULL pointers in the EFI Debug Info Table. The TableSize field in the EFI Debug Info Table Header must always match the array size of the EFI Debug Info Table.

Instead of creating a NULL entry when removing an entry, move the tail of the EFI Debug Info Table one slot to the front.

Breaking change?

no

Impacts security?

no

Includes tests?

no

How This Was Tested

https://lore.kernel.org/u-boot/[email protected]/T/#u
has a patch for U-Boot to create a test binary.

Integration Instructions

N/A

@xypron xypron force-pushed the CoreRemoveDebugImageInfoEntry branch from 19acbdd to c40fbde Compare April 28, 2025 13:49
The UEFI specification does not allow NULL pointers in the EFI Debug Info
Table. The TableSize field in the EFI Debug Info Table Header must always
match the array size of the EFI Debug Info Table.

Instead of creating a NULL entry when removing an entry, move the tail of
the EFI Debug Info Table one slot to the front.

Signed-off-by: Heinrich Schuchardt <[email protected]>
@xypron xypron force-pushed the CoreRemoveDebugImageInfoEntry branch from c40fbde to 3618656 Compare April 28, 2025 13:52
@os-d
Copy link
Contributor

os-d commented Apr 28, 2025

Ironically, I put up a PR to fix this same issue last week: #11013. Can you test with that and confirm it fixes the issue you are seeing? I also updated the Add function to clean it up

@xypron
Copy link
Contributor Author

xypron commented Apr 28, 2025

Ironically, I put up a PR to fix this same issue last week: #11013. Can you test with that and confirm it fixes the issue you are seeing? I also updated the Add function to clean it up

Your patch solves the deviation from the UEFI specification. Having the entries in load order would be convenient for debugging, but this feature was neither provided by the previous implementation nor is it required by the UEFI specification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants