Skip to content
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

edk2.py: Improve firmware volume (de)serialization #11

Merged
merged 1 commit into from
Mar 6, 2024
Merged

edk2.py: Improve firmware volume (de)serialization #11

merged 1 commit into from
Mar 6, 2024

Conversation

kukrimate
Copy link
Contributor

  • The last field of the firmware volume header is a variable size, run-length encoded blockmap, we cannot and shouldn't hardcode this.
  • The length of the firmware volume header can be variable and is described by the HeaderLength field.
  • Firmware volumes can have so called "extension headers", we don't understand these, thus it is likely better to error out then produce bad data when encountering them.

@agraf
Copy link
Contributor

agraf commented Mar 5, 2024

I added a few test cases to the repo which fail with this pull request applied. Would you mind to have a look? :)

- The last field of the firmware volume header is a variable size,
  run-length encoded blockmap, we cannot and shouldn't hardcode this.
- The length of the firmware volume header can be variable and is
  described by the `HeaderLength` field.
- Firmware volumes can have so called "extension headers", we don't
  understand these, thus it is likely better to error out then produce
  bad data when encountering them.

Signed-off-by: Mate Kukri <mate.kukri@canonical.com>
@agraf agraf merged commit 5f07c28 into awslabs:main Mar 6, 2024
1 check passed
@agraf
Copy link
Contributor

agraf commented Mar 6, 2024

Thank you! :)

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