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

20220911-fixes-re-multi-test #5579

Merged
merged 3 commits into from
Sep 15, 2022

Conversation

douzzer
Copy link
Contributor

@douzzer douzzer commented Sep 11, 2022

wolfssl/wolfcrypt/sp_int.h and wolfcrypt/src/sp_int.c:

add struct sp_int_minimal, with same structure as struct sp_int but only one digit, to allow error-free access to sp_ints allocated with ALLOC_SP_INT() with fewer than SP_INT_DIGITS digits, and use the new type in _sp_zero() and sp_init_size() to eliminate -Werror=array-bounds on _sp_zero() under gcc-13.

tested with wolfssl-mult-test.sh ... super-quick-check fips-140-3-dev-optest-acvp-sp-asm-gcc-latest linuxkm-mainline-pie-gcc-latest at testing commit 7ccf1f2c3b9 (PR#346).

also adds support for $KBUILD_EXTRA_FLAGS to linuxkm/Makefile, needed to activate linuxkm-mainline-pie-gcc-latest.

@douzzer
Copy link
Contributor Author

douzzer commented Sep 12, 2022

@SparkiDev note all tests have passed on this. The "pending" on Options-A and FIPSv2 Regression are Jenkins->github integration glitches.

wolfcrypt/src/sp_int.c Outdated Show resolved Hide resolved
@douzzer douzzer requested a review from SparkiDev September 13, 2022 14:31
@SparkiDev
Copy link
Contributor

Tried gcc-13 with -Werror=array-bounds with --enable-all and it didn't fail. (Not FIPS or kernel.)
What else do I have to do?

@douzzer
Copy link
Contributor Author

douzzer commented Sep 14, 2022

So far I've only gotten it to trigger in the linuxkm build. That's what the copy-paste is from.

My guess is it's something to do with the options that Kbuild is passing to gcc.

Anyway the new linuxkm-mainline-pie-gcc-latest scenario in wolfssl-multi-test.sh exercises it, but only after this PR merges (the $(KBUILD_EXTRA_FLAGS) stuff in linuxkm/Makefile is needed).

wolfcrypt/src/sp_int.c Outdated Show resolved Hide resolved
wolfcrypt/src/sp_int.c Outdated Show resolved Hide resolved
@SparkiDev
Copy link
Contributor

What are the KBUILD_EXTRA_FLAGS?
grep found nothing so I assume it is something you add.
List them if possible.

…int_minimal, with same structure as struct sp_int but only one digit, to allow error-free access to sp_ints allocated with ALLOC_SP_INT() with fewer than SP_INT_DIGITS digits, and use the new type in _sp_zero() and sp_init_size() to eliminate -Werror=array-bounds on _sp_zero() under gcc-13.
@douzzer
Copy link
Contributor Author

douzzer commented Sep 15, 2022

That's the recipe in linuxkm-mainline-pie-gcc-latest, referenced in the initial PR message. That new scenario is already merged. It is, in relevant part:

    KBUILD_EXTRA_FLAGS="CC=$GCC_LATEST HOSTCC=$GCC_LATEST" do_scenario_no_check "$scenario" CC="$GCC_LATEST" HOSTCC="$GCC_LATEST" "${ENABLE_ALL_TEST_FLAGS[@]}" --enable-aesni --enable-sp-asm --enable-linuxkm --enable-linuxkm-pie --enable-reproducible-build --enable-crypttests --with-linux-source="${linux[$linux_cur]}"

The only difference between the long-existing linuxkm-mainline-pie scenario and the new one is the KBUILD_EXTRA_FLAGS=... at the start, and the CC="$GCC_LATEST" HOSTCC="$GCC_LATEST" args to configure.

@douzzer douzzer force-pushed the 20220911-fixes-re-multi-test branch from c070deb to d18a654 Compare September 15, 2022 20:18
@douzzer douzzer requested a review from SparkiDev September 15, 2022 20:19
@SparkiDev SparkiDev merged commit 523c161 into wolfSSL:master Sep 15, 2022
@douzzer douzzer mentioned this pull request Mar 5, 2024
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