-
Notifications
You must be signed in to change notification settings - Fork 50
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
Cherry pick commits from main [12/19-1/30] #1969
Merged
Merged
Conversation
This file contains 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
FMC and RT SVNs are controlled by the vendor. Add an option to the image builder to specify these SVNs from the command-line. (cherry picked from commit 9ea287b)
Currently `rand_bytes` is only used on a buffer < than 48 bytes. If used with a buffer larger than 48 bytes a panic is introduced to the Caliptra runtime due to bounds checking. This change uses a chunks iterator instead. Each chunk is guaranteed to be 48 bytes except for the last chunk which contains the remainder. (cherry picked from commit 9a26b8b)
This can be useful for offline/external signing to extract the digests for an image bundle to be passed to the signing interface. The output is a JSON file with the vendor and owner hashes tagged with their respective names. This was tested by printing the hash from the ROM in the smoke tests to ensure the calculated hash is the same for both the firmware and tool. (cherry picked from commit 6f0a823)
40c92c2
to
8d6a92c
Compare
Creates an image bundle with FMC and Runtime populated with zeros. 0 is an ilegal opcode in risc-v, so the image will immediately NMI. This is useful for testing production signing infrastructure. A production key can be used to sign this image before an official release is ready. The prod-signed zeros binary is benign but can be used to ensure that the prod key was loaded into fuses correctly. (cherry picked from commit 85b732a)
Sometimes when results are unwrapped, the compiler will memcopy the Ok struct. okref will instead borrow the inner type. Using this on the packet struct saves about 4KiB of stack space. (cherry picked from commit 2d659cb)
(cherry picked from commit 3b76999)
(cherry picked from commit 77823a1)
(cherry picked from commit e50636a)
(cherry picked from commit 77e61bd)
Checking that byte slice is utf-8 requires a significant amount of code space. By enforcing ascii this space can be saved at the cost of using subject alt names that contain non-ascii utf-8 characters. (cherry picked from commit f17528a)
8d6a92c
to
99d941a
Compare
jhand2
approved these changes
Feb 19, 2025
swenson
approved these changes
Feb 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, one question
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.
This does not have the fa6b1a9 which will be added later.