Skip to content

20251017-linuxkm-signal-handling-tweaks#9318

Merged
philljj merged 6 commits intowolfSSL:masterfrom
douzzer:20251017-linuxkm-signal-handling-tweaks
Oct 18, 2025
Merged

20251017-linuxkm-signal-handling-tweaks#9318
philljj merged 6 commits intowolfSSL:masterfrom
douzzer:20251017-linuxkm-signal-handling-tweaks

Conversation

@douzzer
Copy link
Copy Markdown
Contributor

@douzzer douzzer commented Oct 17, 2025

linuxkm/linuxkm_wc_port.h, wolfssl/wolfcrypt/types.h, linuxkm/module_hooks.c, linuxkm/lkcapi_glue.c:

  • add WC_SIG_IGNORE_BEGIN(), WC_SIG_IGNORE_END(), wc_linuxkm_sig_ignore_begin(), wc_linuxkm_sig_ignore_end();
  • move WC_CHECK_FOR_INTR_SIGNALS() and WC_RELAX_LONG_LOOP() definitions outside the BUILDING_WOLFSSL gate;
  • tweak gating for verifyCore and my_kallsyms_lookup_name, and use the latter to reach verifyCore on old FIPS;
  • tweak the "In-core integrity hash check failure." message to supply module-update-fips-hash instructions;
  • refactor linuxkm_lkcapi_registering_now as a wolfSSL_Atomic_Int and use it as a mutex for linuxkm_lkcapi_register() and linuxkm_lkcapi_unregister();
  • add WC_SIG_IGNORE_BEGIN()...WC_SIG_IGNORE_END() wrappers around all relevant critical spans in linuxkm glue.

.github/workflows/linuxkm.yml: comment out --enable-linuxkm-pie config, pending resolution of "dwarf_get_units failed" on Azure kernel 6.14 image.

tested with wolfssl-multi-test.sh ... '.*insmod.*' with multi-test fixed to recognize the new kernel hash check failure message.

…hooks.c, linuxkm/lkcapi_glue.c:

* add WC_SIG_IGNORE_BEGIN(), WC_SIG_IGNORE_END(), wc_linuxkm_sig_ignore_begin(), wc_linuxkm_sig_ignore_end();
* move WC_CHECK_FOR_INTR_SIGNALS() and WC_RELAX_LONG_LOOP() definitions outside the BUILDING_WOLFSSL gate;
* refactor linuxkm_lkcapi_registering_now as a wolfSSL_Atomic_Int and use it as a mutex for linuxkm_lkcapi_register() and linuxkm_lkcapi_unregister();
* add WC_SIG_IGNORE_BEGIN()...WC_SIG_IGNORE_END() wrappers around all relevant critical spans in linuxkm glue.
…g, pending resolution of "dwarf_get_units failed" on Azure kernel 6.14 image.
…r verifyCore and my_kallsyms_lookup_name, and use the latter to reach verifyCore on old FIPS. also tweak the In-core integrity hash check failure." message to supply module-update-fips-hash instructions.
@devin-ai-integration
Copy link
Copy Markdown
Contributor

🛟 Devin Lifeguard found 2 likely issues in this PR

  • check-all-return-codes snippet snippet snippet snippet snippet: Capture the return value of WC_SIG_IGNORE_BEGIN/END (e.g. int nesting = WC_SIG_IGNORE_BEGIN(); ) and, if needed, validate or at least explicitly cast to void to indicate intentional discard, satisfying the rule.
  • check-all-return-codes snippet snippet snippet: Capture the integer returned by WC_SIG_IGNORE_BEGIN/END (e.g., int ignore_cnt = WC_SIG_IGNORE_BEGIN();) and verify it or explicitly cast to (void) with a comment explaining why the value can be ignored.

@douzzer
please take a look at the above issues which Devin flagged. Devin will not fix these issues automatically.

…LD to, reproducible-build AM_CFLAGS, and always add -gdwarf-4 to AM_CFLAGS when ENABLED_LINUXKM;

.github/workflows/linuxkm.yml: restore as-was, but change from oldconfig to olddefconfig.
@douzzer
Copy link
Copy Markdown
Contributor Author

douzzer commented Oct 17, 2025

Devin Lifeguard found 2 likely issues in this PR

Addressed. _BEGIN() is now checked, and _END() is explicitly (void)ed.

@douzzer
Copy link
Copy Markdown
Contributor Author

douzzer commented Oct 18, 2025

retest this please

missing workspace /var/lib/jenkins/workspace/wolfSSL/PRB-140-3-tests on boz-xeon1
[...]
/var/lib/jenkins/workspace/wolfSSL/PRB-140-3-tests@tmp/durable-3010428d/script.sh.copy: 1: cd: can't cd to wolfssl-fips

…ng kernel headers (needed for kernel <=4.9).
@douzzer
Copy link
Copy Markdown
Contributor Author

douzzer commented Oct 18, 2025

retest this please

FAIL scripts/openssl.test (exit status: 1)

Copy link
Copy Markdown
Contributor

@philljj philljj left a comment

Choose a reason for hiding this comment

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

Thanks for fixing the dwarf issue!

@philljj philljj merged commit c091c8b into wolfSSL:master Oct 18, 2025
259 checks passed
@douzzer
Copy link
Copy Markdown
Contributor Author

douzzer commented Oct 18, 2025

Thanks for fixing the dwarf issue!

image

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