Skip to content

Commit 9af2767

Browse files
committed
Add more explanation for the cpuidWorkaround
1 parent 6583b01 commit 9af2767

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

verify/verify.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -728,6 +728,17 @@ func setProduct(attestation *spb.Attestation, product *spb.SevProduct) {
728728
attestation.Product = product
729729
}
730730

731+
// In version 2 attestation reports, there is no cpuid_1_eax information about the
732+
// family/model/stepping of the chip, so it's difficult to derive the endpoint from which to
733+
// fetch a VCEK certificate.
734+
// In version 3 attestation reports, the information is present, so we can directly return
735+
// the product line from those fields of the report.
736+
//
737+
// The result values are a product line string, a method of updating product information when there
738+
// is no explicit product expectation from options, and a method of updating the product expectation
739+
// when relevant. This can correct any inaccuracy about a stepping value.
740+
// For v3 reports, these update functions are trivial, as there are no inaccuracies to correct when
741+
// the information is directly in the attestation report.
731742
func cpuidWorkaround(attestation *spb.Attestation, options *Options) (string, func([]byte) error, func() error, error) {
732743
productUpdate := func([]byte) error { return nil }
733744
updateExpectation := func() error { return nil }

0 commit comments

Comments
 (0)