Skip to content

Commit 6ae5555

Browse files
authored
Merge pull request #9704 from douzzer/20260122-toolchain-workarounds
20260122-toolchain-workarounds
2 parents cd88ec5 + a1b43ab commit 6ae5555

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

linuxkm/Kbuild

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,15 @@ ifeq "$(ENABLED_LINUXKM_PIE)" "yes"
147147
$(WOLFCRYPT_PIE_FILES): ccflags-y += $(PIE_FLAGS)
148148
$(WOLFCRYPT_PIE_FILES): ccflags-remove-y += -pg \
149149
$(call cc-option,-ftrivial-auto-var-init=zero)
150-
ifdef FORCE_GLOBAL_OBJTOOL_OFF
151-
undefine CONFIG_OBJTOOL
152-
endif
150+
endif
151+
152+
# On some kernels/configs, objtool runs and warns on the linked libwolfssl.o,
153+
# ignoring the below "OBJECT_FILES_NON_STANDARD := y" annotations. This
154+
# mechanism, activated with "make KBUILD_EXTRA_FLAGS=FORCE_GLOBAL_OBJTOOL_OFF=1",
155+
# inhibits objtool completely. This may be necessary on modules compiled with
156+
# assembly accelerations and/or ENABLED_LINUXKM_PIE.
157+
ifdef FORCE_GLOBAL_OBJTOOL_OFF
158+
undefine CONFIG_OBJTOOL
153159
endif
154160

155161
ifdef KERNEL_EXTRA_CFLAGS_REMOVE

wolfssl/wolfcrypt/dilithium.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@
569569
* the footer "-----END ML_DSA_LEVEL5 PRIVATE KEY-----" */
570570
#define DILITHIUM_MAX_BOTH_KEY_PEM_SIZE DILITHIUM_LEVEL3_BOTH_KEY_PEM_SIZE
571571

572-
#else
572+
#elif !defined(WOLFSSL_NO_ML_DSA_44)
573573

574574
#define DILITHIUM_MAX_KEY_SIZE DILITHIUM_LEVEL2_KEY_SIZE
575575
#define DILITHIUM_MAX_SIG_SIZE DILITHIUM_LEVEL2_SIG_SIZE
@@ -583,6 +583,10 @@
583583
* the footer "-----END ML_DSA_LEVEL5 PRIVATE KEY-----" */
584584
#define DILITHIUM_MAX_BOTH_KEY_PEM_SIZE DILITHIUM_LEVEL2_BOTH_KEY_PEM_SIZE
585585

586+
#else
587+
588+
#error ML-DSA: All levels disabled.
589+
586590
#endif
587591

588592
#elif defined(HAVE_LIBOQS)
@@ -676,8 +680,8 @@
676680
/* PEM size with the header "-----BEGIN ML_DSA_LEVEL5 PRIVATE KEY-----" and
677681
* the footer "-----END ML_DSA_LEVEL5 PRIVATE KEY-----" */
678682
#define DILITHIUM_MAX_BOTH_KEY_PEM_SIZE DILITHIUM_LEVEL5_BOTH_KEY_PEM_SIZE
679-
#endif
680683

684+
#endif /* HAVE_LIBOQS */
681685

682686

683687
#ifdef WOLF_PRIVATE_KEY_ID

0 commit comments

Comments
 (0)