-
Notifications
You must be signed in to change notification settings - Fork 57
Ensure PcrSelectionList retains order #236
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
Conversation
PcrSelectionList would (possibly) reorder and merge the different TPML_PCR_SELECTION entries. This is not valid in the case where for example the PcrSelectionList is the result of a pcr_read() call: in that case, the actual PCR values are in the same order as the TPML_PRC_SELECTION entries. This means that "subtracting" a PcrSelectionList becomes practically impossible. Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
This was causing bugs with attestation where we have two I considered just always serializing The (I have another |
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.
Looks good to me, but I'm not particularly knowledgeable around this part of the specs. Will let @Superhepper taken a better look.
Oh, also, this breaks API compatibility, so it'd have to be released in version 6.0.0 |
I can try to re-add a |
I am not against this in any way. Though I intended the subtracting method to be used when you were using a selection that was greater then could be read in one go so you easily could find what selection you needed to use next in order to get the rest. I am not sure if it is an actual case that will happen that often. But if would be nice to have similar convenience function or method some where. But then one needs to figure out how to implement it correctly in order to make play well together with context functions like quote. |
@Superhepper Hah! I had not even realized that that's what this was used for, that explains why I recently felt like I was reimplementing this! (I had to do exactly the "reading more than 8 PCRs" usecase the other day). I'll send a new patch later today that brings back |
Hello! |
I'm wondering if we could merge this as is, make a new release, and then bring back |
Yeah that is absolutely fine with me. |
Your commit was merged in #243 so that we can go ahead with the release, feel free to add the |
Add missing_docs lint and missing docs
PcrSelectionList would (possibly) reorder and merge the different
TPML_PCR_SELECTION entries.
This is not valid in the case where for example the PcrSelectionList is
the result of a pcr_read() call: in that case, the actual PCR values are
in the same order as the TPML_PRC_SELECTION entries.
This means that "subtracting" a PcrSelectionList becomes practically
impossible.
Signed-off-by: Patrick Uiterwijk patrick@puiterwijk.org