Skip to content

Commit

Permalink
Add an assert to TCG log function if log is full (#257)
Browse files Browse the repository at this point in the history
## Description

Currently, if the TCG log fills up, the firmware will boot only logging
some errors and the OS may or may not fail depending on scenario and
configuration. This PR adds an assert so that these truncations can be
found in testing rather then having to wait for failures in production.

- [X] Impacts functionality?
- [ ] Impacts security?
- [ ] Breaking change?
- [ ] Includes tests?
- [ ] Includes documentation?

## How This Was Tested

N/A

## Integration Instructions

N/A
  • Loading branch information
cfernald committed Mar 20, 2024
1 parent e28c7a5 commit 1c115e6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,7 @@ TcgCommLogEvent (
DEBUG ((DEBUG_INFO, " NewLogSize - 0x%x\n", NewLogSize));
DEBUG ((DEBUG_INFO, " LogSize - 0x%x\n", EventLogAreaStruct->EventLogSize));
DEBUG ((DEBUG_INFO, "TcgCommLogEvent - %r\n", EFI_OUT_OF_RESOURCES));
ASSERT (FALSE); // MU_CHANGE: Assert to catch systematic TCG log truncation during DEBUG testing.
return EFI_OUT_OF_RESOURCES;
}

Expand Down

0 comments on commit 1c115e6

Please sign in to comment.