-
Notifications
You must be signed in to change notification settings - Fork 1k
20260727-fips-dev-no-post #11031
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
Open
douzzer
wants to merge
44
commits into
wolfSSL:master
Choose a base branch
from
douzzer:20260727-fips-dev-no-post
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
20260727-fips-dev-no-post #11031
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
6e2b6f6
m4/ax_linuxkm.m4: in the AX_SIMD_CC_COMPILER_FLAGS setup, drop the -m…
douzzer afc43cd
wolfssl/wolfcrypt/error-crypt.h, wolfcrypt/src/error.c: add FIPS_BAD_…
douzzer 9d58c99
wolfssl/wolfcrypt/libwolfssl_sources_asm.h: define BUILDING_WOLFSSL_A…
douzzer 46fb6b8
wolfcrypt/src/*.c: define WC_FIPS_LL_CRYPTO in FIPS-controlled source…
douzzer c7a2c6c
configure.ac: add --enable-fips=dev-no-post (WOLFSSL_FIPS_DEV_NO_POST…
douzzer be988c5
tests/unit.h: pull in wolfssl/wolfcrypt/fips_test.h, for the WOLFSSL_…
douzzer df972c5
wolfcrypt/test/test.c: fix PRIVATE_KEY_UNLOCK() call placement to ass…
douzzer eedceef
wolfssl/wolfcrypt/dh.h, wolfcrypt/src/dh.c: add wc_dh_enable/disable/
douzzer 71d48cf
wolfcrypt/src/ecc.c: pull in wolfssl/wolfcrypt/wc_compat.h for wc_Aes…
douzzer 290553f
wolfcrypt/src/aes.c: in FIPS builds, reject ivSz < GCM_NONCE_MID_SZ (…
douzzer ec54a29
wolfssl/wolfcrypt/cmac.h: add WC_CMAC_NONE = 0 to CmacType.
douzzer 1b53073
wolfcrypt/src/hmac.c: in wc_HmacSetKey_ex reject WC_MD5 under HAVE_FIPS
douzzer 625f39f
src/internal.c:
douzzer 69beb77
wolfssl/wolfcrypt/visibility.h: add user-overrideable WC_ASM_ATT_HIDD…
douzzer 2182768
wolfssl/wolfcrypt/{types.h -> settings.h}: relocate the WC_HAVE_VECTO…
douzzer 4b543b7
various minor cleanups / tweaks for buildability and clarity:
douzzer c82cfca
wolfcrypt/src/{sha256,sha512}.c and wolfssl/wolfcrypt/{sha256,sha512}.h:
douzzer c95cbdb
wolfssl/wolfcrypt/random.h, wolfcrypt/src/random.c: add full
douzzer 558d90c
wolfcrypt/src/rng_bank.c, wolfssl/wolfcrypt/rng_bank.h, linuxkm/lkcap…
douzzer d4293a2
wolfcrypt/src/fe_x25519_asm.{S,asm}, wolfcrypt/src/sp_x86_64_asm.{S,a…
douzzer 0e1a3f9
wolfcrypt/src/falcon.c, configure.ac, wolfcrypt/benchmark/benchmark.c…
douzzer 4803bbd
wolfssl/test.h: convert err_sys() and err_sys_with_errno() to err_sys…
douzzer 2a3e147
tests/api/test_cmac.c: add `&& !defined(WOLFSSL_KCAPI)` to two build …
douzzer 70cb3f0
Fix WC_C_DYNAMIC_FALLBACK in various quantum-resistant alg implementa…
douzzer 47d6666
linuxkm/x86_vector_register_glue.c, linuxkm/linuxkm_wc_port.h: add a
douzzer 348ea89
refactor linuxkm_affinity_lock() and linuxkm_affinity_unlock() to use…
douzzer 93a71f3
wolfssl/wolfcrypt/memory.h: prefix the SAVE_VECTOR_REGISTERS2 GNU sta…
douzzer 4f29532
.github/workflows/codespell.yml: add *.bin to skip list.
douzzer 2f15926
.github/workflows/fips-dev-no-post.yml: add new workflow to cover --e…
douzzer c8dae62
linuxkm/lkcapi_glue.c: make the #error message for defined(CONFIG_CRY…
douzzer 1404ffb
Makefile.am: add HAVE_FIPS_VERSION_MAJOR / _MINOR / _PATCH to the var…
douzzer 4f163df
configure.ac: in enable-all-crypto setup, enable_eccencrypt only if !…
douzzer d1db0a8
wolfssl/wolfcrypt/settings.h: remove WOLFSSL_FIPS_READY and WOLFSSL_F…
douzzer 8618f7c
wolfcrypt/src/logging.c, wolfssl/wolfcrypt/logging.h: recognize WOLFS…
douzzer 9cad7a5
wolfcrypt/src/memory.c: replace PRNG in SAVE_VECTOR_REGISTERS2_fuzzer…
douzzer 2967468
wolfssl/wolfcrypt/memory.h: add #errors for unsupported DEBUG_VECTOR_…
douzzer ec04819
wolfcrypt/test/test.c: fix error codes in ecc_test_curve_size(), mlds…
douzzer 83b175c
fixes and improvements from AI review:
douzzer c249a09
wolfcrypt/src/sha256.c, wolfcrypt/src/sha512.c: clean up and fix up g…
douzzer 50748f0
wolfssl/wolfcrypt/settings.h: remove automatic HAVE___INT128_T/HAVE__…
douzzer 64a9195
fixes from AI review:
douzzer 67df492
fixes from peer review, post-rebase test results, and test coverage e…
douzzer bab1f66
configure.ac: use $CC, not "$CC", for ccache compatibility. fixes en…
douzzer e899972
configure.ac, wolfssl/wolfcrypt/settings.h: finish implementing opt-i…
douzzer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,161 @@ | ||
| name: FIPS dev-no-POST tests | ||
|
|
||
| # --enable-fips=dev-no-post builds with FIPS-like settings but none of the fips | ||
| # repo content: no POST, no CASTs, no optest, and no fips.c wrappers (hence | ||
| # FIPS_NO_WRAPPERS). That makes the FIPS-conditional code in the regular | ||
| # sources buildable and testable on ordinary master, where the fips repo is | ||
| # absent. It also tests for consistency in behavior/error codes between the | ||
| # wrappers and the underlying implementations, because all callers (particularly | ||
| # unit.test) expect FIPS behavior. | ||
|
|
||
| # START OF COMMON SECTION | ||
| on: | ||
| push: | ||
| branches: [ 'release/**' ] | ||
| # Docs-only changes cannot affect the build/test matrix - skip the | ||
| # run for them. Keep this list narrow (markdown + doc/ only); | ||
| # do not add cert/test data extensions here. | ||
| paths-ignore: | ||
| - '**/*.md' | ||
| - 'doc/**' | ||
| pull_request: | ||
| types: [opened, synchronize, reopened, ready_for_review] | ||
| branches: [ '*' ] | ||
| paths-ignore: | ||
| - '**/*.md' | ||
| - 'doc/**' | ||
| # Weekday-morning cron (10:00 UTC) seeds the master-scoped ccache that PR runs | ||
| # restore: re-runs --build-only (compile only, no tests) on the | ||
| # default branch. PR runs are read-only (see ccache-setup). | ||
| schedule: | ||
| - cron: '38 10 * * 1-5' | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
| # END OF COMMON SECTION | ||
|
|
||
| jobs: | ||
| # All former runner-per-config matrix entries build on one runner via | ||
| # .github/scripts/parallel-make-check.py (see os-check.yml for the full | ||
| # pattern): each config builds in its own out-of-tree ("VPATH") build | ||
| # directory off one checkout/autogen, on a pool of one-per-CPU worker | ||
| # threads, longest first. | ||
| build_library: | ||
| name: build library/module | ||
| if: ${{ (github.repository_owner == 'wolfssl') && (github.event_name != 'pull_request' || github.event.pull_request.draft == false) }} | ||
| runs-on: ubuntu-24.04 | ||
| # Generous for a cold ccache; warm reruns finish in a fraction. | ||
| timeout-minutes: 30 | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| name: Checkout wolfSSL | ||
|
|
||
| - name: Install dependencies | ||
| uses: ./.github/actions/install-apt-deps | ||
| with: | ||
| packages: autoconf automake libtool build-essential linux-headers-$(uname -r) | ||
| ghcr-debs-tag: ubuntu-24.04-linuxkm | ||
|
|
||
| - name: Set up ccache | ||
| uses: ./.github/actions/ccache-setup | ||
| with: | ||
| workflow-id: fips-dev-no-post | ||
| read-only: ${{ github.event_name == 'pull_request' }} | ||
| max-size: 500M | ||
|
|
||
| - name: Prepare target kernel for module builds | ||
| run: | | ||
| echo "preparing target kernel $(uname -r)" | ||
| pushd "/lib/modules/$(uname -r)/build" || $(exit 4) | ||
| if [ -f /proc/config.gz ]; then gzip -dc /proc/config.gz > /tmp/.config && sudo mv /tmp/.config . || $(exit 5); elif [ -f "/boot/config-$(uname -r)" ]; then sudo cp -p "/boot/config-$(uname -r)" .config || $(exit 6); fi | ||
| sudo make -j 4 olddefconfig || $(exit 7) | ||
| sudo make M="$(pwd)" modules_prepare || $(exit 8) | ||
| popd >/dev/null | ||
|
|
||
| - name: autogen.sh | ||
| run: | | ||
| ./autogen.sh || $(exit 9) | ||
|
|
||
| # "base" carries flags appropriate for every config; its "configure" list | ||
| # is prepended to each config's own. KERNEL_EXTRA_CFLAGS_REMOVE and | ||
| # FORCE_NO_MODULE_SIG go in the environment rather than the JSON because | ||
| # the pool builds with a bare "make" (no way to add variables to that | ||
| # command line); make picks them up from the environment, and they are | ||
| # inert for the non-linuxkm configs. Note the heredoc is unquoted so | ||
| # $(uname -r) and $FUZZING_SEED expand -- there are no other $ or | ||
| # backticks in the JSON. | ||
| - name: Build all configs (parallel, out-of-tree) | ||
| env: | ||
| KERNEL_EXTRA_CFLAGS_REMOVE: -pg | ||
| FORCE_NO_MODULE_SIG: 1 | ||
| run: | | ||
| FUZZING_SEED=$(( (RANDOM << 15) ^ RANDOM )) | ||
| echo "FUZZING_SEED=$FUZZING_SEED" | ||
| if [ -n "$GITHUB_STEP_SUMMARY" ]; then echo "FUZZING_SEED=$FUZZING_SEED" >> "$GITHUB_STEP_SUMMARY"; fi | ||
| cat > "$RUNNER_TEMP/fips-dev-no-post-configs.json" <<EOF | ||
| {"base": {"configure": ["--enable-fips=dev-no-post", | ||
| "--with-linux-source=/lib/modules/$(uname -r)/build", | ||
| "EXTRA_CPPFLAGS=-Werror"]}, | ||
| "configs": [ | ||
| {"name": "default", "minutes": 7, | ||
| "configure": ["CPPFLAGS=-pedantic"]}, | ||
| {"name": "all-asm-sp", "minutes": 7, | ||
| "configure": ["CPPFLAGS=-pedantic", "--enable-all-asm", "--enable-sp"]}, | ||
| {"name": "all", "minutes": 16, | ||
| "configure": ["CPPFLAGS=-pedantic", "--enable-all"]}, | ||
| {"name": "all-nodh-extiv", "minutes": 16, | ||
| "comment": "DH out of the boundary in v7; one-shot AES-GCM ext IV allowed", | ||
| "configure": ["--enable-all", "--disable-dh", | ||
| "CPPFLAGS=-pedantic -DWC_FIPS_AESGCM_ONE_SHOT_EXT_IV_ALLOWED -DWC_FIPS_AESGCM_NO_SHORT_NONCES"]}, | ||
| {"name": "all-pqc-asm-fallback-fuzzer", "minutes": 22, | ||
| "configure": ["--enable-all", "--enable-sp", "--enable-experimental", "--enable-all-quantum-crypto", | ||
| "CPPFLAGS=-pedantic -DWC_DEBUG_CIPHER_LIFECYCLE -DWC_C_DYNAMIC_FALLBACK -DDEBUG_VECTOR_REGISTER_ACCESS -DDEBUG_VECTOR_REGISTER_ACCESS_FUZZING -DWC_DEBUG_VECTOR_REGISTERS_FUZZING_SEED=$FUZZING_SEED"]}, | ||
| {"name": "kernel-settings", "minutes": 8, | ||
| "configure": ["--enable-kernel-settings", "--enable-dh", | ||
| "CPPFLAGS=-pedantic"]}, | ||
| {"name": "kernel-settings-all-pqc-asm", "minutes": 22, | ||
| "configure": ["--enable-kernel-settings", "--enable-all", "--enable-experimental", "--enable-all-quantum-crypto", | ||
| "--enable-all-asm", "--enable-sp", | ||
| "CPPFLAGS=-pedantic -DWC_DEBUG_CIPHER_LIFECYCLE -DWC_C_DYNAMIC_FALLBACK -DDEBUG_VECTOR_REGISTER_ACCESS -DDEBUG_VECTOR_REGISTER_ACCESS_FUZZING -DWC_DEBUG_VECTOR_REGISTERS_FUZZING_SEED=$FUZZING_SEED"]} | ||
| ]} | ||
| EOF | ||
| # out-of-tree kernel module builds not working yet: | ||
| # {"name": "linuxkm", "minutes": 4, | ||
| # "comment": "module build; check=false (no host-side test suite), and the ls proves the .ko landed in the VPATH build dir", | ||
| # "check": false, | ||
| # "run": [["ls", "-l", "linuxkm/libwolfssl.ko"]], | ||
| # "configure": ["--enable-linuxkm", | ||
| # "--enable-linuxkm-lkcapi-register=all", "--enable-crypttests", | ||
| # "--enable-linuxkm-benchmarks", "--with-max-rsa-bits=16384", | ||
| # "CFLAGS=-Wframe-larger-than=2048 -Wstack-usage=4096 -DBENCH_EMBEDDED -DBENCH_MIN_RUNTIME_SEC=0.01 -DBENCH_NTIMES=1 -DBENCH_AGREETIMES=1"]}, | ||
| # {"name": "linuxkm-all-asm", "minutes": 6, | ||
| # "check": false, | ||
| # "run": [["ls", "-l", "linuxkm/libwolfssl.ko"]], | ||
| # "configure": ["--enable-linuxkm", | ||
| # "--enable-linuxkm-lkcapi-register=all", "--enable-all", | ||
| # "--enable-all-asm", "--enable-crypttests", | ||
| # "--enable-linuxkm-benchmarks", "--with-max-rsa-bits=16384", | ||
| # "CFLAGS=-Wframe-larger-than=2048 -Wstack-usage=4096 -DBENCH_EMBEDDED -DBENCH_MIN_RUNTIME_SEC=0.01 -DBENCH_NTIMES=1 -DBENCH_AGREETIMES=1"]} | ||
| .github/scripts/parallel-make-check.py \ | ||
| ${{ github.event_name == 'schedule' && '--build-only' || '' }} \ | ||
| "$RUNNER_TEMP/fips-dev-no-post-configs.json" | ||
|
|
||
| - name: ccache stats | ||
| if: always() | ||
| run: ccache -s || true | ||
|
|
||
| - name: Upload logs on failure | ||
| if: failure() | ||
| uses: actions/upload-artifact@v6 | ||
| with: | ||
| retention-days: 7 | ||
| name: dev-no-POST-logs | ||
| path: | | ||
| build-*/make-check.log | ||
| build-*/test-suite.log | ||
| build-*/config.log | ||
| if-no-files-found: ignore | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.