mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-08 12:20:51 +02:00
wolfssl/wolfcrypt/types.h: in fallback definition of DISABLE_VECTOR_REGISTERS(), return NOT_COMPILED_IN rather than (-1), for clarity and traceability.
linuxkm/lkcapi_sha_glue.c: require defined(WOLFSSL_EXPERIMENTAL_SETTINGS) when defined(WOLFSSL_LINUXKM_USE_GET_RANDOM_KPROBES).
This commit is contained in:
@@ -137,6 +137,7 @@ CONFIG_MBEDTLS_CERTIFICATE_BUNDLE
|
||||
CONFIG_MBEDTLS_PSA_CRYPTO_C
|
||||
CONFIG_MIPS
|
||||
CONFIG_MODULE_SIG
|
||||
CONFIG_MODULE_SIG_SHA1
|
||||
CONFIG_NET_SOCKETS_SOCKOPT_TLS
|
||||
CONFIG_NEWLIB_LIBC
|
||||
CONFIG_NEWLIB_NANO_FORMAT
|
||||
|
||||
@@ -1608,6 +1608,10 @@ static int wc_get_random_bytes_callbacks_installed = 0;
|
||||
|
||||
#elif defined(WOLFSSL_LINUXKM_USE_GET_RANDOM_KPROBES)
|
||||
|
||||
#ifndef WOLFSSL_EXPERIMENTAL_SETTINGS
|
||||
#error WOLFSSL_LINUXKM_USE_GET_RANDOM_KPROBES requires WOLFSSL_EXPERIMENTAL_SETTINGS.
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_KPROBES
|
||||
#error WOLFSSL_LINUXKM_USE_GET_RANDOM_KPROBES without CONFIG_KPROBES.
|
||||
#endif
|
||||
|
||||
@@ -2332,14 +2332,14 @@ WOLFSSL_API word32 CheckRunTimeSettings(void);
|
||||
|
||||
/* DISABLE_VECTOR_REGISTERS() and REENABLE_VECTOR_REGISTERS() are currently only
|
||||
* used by Linux kernel code. If WC_HAVE_VECTOR_SPEEDUPS, we default
|
||||
* DISABLE_VECTOR_REGISTERS() to -1, to assure calling code is forced to handle
|
||||
* the failure. But if the build disables vec regs globally, we can return 0
|
||||
* harmlessly. The kernel build defines real calls for these in vectorized
|
||||
* builds, otherwise it uses these fallbacks.
|
||||
* DISABLE_VECTOR_REGISTERS() to NOT_COMPILED_IN, to assure calling code is
|
||||
* forced to handle the failure. But if the build disables vec regs globally,
|
||||
* we can return 0 harmlessly. The kernel build defines real calls for these in
|
||||
* vectorized builds, otherwise it uses these fallbacks.
|
||||
*/
|
||||
#ifndef DISABLE_VECTOR_REGISTERS
|
||||
#ifdef WC_HAVE_VECTOR_SPEEDUPS
|
||||
#define DISABLE_VECTOR_REGISTERS() (-1)
|
||||
#define DISABLE_VECTOR_REGISTERS() NOT_COMPILED_IN
|
||||
#else
|
||||
#define DISABLE_VECTOR_REGISTERS() 0
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user