Skip to content
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

Backport 2.28: Support cpuid for win32 #8392

Conversation

lpy4105
Copy link
Contributor

@lpy4105 lpy4105 commented Oct 19, 2023

Description

Backport of #8339

PR checklist

Please tick as appropriate and edit the reasons (e.g.: "backport: not needed because this is a new feature")

  • changelog provided
  • backport this is a backport
  • tests not required

`__cpuid` has two kinds of signatures in different
headers depending on the target OS. We make it
consistent between the usages ang the included header.

Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
Change the type of array that stores the cpuinfo
data to int[4] to match the signature of `__cpuinfo`
in `intrin.h` header file.

Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
MinGW provides both kinds of implementations of `__cpuid`,
but since `cpuid.h` is provided by GNUC, so we should choose
the implementation by the compiler type instead of OS type.

Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
@lpy4105 lpy4105 mentioned this pull request Oct 19, 2023
3 tasks
@lpy4105 lpy4105 added bug needs-review Every commit must be reviewed by at least two team members, component-crypto Crypto primitives and low-level interfaces needs-reviewer This PR needs someone to pick it up for review size-s Estimated task size: small (~2d) priority-high High priority - will be reviewed soon labels Oct 19, 2023
@tom-cosgrove-arm
Copy link
Contributor

Is there nothing to be done for all.sh in the backport?

Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
@lpy4105
Copy link
Contributor Author

lpy4105 commented Oct 19, 2023

Is there nothing to be done for all.sh in the backport?

Since 2.28 and development behave differently regarding AESNI, so the tests differ from that in development. Please tell me if the tests make sense.

@lpy4105 lpy4105 force-pushed the backport-2.28/issue/support-cpuid-for-win32 branch from 1446cd9 to e6cbec8 Compare October 20, 2023 01:55
Copy link
Contributor

@tom-cosgrove-arm tom-cosgrove-arm left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@yuhaoth yuhaoth left a comment

Choose a reason for hiding this comment

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

LGTM

@tom-cosgrove-arm tom-cosgrove-arm added approved Design and code approved - may be waiting for CI or backports and removed needs-review Every commit must be reviewed by at least two team members, needs-reviewer This PR needs someone to pick it up for review labels Oct 23, 2023
@tom-cosgrove-arm tom-cosgrove-arm added this pull request to the merge queue Oct 23, 2023
Merged via the queue into Mbed-TLS:mbedtls-2.28 with commit c6d5628 Oct 23, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Design and code approved - may be waiting for CI or backports bug component-crypto Crypto primitives and low-level interfaces priority-high High priority - will be reviewed soon size-s Estimated task size: small (~2d)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants