Daniel Pouzzner
|
7bc33f4ec1
|
linuxkm: retain noinline from kernel headers, and use it directly in wolfssl/wolfcrypt/sp.h.
|
2020-09-23 18:32:16 -05:00 |
|
Daniel Pouzzner
|
9aa3a4c559
|
linuxkm/Kbuild: make dependency on get_thread_size order-only, to suppress frivolous rebuilds on kernel 4.x.
|
2020-09-23 18:32:16 -05:00 |
|
Daniel Pouzzner
|
f440089e92
|
dh_test(): fix typo (undersized dynamic buffers).
|
2020-09-23 18:32:16 -05:00 |
|
Daniel Pouzzner
|
8b19a9b58c
|
benchmark.c: fix always-true tests for DECLARE_VAR_IS_HEAP_ALLOC.
|
2020-09-23 18:32:16 -05:00 |
|
Daniel Pouzzner
|
f106fea0d8
|
rsa_no_pad_test(): fix uninited pointer.
|
2020-09-23 18:32:16 -05:00 |
|
Daniel Pouzzner
|
4ea8b46177
|
dh_test(): refactor remaining bare returns to ERROR_OUT().
|
2020-09-23 18:32:16 -05:00 |
|
Daniel Pouzzner
|
2ee218761e
|
dh_test(): missed a spot in last commit.
|
2020-09-23 18:32:16 -05:00 |
|
Daniel Pouzzner
|
ca1a991de5
|
wolfcrypt/test/test.c: fix an error-path leak in dh_test(), and deal with possible -Wdeclaration-after-statement for XFILE file.
|
2020-09-23 18:32:16 -05:00 |
|
Daniel Pouzzner
|
a7381f8a48
|
test.c:rsa_test(): fix uninited pointer
|
2020-09-23 18:32:16 -05:00 |
|
Daniel Pouzzner
|
6c32a730c2
|
more work on DECLARE_VAR -- fix allocation failure handling in bench_rsa_helper() to avoid uninitialized variables.
|
2020-09-23 18:32:16 -05:00 |
|
Daniel Pouzzner
|
426de2101a
|
more work on DECLARE_VAR -- proper handling of failed allocations. WIP.
|
2020-09-23 18:32:16 -05:00 |
|
Daniel Pouzzner
|
d8e71e8dd2
|
linuxkm/Kbuild: disable objtool on AESNI asm objects -- they work in the kernel as-is, despite "unannotated intra-function call" and "BP used as a scratch register" warnings.
|
2020-09-23 18:32:16 -05:00 |
|
Daniel Pouzzner
|
3c91ce9342
|
wolfcrypt/src/sp_int.c: undo 8efb1142f1f2744ff128033df8a3a2d43e42fd93 to take dgarske's better wc_bigint_init()-based take on it (aa870861921a317cca9a978a75a7de127809e100).
|
2020-09-23 18:32:15 -05:00 |
|
Daniel Pouzzner
|
d7450b85f7
|
linuxkm/Makefile: use -Wno-declaration-after-statement (needed for heapful DECLARE_VAR() et al).
|
2020-09-23 18:32:15 -05:00 |
|
Daniel Pouzzner
|
c5d28c16b5
|
wolfcrypt/src/sp_int.c: clear whole struct in sp_init() and sp_init_multi(), to fix uninited pointer free()s in sp_free() when --enable-sp-math -DHAVE_WOLF_BIGINT.
|
2020-09-23 18:32:15 -05:00 |
|
Daniel Pouzzner
|
9b7c753165
|
wolfssl/wolfcrypt/types.h: make DECLARE_VAR() et al use heap allocation not only when WOLFSSL_ASYNC_CRYPT but also when WOLFSSL_SMALL_STACK.
|
2020-09-23 18:32:15 -05:00 |
|
Daniel Pouzzner
|
ce8f2e65de
|
wolfcrypt/src/sha256.c: undo c801de9d23c2f3348b84fdb8d893f81e6c3c2849 (dgarske has better&correct fix in 76e1760f915934bdc4911f3ae41abe6803ae094a).
|
2020-09-23 18:32:15 -05:00 |
|
Daniel Pouzzner
|
571bf897c4
|
wolfcrypt/test/test.c: stack->heap refactor for dh_test().
|
2020-09-23 18:32:15 -05:00 |
|
David Garske
|
66b59bda9b
|
Fix for expected fail test in openssl_test for partial block. Fix for mp_test with ECC disabled, which uses mp_init_copy.
|
2020-09-23 18:32:15 -05:00 |
|
David Garske
|
0f8cf32122
|
Fix for possible leak in openssl_test because EVP free not called with WOLFSSL_SMALL_STACK_CACHE (SHA256/SHA512). Added return code checking to the openssl_test in wolfCrypt test.
|
2020-09-23 18:32:15 -05:00 |
|
Daniel Pouzzner
|
32e30d23c6
|
wolfcrypt/test/test.c: fix uninitialized values in aesofb_test().
|
2020-09-23 18:32:15 -05:00 |
|
Daniel Pouzzner
|
e09487de1f
|
sha256.c: add missing _SMALL_STACK_CACHE initialization in InitSha256().
|
2020-09-23 18:32:15 -05:00 |
|
Daniel Pouzzner
|
922b023aea
|
wolfcrypt/src/random.c: rename the DRBG internal type __DRBG, because some customer is compiling libwolfssl with a "g++" override, which precludes typedefs and structs with different types but equal labels.
|
2020-09-23 18:32:15 -05:00 |
|
Daniel Pouzzner
|
9611f7abfd
|
linuxkm/Makefile: add no-op distdir rule.
|
2020-09-23 18:32:15 -05:00 |
|
Daniel Pouzzner
|
03fe9c15c0
|
linuxkm/Makefile: add do-nothing dist rule, and refactor setness tests for libwolfssl.ko to be make-dist-compatible.
|
2020-09-23 18:32:15 -05:00 |
|
Daniel Pouzzner
|
f56c6d1d8f
|
wolfcrypt/test/test.c and wolfssl/test.h: implement DEBUG_STACK_SIZE_VERBOSE, measuring and reporting stack usage separately for each test. to use, ./configure --enable-stacksize && make CFLAGS+=-DDEBUG_STACK_SIZE_VERBOSE; also, remove a throwaway dev pragma that snuck into an earlier commit.
|
2020-09-23 18:32:15 -05:00 |
|
Daniel Pouzzner
|
925afe3b74
|
cast XMALLOC() return values assiduously, for Visual Studio compatibility.
|
2020-09-23 18:32:15 -05:00 |
|
Daniel Pouzzner
|
195b5d2d2c
|
lkm: add linuxkm/include.am, and include it in Makefile.am.
|
2020-09-23 18:32:15 -05:00 |
|
Daniel Pouzzner
|
d86b0601b9
|
lkm: tweak Kbuild to work on 4.x (hardcoded fallback stack size); add linuxkm/get_thread_size.c.
|
2020-09-23 18:32:15 -05:00 |
|
Daniel Pouzzner
|
c194fb3beb
|
lkm: add autodetection of kernel stack frame size; reactivate objtool scrutiny since _asm files are indeed not yet kernel-compatible; delete linuxkm/lkm_testcrypto.c and use wolfcrypt/test/test.c.
|
2020-09-23 18:32:15 -05:00 |
|
Daniel Pouzzner
|
535822f4df
|
wolfcrypt/test/test.c: refactor for stack size and namespace control, allowing embedding of wolfcrypt_test() in kernel module.
|
2020-09-23 18:32:15 -05:00 |
|
Daniel Pouzzner
|
f5975d95db
|
src/ssl.c: use heap for workspace in wolfSSL_X509_sign(), wolfSSL_d2i_RSAPrivateKey_bio(), and wolfSSL_CTX_use_RSAPrivateKey().
|
2020-09-23 18:32:15 -05:00 |
|
Daniel Pouzzner
|
9ca94d6ca7
|
wolfcrypt/src/ge_448.c: refactor ge448_double_scalarmult_vartime() to use heap for workspace unless WOLFSSL_NO_MALLOC.
|
2020-09-23 18:32:15 -05:00 |
|
Daniel Pouzzner
|
1735bd7430
|
lkm_testcrypto.c: refactor subtests at end of dh_test() to use ERROR_OUT() with proper codes.
|
2020-09-23 18:32:15 -05:00 |
|
Daniel Pouzzner
|
217ec4ebd3
|
lkm: tweaks to self-test dynamics/messages.
|
2020-09-23 18:32:15 -05:00 |
|
Daniel Pouzzner
|
554879da00
|
lkm: self-test working now (certain options, which ones TBD, crash kernel).
|
2020-09-23 18:32:15 -05:00 |
|
Daniel Pouzzner
|
34fd53b4fc
|
linuxkm: WIP support for wolfcrypt_test() at module load time.
|
2020-09-23 18:32:15 -05:00 |
|
Daniel Pouzzner
|
0c35998178
|
linuxkm/module_hooks.c: log "cleanup complete" at unload time.
|
2020-09-23 18:32:15 -05:00 |
|
Daniel Pouzzner
|
92df5692b1
|
wolfcrypt/src/ecc.c: revert to commit g0fa5af9, which has all the necessary fixes.
|
2020-09-23 18:32:15 -05:00 |
|
Daniel Pouzzner
|
0cfe9ca5d6
|
configure.ac: --enable-linuxkm: improved defaults and consistency checking.
|
2020-09-23 18:32:15 -05:00 |
|
Daniel Pouzzner
|
92406e17ca
|
wolfssl/wolfcrypt/settings.h: for _LINUXKM, set WOLFSSL_SP_DIV_64 to help avoid gcc xdivti3() references.
|
2020-09-23 18:32:15 -05:00 |
|
Daniel Pouzzner
|
5efdee4277
|
wolfssl/wolfcrypt/types.h: tweak _LINUXKM macros XMALLOC(), XFREE(), and XREALLOC() to dummy-use "heap" and "dynamic type" arguments.
|
2020-09-23 18:32:15 -05:00 |
|
Daniel Pouzzner
|
add78dfba9
|
wolfcrypt/src/sp_int.c: add _LINUXKM do_div codepaths for a couple more 64 bit divisions, in sp_div_word() and sp_mod_d().
|
2020-09-23 18:32:15 -05:00 |
|
Daniel Pouzzner
|
9ab1df690a
|
wolfcrypt/src/ecc.c: fix uncompilable !WOLFSSL_SP_MATH && WOLFSSL_SMALL_STACK_CACHE implementations of ecc_key_tmp_init() and ecc_key_tmp_free() (the latter misnamed ecc_key_tmp_final()).
|
2020-09-23 18:32:15 -05:00 |
|
Daniel Pouzzner
|
836915d05f
|
linuxkm: configure.ac more incompatible options: --enable-fastmath, --enable-iopool, and --enable-fips; linuxkm/Makefile: reduce -Wframe-larger-than from 65536 to kernel-compatible 5000; wolfssl/wolfcrypt/settings.h: unset HAVE_THREAD_LS when WOLFSSL_LINUXKM; wolfssl/wolfcrypt/types.h: when NO_INLINE and __GNUC__, #define WC_INLINE __attribute__((unused)) rather than to nothing to avoid -Wunused-function warnings; wolfssl/wolfcrypt/wc_port.h: #undef noinline after Linux kernel header includes (another macro conflict).
|
2020-09-23 18:32:15 -05:00 |
|
Daniel Pouzzner
|
03d5a4eadd
|
wolfcrypt/src/integer.c: mp_div_d(): refactor another 64 bit division to use do_div() when WOLFSSL_LINUXKM.
|
2020-09-23 18:32:15 -05:00 |
|
Daniel Pouzzner
|
2a3fd57b36
|
linuxkm/Kbuild, linuxkm/module_hooks.c: tweaks for buildability on kernel 4.9 (may also fix build on 3.x).
|
2020-09-23 18:32:15 -05:00 |
|
Daniel Pouzzner
|
2591479866
|
linuxkm: add macros mapping malloc(), free(), and realloc() to the kernel equivalents, don't set WOLFSSL_NO_MALLOC, and reduce -Wframe-larger-than= from 256k to 64k; tweak fix for HAVE_INTEL_RDSEED conflict with WOLFSSL_LINUXKM; add clean rule to linuxkm/Makefile.
|
2020-09-23 18:32:15 -05:00 |
|
Daniel Pouzzner
|
911b23d2b4
|
configure.ac: check for incompatible combinations, and restore check for non-empty $KROOT when --enable-linuxkm.
|
2020-09-23 18:32:15 -05:00 |
|
Daniel Pouzzner
|
2bcdfce6df
|
wolfcrypt/src/evp.c: tweak to silence gcc -Wmaybe-uninitialized.
|
2020-09-23 18:32:15 -05:00 |
|