Skip to content

Comments

Refactor CPUID code, take 2#14755

Closed
levitte wants to merge 9 commits intoopenssl:masterfrom
levitte:fix-11281
Closed

Refactor CPUID code, take 2#14755
levitte wants to merge 9 commits intoopenssl:masterfrom
levitte:fix-11281

Conversation

@levitte
Copy link
Member

@levitte levitte commented Mar 31, 2021

We were using CPUID coded in several modules, but it was unclear how
it actually got there, and could fail randomly.

To remedy that, this change separates the CPUID C code from the rest
of cryptlib.c, and ensures the right modules get both that and the
assembler sources explicitly.

Fixes #11281

levitte added 7 commits March 31, 2021 11:49
We were using CPUID coded in several modules, but it was unclear how
it actually got there, and could fail randomly.

To remedy that, this change separates the CPUID C code from the rest
of cryptlib.c, and ensures the right modules get both that and the
assembler sources explicitly.

Fixes openssl#11281
It turns out that some CPUID code requires the presence of some BN
assembler code, so we make sure it's included in the same manner as
the CPUID code itself.
@levitte levitte added branch: master Applies to master branch approval: review pending This pull request needs review by a committer labels Mar 31, 2021
@levitte
Copy link
Member Author

levitte commented Mar 31, 2021

@levitte
Copy link
Member Author

levitte commented Mar 31, 2021

Judging from the current build status for https://github.com/levitte/openssl/tree/fix-11281%2B%2Bworkflow-reimplement-no-shared (which now also includes @slontis' #14738), this PR is good to go now.

@levitte
Copy link
Member Author

levitte commented Mar 31, 2021

The external-tests failure currently visible doesn't look relevant...

crypto/cpuid.c Outdated
@@ -0,0 +1,215 @@
/*
* Copyright 1998-2020 The OpenSSL Project Authors. All Rights Reserved.
Copy link
Member

Choose a reason for hiding this comment

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

Not sure why you went backwards with the date here :)

Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't... I originally did this stuff last year, and didn't think to look now.

Copy link
Member

Choose a reason for hiding this comment

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

I would argue that you added this file just yesterday (1998-2021)

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Member Author

Choose a reason for hiding this comment

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

I would argue that you added this file just yesterday (1998-2021)

Then you would be wrong.

commit c1c52b5
Author: Richard Levitte [email protected]
Date: Wed Mar 11 17:38:46 2020 +0100

Copy link
Member

@t8m t8m left a comment

Choose a reason for hiding this comment

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

Good work!

@t8m t8m added approval: done This pull request has the required number of approvals and removed approval: review pending This pull request needs review by a committer labels Apr 1, 2021
@openssl-machine
Copy link
Collaborator

24 hours has passed since 'approval: done' was set, but this PR has failing CI tests. Once the tests pass it will get moved to 'approval: ready to merge' automatically, alternatively please review and set the label manually.

openssl-machine pushed a commit that referenced this pull request Apr 2, 2021
We were using CPUID coded in several modules, but it was unclear how
it actually got there, and could fail randomly.

To remedy that, this change separates the CPUID C code from the rest
of cryptlib.c, and ensures the right modules get both that and the
assembler sources explicitly.

Fixes #11281

Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #14755)
openssl-machine pushed a commit that referenced this pull request Apr 2, 2021
It turns out that some CPUID code requires the presence of some BN
assembler code, so we make sure it's included in the same manner as
the CPUID code itself.

Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #14755)
@levitte
Copy link
Member Author

levitte commented Apr 2, 2021

ef83daf Refactor CPUID code
5ad3e6c Include BN assembler alongside CPUID code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval: done This pull request has the required number of approvals branch: master Applies to master branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build OpenSSL on ubuntu, compile failed in x86_32(providers/legacy.so)

4 participants