File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -602,6 +602,7 @@ WC_DILITHIUM_FIXED_ARRAY
602602WC_DISABLE_RADIX_ZERO_PAD
603603WC_ECC_NONBLOCK_ONLY
604604WC_FLAG_DONT_USE_AESNI
605+ WC_FORCE_LINUXKM_FORTIFY_SOURCE
605606WC_KDF_NIST_SP_800_56C
606607WC_LMS_FULL_HASH
607608WC_NO_RNG_SIMPLE
Original file line number Diff line number Diff line change 228228
229229 #include <linux/kconfig.h>
230230
231- #if defined(CONFIG_FORTIFY_SOURCE ) && defined(HAVE_LINUXKM_PIE_SUPPORT )
231+ #if defined(CONFIG_FORTIFY_SOURCE ) && \
232+ !defined(WC_FORCE_LINUXKM_FORTIFY_SOURCE ) && \
233+ (defined(HAVE_LINUXKM_PIE_SUPPORT ) || \
234+ (LINUX_VERSION_CODE < KERNEL_VERSION (5 , 18 , 0 )))
232235 /* fortify-source causes all sorts of awkward problems for the PIE
233236 * build, up to and including stubborn external references and multiple
234237 * definitions of string functions.
238+ *
239+ * fortify-source before kernel 5.18 has similar issues regardless of
240+ * PIE, around our macro-shimming of the string functions.
235241 */
236242 #undef CONFIG_FORTIFY_SOURCE
237243 #endif
238244
245+ #if defined(WC_FORCE_LINUXKM_FORTIFY_SOURCE ) && \
246+ !defined(CONFIG_FORTIFY_SOURCE )
247+ #error WC_FORCE_LINUXKM_FORTIFY_SOURCE without CONFIG_FORTIFY_SOURCE.
248+ #endif
249+
239250 #if defined(__PIE__ ) && defined(CONFIG_ARM64 )
240251 #define alt_cb_patch_nops my__alt_cb_patch_nops
241252 #define queued_spin_lock_slowpath my__queued_spin_lock_slowpath
You can’t perform that action at this time.
0 commit comments