tpm2_eventlog: Fix parsing on big-endian systems#3506
Merged
JuergenReppSIT merged 1 commit intotpm2-software:masterfrom Sep 8, 2025
Merged
tpm2_eventlog: Fix parsing on big-endian systems#3506JuergenReppSIT merged 1 commit intotpm2-software:masterfrom
JuergenReppSIT merged 1 commit intotpm2-software:masterfrom
Conversation
AndreasFuchsTPM
requested changes
Sep 3, 2025
Member
AndreasFuchsTPM
left a comment
There was a problem hiding this comment.
Please correct the trailing-spaces-empty-indet
lib/tpm2_eventlog_yaml.c
Outdated
| break; | ||
| } | ||
|
|
||
Signed-off-by: Štěpán Horáček <shoracek@redhat.com>
9dd8fa4 to
c2a5c70
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When using tpm2_eventlog on big-endian systems, instead of properly parsing the file I get an error:
After the changes, the output is the same as on a little-endian system.
Tested by running
tpm2_eventlog --eventlog-version=2 binary_bios_measurementson x86_64 machine and s390x machine and comparing the outputs.I couldn't find s390x machine with TPM, so I used binary_bios_measurements file from x86_64 machine. I don't think that should be an issue though, as according to the TCG PC Client Platform Firmware Profile Specification standard the structures should be all in little endian, if I understand correctly.