Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions linuxkm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,15 @@ ifeq "$(ENABLED_LINUXKM_PIE)" "yes"
$(WOLFCRYPT_PIE_FILES): ccflags-y += $(PIE_FLAGS)
$(WOLFCRYPT_PIE_FILES): ccflags-remove-y += -pg \
$(call cc-option,-ftrivial-auto-var-init=zero)
ifdef FORCE_GLOBAL_OBJTOOL_OFF
undefine CONFIG_OBJTOOL
endif
endif

# On some kernels/configs, objtool runs and warns on the linked libwolfssl.o,
# ignoring the below "OBJECT_FILES_NON_STANDARD := y" annotations. This
# mechanism, activated with "make KBUILD_EXTRA_FLAGS=FORCE_GLOBAL_OBJTOOL_OFF=1",
# inhibits objtool completely. This may be necessary on modules compiled with
# assembly accelerations and/or ENABLED_LINUXKM_PIE.
ifdef FORCE_GLOBAL_OBJTOOL_OFF
undefine CONFIG_OBJTOOL
endif

ifdef KERNEL_EXTRA_CFLAGS_REMOVE
Expand Down
8 changes: 6 additions & 2 deletions wolfssl/wolfcrypt/dilithium.h
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@
* the footer "-----END ML_DSA_LEVEL5 PRIVATE KEY-----" */
#define DILITHIUM_MAX_BOTH_KEY_PEM_SIZE DILITHIUM_LEVEL3_BOTH_KEY_PEM_SIZE

#else
#elif !defined(WOLFSSL_NO_ML_DSA_44)

#define DILITHIUM_MAX_KEY_SIZE DILITHIUM_LEVEL2_KEY_SIZE
#define DILITHIUM_MAX_SIG_SIZE DILITHIUM_LEVEL2_SIG_SIZE
Expand All @@ -583,6 +583,10 @@
* the footer "-----END ML_DSA_LEVEL5 PRIVATE KEY-----" */
#define DILITHIUM_MAX_BOTH_KEY_PEM_SIZE DILITHIUM_LEVEL2_BOTH_KEY_PEM_SIZE

#else

#error ML-DSA: All levels disabled.

#endif

#elif defined(HAVE_LIBOQS)
Expand Down Expand Up @@ -676,8 +680,8 @@
/* PEM size with the header "-----BEGIN ML_DSA_LEVEL5 PRIVATE KEY-----" and
* the footer "-----END ML_DSA_LEVEL5 PRIVATE KEY-----" */
#define DILITHIUM_MAX_BOTH_KEY_PEM_SIZE DILITHIUM_LEVEL5_BOTH_KEY_PEM_SIZE
#endif

#endif /* HAVE_LIBOQS */


#ifdef WOLF_PRIVATE_KEY_ID
Expand Down
Loading