Skip to content

Conversation

@douzzer
Copy link
Contributor

@douzzer douzzer commented Sep 29, 2025

refactor WOLFSSL_LINUXKM gates as generic WOLFSSL_KERNEL_MODE gates where appropriate:

rename WOLFSSL_LINUXKM_USE_SAVE_VECTOR_REGISTERS to WOLFSSL_USE_SAVE_VECTOR_REGISTERS, and wherever appropriate, replace defined(WOLFSSL_LINUXKM) with defined(WOLFSSL_USE_SAVE_VECTOR_REGISTERS).

rename WC_WANT_FLAG_DONT_USE_AESNI to WC_WANT_FLAG_DONT_USE_VECTOR_OPS.

rename lkm_printf() to wc_km_printf().

replace WOLFSSL_LINUXKM gates on kernel-incompatible includes with header-specific gates NO_STRING_H, NO_STDINT_H, NO_LIMITS_H, NO_CTYPE_H, NO_STDLIB_H

remove low level threading setup section of wolfssl/internal.h, which duplicated existing logic in wc_port.h, except for off-topic WOLFSSL_APACHE_MYNEWT TLS-layer setup, which is preserved, and a defined(__NT__) clause, which is now merged into the existing section in wc_port.h.

tested with wolfssl-multi-test.sh ... pr-check underway now.

…here appropriate:

rename WOLFSSL_LINUXKM_USE_SAVE_VECTOR_REGISTERS to WOLFSSL_USE_SAVE_VECTOR_REGISTERS, and wherever appropriate, replace defined(WOLFSSL_LINUXKM) with defined(WOLFSSL_USE_SAVE_VECTOR_REGISTERS).

rename WC_WANT_FLAG_DONT_USE_AESNI to WC_WANT_FLAG_DONT_USE_VECTOR_OPS.

rename lkm_printf() to wc_km_printf().

replace WOLFSSL_LINUXKM gates on kernel-incompatible includes with header-specific gates NO_STRING_H, NO_STDINT_H, NO_LIMITS_H, NO_CTYPE_H, NO_STDLIB_H

remove low level threading setup section of wolfssl/internal.h, which duplicated existing logic in wc_port.h, except for off-topic WOLFSSL_APACHE_MYNEWT TLS-layer setup, which is preserved, and a defined(__NT__) clause, which is now merged into the existing section in wc_port.h.
@douzzer
Copy link
Contributor Author

douzzer commented Sep 29, 2025

pr-check all clean:

final tally for 7ea66aeffe with build env c9c2bc8e85: all 50 selected checks succeeded.

note this includes cppcheck-force-source.

also tested on '.*insmod.*':

final tally for 7ea66aeffe with build env c9c2bc8e85: all 73 selected checks succeeded.

@douzzer
Copy link
Contributor Author

douzzer commented Sep 30, 2025

retest this please
(see https://github.com/wolfSSL/testing/pull/882)

Copy link
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.

Thank you, looks good! This will make it cleaner to support multiple kernels going forward.

@dgarske dgarske merged commit 50f25c5 into wolfSSL:master Sep 30, 2025
398 of 403 checks passed
douzzer added a commit that referenced this pull request Dec 8, 2025
backport WC_FLAG_DONT_USE_AESNI fixes from 8705d28 (from #8614)

backport wc_DhGeneratePublic() from f6f3b0a (#8707)

backport WC_SHA3_NO_ASM implementation from 245042a (#8817)

backport linuxkm-focused tweaks to random.c & random.h in b25d484 and dc05c4c (from #8943)

backport macro renames (generic gates replacing WOLFSSL_LINUXKM etc) from 7ea66ae (#9254)

backport WolfEntropy migration from random.c in dc6fa0a (#9451)
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