这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@deeglaze
Copy link
Contributor

The product and stepping values that are default may not be the same across all testing environments, so add product_name as a flag to testing library. The stepping value does not necessarily need to be checked, so deprecate the stepping field of SevProduct and replace with a UInt32Value that can be nil.

The checkProductName drops checking Stepping in favor of checking the nullable MachineStepping field.

@deeglaze deeglaze requested a review from kongoshuu October 19, 2023 02:44

// ProductName returns the expected productName extension value for the product associated
// with an attestation report proto.
func ProductName(product *pb.SevProduct) string {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since product.Stepping is marked as deprecated, shall we replace all its use by machine_stepping? Here and elsewhere

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I replaced all the uses, but I don't agree with the linter's blocking error here. We should have a period of time where we have both fields so we can more gradually transition.


func populateProduct() error {
// The SevProduct can come from either product_name or the combination of product and stepping.
if *testing.ProductName != "" && (*productString != "" || *stepping != "") {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add some examples in the comments for ProductName/productString/stepping here? It's a bit unclear what's the difference between productname and productstring. Seems productString and stepping are flags to be parsed in. Is it the expected way to use it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that probably --stepping is redundant, but --product without the stepping is needed to not care about the expected machine stepping value. Do the descriptions on the flags not make their use clear enough?

The product and stepping values that are default may not be the same
across all testing environments, so add product_name as a flag to
testing library. The stepping value does not necessarily need to be
checked, so deprecate the stepping field of SevProduct and replace with
a UInt32Value that can be nil.

The checkProductName drops checking Stepping in favor of checking
the nullable MachineStepping field.

Signed-off-by: Dionna Glaze <dionnaglaze@google.com>
@deeglaze deeglaze merged commit 1298952 into google:main Oct 19, 2023
@deeglaze deeglaze deleted the hwproduct branch February 8, 2024 16:49
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