|
867 | 867 | }; |
868 | 868 |
|
869 | 869 | extern const struct wolfssl_linuxkm_pie_redirect_table *wolfssl_linuxkm_get_pie_redirect_table(void); |
| 870 | + extern struct wolfssl_linuxkm_pie_redirect_table wolfssl_linuxkm_pie_redirect_table; |
| 871 | + |
| 872 | + |
| 873 | + #if defined(WC_LKM_INDIRECT_SYM) |
| 874 | + /* keep user-supplied override definition. */ |
| 875 | + #elif defined(WC_LKM_INDIRECT_SYM_BY_FUNC_ONLY) || \ |
| 876 | + defined(WC_LKM_INDIRECT_SYM_BY_DIRECT_TABLE_READ) |
| 877 | + /* keep user-supplied override method. */ |
| 878 | + #elif defined(CONFIG_X86) |
| 879 | + #define WC_LKM_INDIRECT_SYM_BY_DIRECT_TABLE_READ |
| 880 | + #elif defined(CONFIG_ARM64) |
| 881 | + /* direct access to wolfssl_linuxkm_pie_redirect_table.x on aarch64 |
| 882 | + * produces GOT relocations, e.g. R_AARCH64_LD64_GOT_LO12_NC. |
| 883 | + */ |
| 884 | + #define WC_LKM_INDIRECT_SYM_BY_FUNC_ONLY |
| 885 | + #else |
| 886 | + /* for other archs, by default use the safe way. */ |
| 887 | + #define WC_LKM_INDIRECT_SYM_BY_FUNC_ONLY |
| 888 | + #endif |
| 889 | + |
| 890 | + #if defined(WC_LKM_INDIRECT_SYM) |
| 891 | + /* keep user-supplied override definition. */ |
| 892 | + #elif defined(WC_LKM_INDIRECT_SYM_BY_FUNC_ONLY) |
| 893 | + #define WC_LKM_INDIRECT_SYM(x) (wolfssl_linuxkm_get_pie_redirect_table()->x) |
| 894 | + #elif defined(WC_LKM_INDIRECT_SYM_BY_DIRECT_TABLE_READ) |
| 895 | + #define WC_LKM_INDIRECT_SYM(x) (wolfssl_linuxkm_pie_redirect_table.x) |
| 896 | + #else |
| 897 | + #error no WC_LKM_INDIRECT_SYM method defined. |
| 898 | + #endif |
870 | 899 |
|
871 | 900 | #ifdef __PIE__ |
872 | 901 |
|
873 | 902 | #ifndef __ARCH_MEMCMP_NO_REDIRECT |
874 | | - #define memcmp (wolfssl_linuxkm_get_pie_redirect_table()->memcmp) |
| 903 | + #define memcmp WC_LKM_INDIRECT_SYM(memcmp) |
875 | 904 | #endif |
876 | 905 | #ifndef __ARCH_MEMCPY_NO_REDIRECT |
877 | | - #define memcpy (wolfssl_linuxkm_get_pie_redirect_table()->memcpy) |
| 906 | + #define memcpy WC_LKM_INDIRECT_SYM(memcpy) |
878 | 907 | #endif |
879 | 908 | #ifndef __ARCH_MEMSET_NO_REDIRECT |
880 | | - #define memset (wolfssl_linuxkm_get_pie_redirect_table()->memset) |
| 909 | + #define memset WC_LKM_INDIRECT_SYM(memset) |
881 | 910 | #endif |
882 | 911 | #ifndef __ARCH_MEMMOVE_NO_REDIRECT |
883 | | - #define memmove (wolfssl_linuxkm_get_pie_redirect_table()->memmove) |
| 912 | + #define memmove WC_LKM_INDIRECT_SYM(memmove) |
884 | 913 | #endif |
885 | 914 | #ifndef __ARCH_STRCMP_NO_REDIRECT |
886 | | - #define strcmp (wolfssl_linuxkm_get_pie_redirect_table()->strcmp) |
| 915 | + #define strcmp WC_LKM_INDIRECT_SYM(strcmp) |
887 | 916 | #endif |
888 | 917 | #ifndef __ARCH_STRNCMP_NO_REDIRECT |
889 | | - #define strncmp (wolfssl_linuxkm_get_pie_redirect_table()->strncmp) |
| 918 | + #define strncmp WC_LKM_INDIRECT_SYM(strncmp) |
890 | 919 | #endif |
891 | 920 | #ifndef __ARCH_STRCASECMP_NO_REDIRECT |
892 | | - #define strcasecmp (wolfssl_linuxkm_get_pie_redirect_table()->strcasecmp) |
| 921 | + #define strcasecmp WC_LKM_INDIRECT_SYM(strcasecmp) |
893 | 922 | #endif |
894 | 923 | #ifndef __ARCH_STRNCASECMP_NO_REDIRECT |
895 | | - #define strncasecmp (wolfssl_linuxkm_get_pie_redirect_table()->strncasecmp) |
| 924 | + #define strncasecmp WC_LKM_INDIRECT_SYM(strncasecmp) |
896 | 925 | #endif |
897 | 926 | #ifndef __ARCH_STRLEN_NO_REDIRECT |
898 | | - #define strlen (wolfssl_linuxkm_get_pie_redirect_table()->strlen) |
| 927 | + #define strlen WC_LKM_INDIRECT_SYM(strlen) |
899 | 928 | #endif |
900 | 929 | #ifndef __ARCH_STRSTR_NO_REDIRECT |
901 | | - #define strstr (wolfssl_linuxkm_get_pie_redirect_table()->strstr) |
| 930 | + #define strstr WC_LKM_INDIRECT_SYM(strstr) |
902 | 931 | #endif |
903 | 932 | #ifndef __ARCH_STRNCPY_NO_REDIRECT |
904 | | - #define strncpy (wolfssl_linuxkm_get_pie_redirect_table()->strncpy) |
| 933 | + #define strncpy WC_LKM_INDIRECT_SYM(strncpy) |
905 | 934 | #endif |
906 | 935 | #ifndef __ARCH_STRNCAT_NO_REDIRECT |
907 | | - #define strncat (wolfssl_linuxkm_get_pie_redirect_table()->strncat) |
| 936 | + #define strncat WC_LKM_INDIRECT_SYM(strncat) |
908 | 937 | #endif |
909 | | - #define kstrtoll (wolfssl_linuxkm_get_pie_redirect_table()->kstrtoll) |
| 938 | + #define kstrtoll WC_LKM_INDIRECT_SYM(kstrtoll) |
910 | 939 |
|
911 | 940 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)) || \ |
912 | 941 | (defined(RHEL_MAJOR) && \ |
913 | 942 | ((RHEL_MAJOR > 9) || ((RHEL_MAJOR == 9) && (RHEL_MINOR >= 5)))) |
914 | | - #define _printk (wolfssl_linuxkm_get_pie_redirect_table()->_printk) |
| 943 | + #define _printk WC_LKM_INDIRECT_SYM(_printk) |
915 | 944 | #else |
916 | | - #define printk (wolfssl_linuxkm_get_pie_redirect_table()->printk) |
| 945 | + #define printk WC_LKM_INDIRECT_SYM(printk) |
917 | 946 | #endif |
918 | 947 |
|
919 | 948 | #ifdef CONFIG_FORTIFY_SOURCE |
920 | | - #define __warn_printk (wolfssl_linuxkm_get_pie_redirect_table()->__warn_printk) |
| 949 | + #define __warn_printk WC_LKM_INDIRECT_SYM(__warn_printk) |
921 | 950 | #endif |
922 | 951 |
|
923 | | - #define snprintf (wolfssl_linuxkm_get_pie_redirect_table()->snprintf) |
| 952 | + #define snprintf WC_LKM_INDIRECT_SYM(snprintf) |
924 | 953 |
|
925 | | - #define _ctype (wolfssl_linuxkm_get_pie_redirect_table()->_ctype) |
| 954 | + #define _ctype WC_LKM_INDIRECT_SYM(_ctype) |
926 | 955 |
|
927 | 956 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0) |
928 | 957 | /* see include/linux/alloc_tag.h and include/linux/slab.h */ |
929 | | - #define kmalloc_noprof (wolfssl_linuxkm_get_pie_redirect_table()->kmalloc_noprof) |
930 | | - #define krealloc_noprof (wolfssl_linuxkm_get_pie_redirect_table()->krealloc_noprof) |
931 | | - #define kzalloc_noprof (wolfssl_linuxkm_get_pie_redirect_table()->kzalloc_noprof) |
932 | | - #define __kvmalloc_node_noprof (wolfssl_linuxkm_get_pie_redirect_table()->__kvmalloc_node_noprof) |
933 | | - #define __kmalloc_cache_noprof (wolfssl_linuxkm_get_pie_redirect_table()->__kmalloc_cache_noprof) |
934 | | - #define kvrealloc_noprof (wolfssl_linuxkm_get_pie_redirect_table()->kvrealloc_noprof) |
| 958 | + #define kmalloc_noprof WC_LKM_INDIRECT_SYM(kmalloc_noprof) |
| 959 | + #define krealloc_noprof WC_LKM_INDIRECT_SYM(krealloc_noprof) |
| 960 | + #define kzalloc_noprof WC_LKM_INDIRECT_SYM(kzalloc_noprof) |
| 961 | + #define __kvmalloc_node_noprof WC_LKM_INDIRECT_SYM(__kvmalloc_node_noprof) |
| 962 | + #define __kmalloc_cache_noprof WC_LKM_INDIRECT_SYM(__kmalloc_cache_noprof) |
| 963 | + #define kvrealloc_noprof WC_LKM_INDIRECT_SYM(kvrealloc_noprof) |
935 | 964 | #elif LINUX_VERSION_CODE >= KERNEL_VERSION(6, 10, 0) |
936 | 965 | /* see include/linux/alloc_tag.h and include/linux/slab.h */ |
937 | | - #define kmalloc_noprof (wolfssl_linuxkm_get_pie_redirect_table()->kmalloc_noprof) |
938 | | - #define krealloc_noprof (wolfssl_linuxkm_get_pie_redirect_table()->krealloc_noprof) |
939 | | - #define kzalloc_noprof (wolfssl_linuxkm_get_pie_redirect_table()->kzalloc_noprof) |
940 | | - #define kvmalloc_node_noprof (wolfssl_linuxkm_get_pie_redirect_table()->kvmalloc_node_noprof) |
941 | | - #define kmalloc_trace_noprof (wolfssl_linuxkm_get_pie_redirect_table()->kmalloc_trace_noprof) |
942 | | - #define kvrealloc_noprof (wolfssl_linuxkm_get_pie_redirect_table()->kvrealloc_noprof) |
| 966 | + #define kmalloc_noprof WC_LKM_INDIRECT_SYM(kmalloc_noprof) |
| 967 | + #define krealloc_noprof WC_LKM_INDIRECT_SYM(krealloc_noprof) |
| 968 | + #define kzalloc_noprof WC_LKM_INDIRECT_SYM(kzalloc_noprof) |
| 969 | + #define kvmalloc_node_noprof WC_LKM_INDIRECT_SYM(kvmalloc_node_noprof) |
| 970 | + #define kmalloc_trace_noprof WC_LKM_INDIRECT_SYM(kmalloc_trace_noprof) |
| 971 | + #define kvrealloc_noprof WC_LKM_INDIRECT_SYM(kvrealloc_noprof) |
943 | 972 | #else /* <6.10.0 */ |
944 | | - #define kmalloc (wolfssl_linuxkm_get_pie_redirect_table()->kmalloc) |
945 | | - #define krealloc (wolfssl_linuxkm_get_pie_redirect_table()->krealloc) |
| 973 | + #define kmalloc WC_LKM_INDIRECT_SYM(kmalloc) |
| 974 | + #define krealloc WC_LKM_INDIRECT_SYM(krealloc) |
946 | 975 | #define kzalloc(size, flags) kmalloc(size, (flags) | __GFP_ZERO) |
947 | 976 | #ifdef HAVE_KVMALLOC |
948 | | - #define kvmalloc_node (wolfssl_linuxkm_get_pie_redirect_table()->kvmalloc_node) |
| 977 | + #define kvmalloc_node WC_LKM_INDIRECT_SYM(kvmalloc_node) |
949 | 978 | #endif |
950 | 979 | #ifdef HAVE_KVREALLOC |
951 | | - #define kvrealloc (wolfssl_linuxkm_get_pie_redirect_table()->kvrealloc) |
| 980 | + #define kvrealloc WC_LKM_INDIRECT_SYM(kvrealloc) |
952 | 981 | #endif |
953 | 982 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || \ |
954 | 983 | (defined(RHEL_MAJOR) && \ |
955 | 984 | ((RHEL_MAJOR > 9) || ((RHEL_MAJOR == 9) && (RHEL_MINOR >= 5)))) |
956 | | - #define kmalloc_trace (wolfssl_linuxkm_get_pie_redirect_table()->kmalloc_trace) |
| 985 | + #define kmalloc_trace WC_LKM_INDIRECT_SYM(kmalloc_trace) |
957 | 986 | #else |
958 | | - #define kmem_cache_alloc_trace (wolfssl_linuxkm_get_pie_redirect_table()->kmem_cache_alloc_trace) |
959 | | - #define kmalloc_order_trace (wolfssl_linuxkm_get_pie_redirect_table()->kmalloc_order_trace) |
| 987 | + #define kmem_cache_alloc_trace WC_LKM_INDIRECT_SYM(kmem_cache_alloc_trace) |
| 988 | + #define kmalloc_order_trace WC_LKM_INDIRECT_SYM(kmalloc_order_trace) |
960 | 989 | #endif |
961 | 990 | #endif /* <6.10.0 */ |
962 | 991 |
|
963 | | - #define kfree (wolfssl_linuxkm_get_pie_redirect_table()->kfree) |
| 992 | + #define kfree WC_LKM_INDIRECT_SYM(kfree) |
964 | 993 | #ifdef HAVE_KVMALLOC |
965 | | - #define kvfree (wolfssl_linuxkm_get_pie_redirect_table()->kvfree) |
| 994 | + #define kvfree WC_LKM_INDIRECT_SYM(kvfree) |
966 | 995 | #endif |
967 | | - #define ksize (wolfssl_linuxkm_get_pie_redirect_table()->ksize) |
| 996 | + #define ksize WC_LKM_INDIRECT_SYM(ksize) |
968 | 997 |
|
969 | | - #define get_random_bytes (wolfssl_linuxkm_get_pie_redirect_table()->get_random_bytes) |
| 998 | + #define get_random_bytes WC_LKM_INDIRECT_SYM(get_random_bytes) |
970 | 999 | #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0) |
971 | | - #define getnstimeofday (wolfssl_linuxkm_get_pie_redirect_table()->getnstimeofday) |
| 1000 | + #define getnstimeofday WC_LKM_INDIRECT_SYM(getnstimeofday) |
972 | 1001 | #elif LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0) |
973 | | - #define current_kernel_time64 (wolfssl_linuxkm_get_pie_redirect_table()->current_kernel_time64) |
| 1002 | + #define current_kernel_time64 WC_LKM_INDIRECT_SYM(current_kernel_time64) |
974 | 1003 | #else |
975 | | - #define ktime_get_coarse_real_ts64 (wolfssl_linuxkm_get_pie_redirect_table()->ktime_get_coarse_real_ts64) |
| 1004 | + #define ktime_get_coarse_real_ts64 WC_LKM_INDIRECT_SYM(ktime_get_coarse_real_ts64) |
976 | 1005 | #endif |
977 | 1006 |
|
978 | 1007 | #undef get_current |
979 | | - #define get_current (wolfssl_linuxkm_get_pie_redirect_table()->get_current) |
| 1008 | + #define get_current WC_LKM_INDIRECT_SYM(get_current) |
980 | 1009 |
|
981 | 1010 | #if defined(WOLFSSL_LINUXKM_USE_SAVE_VECTOR_REGISTERS) && defined(CONFIG_X86) |
982 | | - #define allocate_wolfcrypt_linuxkm_fpu_states (wolfssl_linuxkm_get_pie_redirect_table()->allocate_wolfcrypt_linuxkm_fpu_states) |
983 | | - #define can_save_vector_registers_x86 (wolfssl_linuxkm_get_pie_redirect_table()->can_save_vector_registers_x86) |
984 | | - #define free_wolfcrypt_linuxkm_fpu_states (wolfssl_linuxkm_get_pie_redirect_table()->free_wolfcrypt_linuxkm_fpu_states) |
985 | | - #define restore_vector_registers_x86 (wolfssl_linuxkm_get_pie_redirect_table()->restore_vector_registers_x86) |
986 | | - #define save_vector_registers_x86 (wolfssl_linuxkm_get_pie_redirect_table()->save_vector_registers_x86) |
| 1011 | + #define allocate_wolfcrypt_linuxkm_fpu_states WC_LKM_INDIRECT_SYM(allocate_wolfcrypt_linuxkm_fpu_states) |
| 1012 | + #define can_save_vector_registers_x86 WC_LKM_INDIRECT_SYM(can_save_vector_registers_x86) |
| 1013 | + #define free_wolfcrypt_linuxkm_fpu_states WC_LKM_INDIRECT_SYM(free_wolfcrypt_linuxkm_fpu_states) |
| 1014 | + #define restore_vector_registers_x86 WC_LKM_INDIRECT_SYM(restore_vector_registers_x86) |
| 1015 | + #define save_vector_registers_x86 WC_LKM_INDIRECT_SYM(save_vector_registers_x86) |
987 | 1016 | #elif defined(WOLFSSL_LINUXKM_USE_SAVE_VECTOR_REGISTERS) |
988 | 1017 | #error WOLFSSL_LINUXKM_USE_SAVE_VECTOR_REGISTERS is set for an unsupported architecture. |
989 | 1018 | #endif /* WOLFSSL_LINUXKM_USE_SAVE_VECTOR_REGISTERS */ |
990 | 1019 |
|
991 | | - #define __mutex_init (wolfssl_linuxkm_get_pie_redirect_table()->__mutex_init) |
| 1020 | + #define __mutex_init WC_LKM_INDIRECT_SYM(__mutex_init) |
992 | 1021 | #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0) |
993 | | - #define mutex_lock_nested (wolfssl_linuxkm_get_pie_redirect_table()->mutex_lock_nested) |
| 1022 | + #define mutex_lock_nested WC_LKM_INDIRECT_SYM(mutex_lock_nested) |
994 | 1023 | #else |
995 | | - #define mutex_lock (wolfssl_linuxkm_get_pie_redirect_table()->mutex_lock) |
| 1024 | + #define mutex_lock WC_LKM_INDIRECT_SYM(mutex_lock) |
996 | 1025 | #endif |
997 | | - #define mutex_unlock (wolfssl_linuxkm_get_pie_redirect_table()->mutex_unlock) |
| 1026 | + #define mutex_unlock WC_LKM_INDIRECT_SYM(mutex_unlock) |
998 | 1027 | #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0) |
999 | | - #define mutex_destroy (wolfssl_linuxkm_get_pie_redirect_table()->mutex_destroy) |
| 1028 | + #define mutex_destroy WC_LKM_INDIRECT_SYM(mutex_destroy) |
1000 | 1029 | #endif |
1001 | 1030 |
|
1002 | 1031 | /* per linux/ctype.h, tolower() and toupper() are macros bound to static inlines |
|
1009 | 1038 | #define toupper(c) (isupper(c) ? (c) : ((c) - ('a'-'A'))) |
1010 | 1039 |
|
1011 | 1040 | #if !defined(WOLFCRYPT_ONLY) && !defined(NO_CERTS) |
1012 | | - #define GetCA (wolfssl_linuxkm_get_pie_redirect_table()->GetCA) |
| 1041 | + #define GetCA WC_LKM_INDIRECT_SYM(GetCA) |
1013 | 1042 | #ifndef NO_SKID |
1014 | | - #define GetCAByName (wolfssl_linuxkm_get_pie_redirect_table()->GetCAByName) |
| 1043 | + #define GetCAByName WC_LKM_INDIRECT_SYM(GetCAByName) |
1015 | 1044 | #ifdef HAVE_OCSP |
1016 | | - #define GetCAByKeyHash (wolfssl_linuxkm_get_pie_redirect_table()->GetCAByKeyHash) |
| 1045 | + #define GetCAByKeyHash WC_LKM_INDIRECT_SYM(GetCAByKeyHash) |
1017 | 1046 | #endif /* HAVE_OCSP */ |
1018 | 1047 | #endif /* NO_SKID */ |
1019 | 1048 | #ifdef WOLFSSL_AKID_NAME |
1020 | | - #define GetCAByAKID (wolfssl_linuxkm_get_pie_redirect_table()->GetCAByAKID) |
| 1049 | + #define GetCAByAKID WC_LKM_INDIRECT_SYM(GetCAByAKID) |
1021 | 1050 | #endif |
1022 | 1051 |
|
1023 | 1052 | #if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL) |
1024 | | - #define wolfSSL_X509_NAME_add_entry_by_NID (wolfssl_linuxkm_get_pie_redirect_table()->wolfSSL_X509_NAME_add_entry_by_NID) |
1025 | | - #define wolfSSL_X509_NAME_free (wolfssl_linuxkm_get_pie_redirect_table()->wolfSSL_X509_NAME_free) |
1026 | | - #define wolfSSL_X509_NAME_new_ex (wolfssl_linuxkm_get_pie_redirect_table()->wolfSSL_X509_NAME_new_ex) |
| 1053 | + #define wolfSSL_X509_NAME_add_entry_by_NID WC_LKM_INDIRECT_SYM(wolfSSL_X509_NAME_add_entry_by_NID) |
| 1054 | + #define wolfSSL_X509_NAME_free WC_LKM_INDIRECT_SYM(wolfSSL_X509_NAME_free) |
| 1055 | + #define wolfSSL_X509_NAME_new_ex WC_LKM_INDIRECT_SYM(wolfSSL_X509_NAME_new_ex) |
1027 | 1056 | #endif /* OPENSSL_EXTRA || OPENSSL_EXTRA_X509_SMALL */ |
1028 | 1057 |
|
1029 | 1058 | #endif /* !WOLFCRYPT_ONLY && !NO_CERTS */ |
1030 | 1059 |
|
1031 | 1060 | #ifdef WOLFSSL_DEBUG_BACKTRACE_ERROR_CODES |
1032 | | - #define dump_stack (wolfssl_linuxkm_get_pie_redirect_table()->dump_stack) |
| 1061 | + #define dump_stack WC_LKM_INDIRECT_SYM(dump_stack) |
1033 | 1062 | #endif |
1034 | 1063 |
|
1035 | 1064 | #undef preempt_count /* just in case -- not a macro on x86. */ |
1036 | | - #define preempt_count (wolfssl_linuxkm_get_pie_redirect_table()->preempt_count) |
| 1065 | + #define preempt_count WC_LKM_INDIRECT_SYM(preempt_count) |
1037 | 1066 |
|
1038 | 1067 | #ifndef WOLFSSL_LINUXKM_USE_MUTEXES |
1039 | 1068 | #ifndef _raw_spin_lock_irqsave |
1040 | | - #define _raw_spin_lock_irqsave (wolfssl_linuxkm_get_pie_redirect_table()->_raw_spin_lock_irqsave) |
| 1069 | + #define _raw_spin_lock_irqsave WC_LKM_INDIRECT_SYM(_raw_spin_lock_irqsave) |
1041 | 1070 | #endif |
1042 | 1071 | #ifndef _raw_spin_trylock |
1043 | | - #define _raw_spin_trylock (wolfssl_linuxkm_get_pie_redirect_table()->_raw_spin_trylock) |
| 1072 | + #define _raw_spin_trylock WC_LKM_INDIRECT_SYM(_raw_spin_trylock) |
1044 | 1073 | #endif |
1045 | 1074 | #ifndef _raw_spin_unlock_irqrestore |
1046 | | - #define _raw_spin_unlock_irqrestore (wolfssl_linuxkm_get_pie_redirect_table()->_raw_spin_unlock_irqrestore) |
| 1075 | + #define _raw_spin_unlock_irqrestore WC_LKM_INDIRECT_SYM(_raw_spin_unlock_irqrestore) |
1047 | 1076 | #endif |
1048 | 1077 | #endif |
1049 | 1078 |
|
1050 | | - #define _cond_resched (wolfssl_linuxkm_get_pie_redirect_table()->_cond_resched) |
| 1079 | + #define _cond_resched WC_LKM_INDIRECT_SYM(_cond_resched) |
1051 | 1080 |
|
1052 | 1081 | /* this is defined in linux/spinlock.h as an inline that calls the unshimmed |
1053 | 1082 | * raw_spin_unlock_irqrestore(). use a macro here to supersede it. |
|
1190 | 1219 | */ |
1191 | 1220 | static __always_inline int wc_LockMutex(wolfSSL_Mutex *m) |
1192 | 1221 | { |
1193 | | - return (wolfssl_linuxkm_get_pie_redirect_table()->wc_lkm_LockMutex)(m); |
| 1222 | + return WC_LKM_INDIRECT_SYM(wc_lkm_LockMutex)(m); |
1194 | 1223 | } |
1195 | 1224 |
|
1196 | 1225 | #else /* !__PIE__ */ |
|
0 commit comments