v2023020003.4.0
What's Changed
🚀 Features & ✨ Enhancements
-
TpmTestingPkg/TpmReplay: Enhance decode support [Rebase \& FF] @makubacki (#366)
Change Details
## Description
Adds several enhancements to the
TpmReplay
feature script.
Add crypto agile log format support
Allows TCG event logs with the "crypto agile format" to be decoded
similar to those generated for TPM Replay by the script.This includes the log produced by Windows (usually present in the
C:\Windows\Logs\MeasuredBoot directory).The log is passed with the existing log input parameter "-e".
Example:
TpmReplay.py -e WindowsLog.log -o YamlLog.yaml -l TxtLog.txt -v
Add UEFI variable decode support
Adds the capability to recognize UEFI variable data in UEFI variable
events (e.g. EV_EFI_VARIABLE_DRIVER_CONFIG) and output that to the
YAML file and text log.This makes inspecting and configuring UEFI variables more user
friendly.
tcg_platform.py: Add SHA1 support
Add support for accepting SHA1 hashes. Updates the JSON schema to
accept 160-bit values for SHA1 hashes.
Use a local logger
Uses a local logger instance to avoid using the root logger to avoid
picking up log output from external libraries.
Add variable data hex view to log
Updates the string formatting for UEFI variable data to return a
hexadecimal string followed by a decoded ASCII representation to
make the data easier to view.This can be seen in a file specified using the
-l
parameter in
combination with-v
to output verbose text to the file.
Readme.md: Add new log and variable details
Describes crytpo agile event log and UEFI variable decode support.
Note: There are some general improvements that can be made to the overall design of
the code. That would require a bit of a refactor that I don't have time for at
the moment. Such as using inheritance in a few places that could benefit from it
and reorganizing some of the code structure.
- Impacts functionality?
- Functionality - Does the change ultimately impact how firmware functions?
- Examples: Add a new library, publish a new PPI, update an algorithm, ...
- Impacts security?
- Security - Does the change have a direct security impact on an application,
flow, or firmware? - Examples: Crypto algorithm change, buffer overflow fix, parameter
validation improvement, ...
- Security - Does the change have a direct security impact on an application,
- Breaking change?
- Breaking change - Will anyone consuming this change experience a break
in build or boot behavior? - Examples: Add a new library class, move a module to a different repo, call
a function in a new library class in a pre-existing module, ...
- Breaking change - Will anyone consuming this change experience a break
- Includes tests?
- Tests - Does the change include any explicit test code?
- Examples: Unit tests, integration tests, robot tests, ...
- Includes documentation?
- Documentation - Does the change contain explicit documentation additions
outside direct code modifications (and comments)? - Examples: Update readme file, add feature readme file, link to documentation
on an a separate Web page, ...
- Documentation - Does the change contain explicit documentation additions
How This Was Tested
- Existing PCR0-7 YAML file to binary.
- TPM replay log binary back to YAML file.
- Windows event log to YAML file.
- Resulting YAML file to TPM replay binary.
Integration Instructions
N/A - Details captured in readme. No backward incompatible changes.
- Impacts functionality?
📖 Documentation Updates
-
RustAdvancedLoggerDxe: Remove spinlocks, add `function!()`, add `std` feature. @joschock (#363)
Change Details
## Description
This PR implements 3 enhancements for the RustAdvancedLoggerDxe driver:
- Removes spinlocks altogether. State that used to be shared (in particular, the current log level while generating a multi-part log message) is now on the stack.
- Add
function!()
macro that returns the current function name as a static string. - Add
std
feture that mapsdebug!()
and by extensiondebugln!()
macros to std::println;
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Existing unit tests updated to accommodate new design.
- Includes documentation?
- Existing docs updated to accommodate new design.
How This Was Tested
Unit tests pass, new features validated in both unit test environment (
std
feature active and mapping to std::print) and qemu UEFI boot (std
feature not active, using AdvLogger protocol).Integration Instructions
N/A - existing code should function as-is.
[dev-dependencies] RustAdvancedLoggerDxe = {workspace=true, features=["std"]}
New code that wants to take advantage of
std
can activate it for tests by specifying it as a feature for RustAdvLoggerDxe in dev-dependencies as shown above.
Full Changelog: v2023020003.3.1...v2023020003.4.0