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

20240910-configure-enable-all-asm-and-sp-cleanup #7967

Conversation

douzzer
Copy link
Contributor

@douzzer douzzer commented Sep 11, 2024

configure.ac:

  • add --enable-all-asm (enables sp-asm and either intelasm or armasm), and add it to --enable-all-crypto.
  • implement full-Gnu-C compiler test to gate inclusion of --enable-all-asm in --enable-all-crypto
  • consolidate enable-all-crypto settings in one place (--enable-all now simply activates --enable-all-crypto).
  • in enable-all and enable-all-crypto setup, correctly conditionalize several FIPS-v6-only features/algorithms.
  • render warnings when FIPS setup forces off options supplied to configure, and in FIPS v5 setup, force off SRTP and SRTP-KDF with warnings.

wolfcrypt/src/siphash.c: fixes for bugprone-macro-parentheses.

wolfcrypt/src/sp_int.c: fix bugprone-too-small-loop-variable in _sp_mul().

SP asm: fixes for several bugprone-macro-parentheses and -Wconversions.

tested with wolfssl-multi-test.sh ... super-quick-check quantum-safe-wolfssl-all-cppcheck clang-tidy-all-sp-all quantum-safe-wolfssl-all-clang-tidy quantum-safe-wolfssl-all-no-asm-clang-tidy quantum-safe-wolfssl-all-cross-aarch64-armasm-unittest-sanitizer quantum-safe-wolfssl-all-cross-armv7a-armasm-unittest with --enable-all[-crypto] updated to enable sp-asm and intelasm/armasm on full Gnu C targets.

review+merge with https://github.com/wolfSSL/scripts/pull/423

@SparkiDev
Copy link
Contributor

Get sp_cortexm.c generation working and I'll review.

@douzzer
Copy link
Contributor Author

douzzer commented Sep 12, 2024

retest this please ("google test" glitched)

@douzzer
Copy link
Contributor Author

douzzer commented Sep 12, 2024

retest this please (post-testing#781 merge)

…r enable-all-crypto, and compute DEFAULT_ENABLED_ALL_ASM appropriately.
* in handling for enable-all-asm, add check for full Gnu C and don't auto-enable all-asm unless full Gnu C and enable-all-crypto, among other sanity checks.
* in enable-all and enable-all-crypto, correctly conditionalize several FIPS-v6-only features/algorithms.
* in FIPS v5 setup, force off SRTP and SRTP-KDF (with warnings).
…rch64, and enable sp-asm only for them, to avoid "ASM not available for CPU" error from sp-asm handler.
* move leanpsk and asn option processing early to make their results available to existing math back end selector logic;
* add -DWOLFSSL_ASN_ALL to enable-all-crypto;
* tweak asn option processing to preserve "original" value in case later configure logic wants to pivot on that.
@douzzer douzzer force-pushed the 20240910-configure-enable-all-asm-and-sp-cleanup branch from ebd2855 to 3fac3b7 Compare September 12, 2024 18:29
…ng var, by refactoring gating for WOLFSSL_OCSP_PARSE_STATUS sections for clarity.
Copy link
Contributor

@kaleb-himes kaleb-himes left a comment

Choose a reason for hiding this comment

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

I see no glaring issues from the FIPS perspective.

Copy link
Contributor

@dgarske dgarske left a comment

Choose a reason for hiding this comment

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

Nice improvements!

@SparkiDev SparkiDev merged commit 171ab4b into wolfSSL:master Sep 12, 2024
135 checks passed
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.

4 participants