|
@@ -105,6 +105,13 @@
|
|
|
*/
|
|
|
#undef USE_SPLIT_PMD_PTLOCKS
|
|
|
#define USE_SPLIT_PMD_PTLOCKS 0
|
|
|
+
|
|
|
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)
|
|
|
+ /* without this, static show_free_areas() mm.h brings in direct
|
|
|
+ * reference to unexported __show_free_areas().
|
|
|
+ */
|
|
|
+ #define __show_free_areas my__show_free_areas
|
|
|
+ #endif
|
|
|
#endif
|
|
|
#include <linux/mm.h>
|
|
|
#ifndef SINGLE_THREADED
|
|
@@ -267,8 +274,13 @@
|
|
|
typeof(kvfree) *kvfree;
|
|
|
#endif
|
|
|
typeof(is_vmalloc_addr) *is_vmalloc_addr;
|
|
|
- typeof(kmem_cache_alloc_trace) *kmem_cache_alloc_trace;
|
|
|
- typeof(kmalloc_order_trace) *kmalloc_order_trace;
|
|
|
+
|
|
|
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)
|
|
|
+ typeof(kmalloc_trace) *kmalloc_trace;
|
|
|
+ #else
|
|
|
+ typeof(kmem_cache_alloc_trace) *kmem_cache_alloc_trace;
|
|
|
+ typeof(kmalloc_order_trace) *kmalloc_order_trace;
|
|
|
+ #endif
|
|
|
|
|
|
typeof(get_random_bytes) *get_random_bytes;
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)
|
|
@@ -402,8 +414,12 @@
|
|
|
#define kvfree (wolfssl_linuxkm_get_pie_redirect_table()->kvfree)
|
|
|
#endif
|
|
|
#define is_vmalloc_addr (wolfssl_linuxkm_get_pie_redirect_table()->is_vmalloc_addr)
|
|
|
- #define kmem_cache_alloc_trace (wolfssl_linuxkm_get_pie_redirect_table()->kmem_cache_alloc_trace)
|
|
|
- #define kmalloc_order_trace (wolfssl_linuxkm_get_pie_redirect_table()->kmalloc_order_trace)
|
|
|
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)
|
|
|
+ #define kmalloc_trace (wolfssl_linuxkm_get_pie_redirect_table()->kmalloc_trace)
|
|
|
+ #else
|
|
|
+ #define kmem_cache_alloc_trace (wolfssl_linuxkm_get_pie_redirect_table()->kmem_cache_alloc_trace)
|
|
|
+ #define kmalloc_order_trace (wolfssl_linuxkm_get_pie_redirect_table()->kmalloc_order_trace)
|
|
|
+ #endif
|
|
|
|
|
|
#define get_random_bytes (wolfssl_linuxkm_get_pie_redirect_table()->get_random_bytes)
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)
|