mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-03 12:44:45 +02:00
linuxkm/Kbuild: add KERNEL_EXTRA_CFLAGS_REMOVE;
linuxkm/linuxkm_wc_port.h: fix version threshold for HAVE_KVREALLOC (6.12.0, not 6.11.0), and add manual overrides.
This commit is contained in:
@@ -193,6 +193,10 @@ DILITHIUM_MUL_QINV_SLOW
|
|||||||
DILITHIUM_MUL_Q_SLOW
|
DILITHIUM_MUL_Q_SLOW
|
||||||
DILITHIUM_MUL_SLOW
|
DILITHIUM_MUL_SLOW
|
||||||
DILITHIUM_USE_HINT_CT
|
DILITHIUM_USE_HINT_CT
|
||||||
|
DONT_HAVE_KVMALLOC
|
||||||
|
DONT_HAVE_KVREALLOC
|
||||||
|
DONT_USE_KVMALLOC
|
||||||
|
DONT_USE_KVREALLOC
|
||||||
DTLS_RECEIVEFROM_NO_TIMEOUT_ON_INVALID_PEER
|
DTLS_RECEIVEFROM_NO_TIMEOUT_ON_INVALID_PEER
|
||||||
ECCSI_ORDER_MORE_BITS_THAN_PRIME
|
ECCSI_ORDER_MORE_BITS_THAN_PRIME
|
||||||
ECC_DUMP_OID
|
ECC_DUMP_OID
|
||||||
|
@@ -129,6 +129,10 @@ ifeq "$(ENABLED_LINUXKM_PIE)" "yes"
|
|||||||
$(obj)/linuxkm/module_hooks.o: ccflags-y += $(PIE_SUPPORT_FLAGS)
|
$(obj)/linuxkm/module_hooks.o: ccflags-y += $(PIE_SUPPORT_FLAGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifdef KERNEL_EXTRA_CFLAGS_REMOVE
|
||||||
|
ccflags-remove-y += KERNEL_EXTRA_CFLAGS_REMOVE
|
||||||
|
endif
|
||||||
|
|
||||||
$(obj)/wolfcrypt/benchmark/benchmark.o: ccflags-y = $(WOLFSSL_CFLAGS) $(CFLAGS_FPU_ENABLE) $(CFLAGS_SIMD_ENABLE) $(PIE_SUPPORT_FLAGS) -DNO_MAIN_FUNCTION -DWOLFSSL_NO_OPTIONS_H
|
$(obj)/wolfcrypt/benchmark/benchmark.o: ccflags-y = $(WOLFSSL_CFLAGS) $(CFLAGS_FPU_ENABLE) $(CFLAGS_SIMD_ENABLE) $(PIE_SUPPORT_FLAGS) -DNO_MAIN_FUNCTION -DWOLFSSL_NO_OPTIONS_H
|
||||||
$(obj)/wolfcrypt/benchmark/benchmark.o: asflags-y = $(WOLFSSL_ASFLAGS) $(ASFLAGS_FPU_ENABLE_SIMD_DISABLE)
|
$(obj)/wolfcrypt/benchmark/benchmark.o: asflags-y = $(WOLFSSL_ASFLAGS) $(ASFLAGS_FPU_ENABLE_SIMD_DISABLE)
|
||||||
|
|
||||||
|
@@ -81,30 +81,40 @@
|
|||||||
* kvrealloc() added in de2860f463, merged for 5.15, backported to 5.10.137.
|
* kvrealloc() added in de2860f463, merged for 5.15, backported to 5.10.137.
|
||||||
* moved to ultimate home (slab.h) in 8587ca6f34, merged for 5.16.
|
* moved to ultimate home (slab.h) in 8587ca6f34, merged for 5.16.
|
||||||
*
|
*
|
||||||
* however, until 6.11, it took an extra argument, oldsize, that makes it
|
* however, until 6.12 (commit 590b9d576c), it took an extra argument,
|
||||||
* incompatible with traditional libc usage patterns, so we don't try to use it.
|
* oldsize, that makes it incompatible with traditional libc usage patterns,
|
||||||
|
* so we don't try to use it.
|
||||||
*/
|
*/
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) && \
|
||||||
|
!defined(DONT_HAVE_KVMALLOC) && !defined(HAVE_KVMALLOC)
|
||||||
#define HAVE_KVMALLOC
|
#define HAVE_KVMALLOC
|
||||||
#endif
|
#endif
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0)
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 0) && \
|
||||||
|
!defined(DONT_HAVE_KVREALLOC) && !defined(HAVE_KVREALLOC)
|
||||||
#define HAVE_KVREALLOC
|
#define HAVE_KVREALLOC
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WOLFCRYPT_ONLY
|
#ifdef WOLFCRYPT_ONLY
|
||||||
#ifdef HAVE_KVMALLOC
|
#if defined(HAVE_KVMALLOC) && \
|
||||||
|
!defined(DONT_USE_KVMALLOC) && !defined(USE_KVMALLOC)
|
||||||
#define USE_KVMALLOC
|
#define USE_KVMALLOC
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_KVREALLOC
|
#ifdef HAVE_KVREALLOC && \
|
||||||
|
!defined(DONT_USE_KVREALLOC) && !defined(USE_KVREALLOC)
|
||||||
#define USE_KVREALLOC
|
#define USE_KVREALLOC
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
/* functioning realloc() is needed for the TLS stack. */
|
/* functioning realloc() is needed for the TLS stack. */
|
||||||
#if defined(HAVE_KVMALLOC) && defined(HAVE_KVREALLOC)
|
#if defined(HAVE_KVMALLOC) && defined(HAVE_KVREALLOC) && \
|
||||||
|
!defined(DONT_USE_KVMALLOC) && !defined(DONT_USE_KVREALLOC)
|
||||||
|
#ifndef USE_KVMALLOC
|
||||||
#define USE_KVMALLOC
|
#define USE_KVMALLOC
|
||||||
|
#endif
|
||||||
|
#ifndef USE_KVREALLOC
|
||||||
#define USE_KVREALLOC
|
#define USE_KVREALLOC
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* kernel printf doesn't implement fp. */
|
/* kernel printf doesn't implement fp. */
|
||||||
#ifndef WOLFSSL_NO_FLOAT_FMT
|
#ifndef WOLFSSL_NO_FLOAT_FMT
|
||||||
@@ -680,7 +690,7 @@
|
|||||||
|
|
||||||
const unsigned char *_ctype;
|
const unsigned char *_ctype;
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0)
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 0)
|
||||||
typeof(kmalloc_noprof) *kmalloc_noprof;
|
typeof(kmalloc_noprof) *kmalloc_noprof;
|
||||||
typeof(krealloc_noprof) *krealloc_noprof;
|
typeof(krealloc_noprof) *krealloc_noprof;
|
||||||
typeof(kzalloc_noprof) *kzalloc_noprof;
|
typeof(kzalloc_noprof) *kzalloc_noprof;
|
||||||
@@ -953,7 +963,7 @@
|
|||||||
|
|
||||||
#define _ctype WC_LKM_INDIRECT_SYM(_ctype)
|
#define _ctype WC_LKM_INDIRECT_SYM(_ctype)
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0)
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 0)
|
||||||
/* see include/linux/alloc_tag.h and include/linux/slab.h */
|
/* see include/linux/alloc_tag.h and include/linux/slab.h */
|
||||||
#define kmalloc_noprof WC_LKM_INDIRECT_SYM(kmalloc_noprof)
|
#define kmalloc_noprof WC_LKM_INDIRECT_SYM(kmalloc_noprof)
|
||||||
#define krealloc_noprof WC_LKM_INDIRECT_SYM(krealloc_noprof)
|
#define krealloc_noprof WC_LKM_INDIRECT_SYM(krealloc_noprof)
|
||||||
|
Reference in New Issue
Block a user