Skip to content

Commit 1a0549f

Browse files
authored
Merge pull request #9800 from douzzer/20260204-linuxkm-fips-hash
20260204-linuxkm-fips-hash
2 parents 9641ab4 + 9ca32e2 commit 1a0549f

26 files changed

Lines changed: 2368 additions & 824 deletions

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@ linuxkm/linuxkm/get_thread_size
245245
linuxkm/linuxkm
246246
linuxkm/src
247247
linuxkm/patches/src
248+
linuxkm/libwolfssl-user-build
249+
linuxkm/linuxkm-fips-hash
248250
*.nds
249251

250252
# Generated during FreeBSD kernel module build.

.wolfssl_known_macro_extras

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ CONFIG_PTHREAD_IPC
141141
CONFIG_SCHED_INFO
142142
CONFIG_SMP
143143
CONFIG_SNTP_TIME_SYNC_METHOD_SMOOTH
144+
CONFIG_STACK_GROWSUP
145+
CONFIG_THREAD_INFO_IN_TASK
144146
CONFIG_TIMER_TASK_STACK_DEPTH
145147
CONFIG_TIMER_TASK_STACK_SIZE
146148
CONFIG_TLS_STACK_WOLFSSL
@@ -294,6 +296,7 @@ HAVE_THREADX
294296
HAVE_TM_TYPE
295297
HAVE_VALIDATE_DATE
296298
HAVE_VA_COPY
299+
HAVE_WC_FIPS_OPTEST_CONTESTFAILURE_EXPORT
297300
HAVE_X448
298301
HONOR_MATH_USED_LENGTH
299302
HSM_KEY_TYPE_HMAC_224
@@ -658,7 +661,7 @@ WIFI_101
658661
WIFI_AVAILABLE
659662
WIFI_NINA
660663
WIN_REUSE_CRYPT_HANDLE
661-
WOLFCRYPT_FIPS_CORE_DYNAMIC_HASH_VALUE
664+
WOLFCRYPT_FIPS_CORE_DYNAMIC_HASH_VALUE_SUPPORT
662665
WOLFSENTRY_H
663666
WOLFSENTRY_NO_JSON
664667
WOLFSSL_32BIT_MILLI_TIME
@@ -1061,8 +1064,8 @@ __SDCC_VERSION_MAJOR
10611064
__SDCC_VERSION_MINOR
10621065
__SDCC_VERSION_PATCH
10631066
__SIZEOF_INT128__
1064-
__SIZEOF_LONG__
10651067
__SIZEOF_LONG_LONG__
1068+
__SIZEOF_LONG__
10661069
__STDC_NO_ATOMICS__
10671070
__STDC_VERSION__
10681071
__STDC__

Makefile.am

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,14 +225,21 @@ if BUILD_LINUXKM
225225
CFLAGS_FPU_DISABLE CFLAGS_FPU_ENABLE CFLAGS_SIMD_DISABLE CFLAGS_SIMD_ENABLE \
226226
CFLAGS_AUTO_VECTORIZE_DISABLE CFLAGS_AUTO_VECTORIZE_ENABLE \
227227
ASFLAGS_FPU_DISABLE_SIMD_ENABLE ASFLAGS_FPU_ENABLE_SIMD_DISABLE \
228-
ASFLAGS_FPUSIMD_DISABLE ASFLAGS_FPUSIMD_ENABLE ENABLED_KERNEL_BENCHMARKS
228+
ASFLAGS_FPUSIMD_DISABLE ASFLAGS_FPUSIMD_ENABLE ENABLED_KERNEL_BENCHMARKS \
229+
FIPS_FLAVOR
229230

230231
module:
231232
+$(MAKE) -C linuxkm libwolfssl.ko
232233

233234
module-update-fips-hash:
234235
+$(MAKE) -C linuxkm module-update-fips-hash
235236

237+
module-with-matching-fips-hash:
238+
+$(MAKE) -C linuxkm module-with-matching-fips-hash
239+
240+
module-with-matching-fips-hash-no-sign:
241+
+$(MAKE) -C linuxkm module-with-matching-fips-hash-no-sign
242+
236243
clean_module:
237244
+$(MAKE) -C linuxkm clean
238245

configure.ac

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,16 +131,34 @@ then
131131
fi
132132

133133
# Kernel module benchmark
134-
ENABLED_KERNEL_BENCHMARKS=""
135134
AC_ARG_ENABLE([kernel-benchmarks],
136135
[AS_HELP_STRING([--enable-kernel-benchmarks],[Enable crypto benchmarking autorun at module load time for kernel module (default: disabled)])],
137-
[ENABLED_KERNEL_BENCHMARKS=$enableval])
136+
[ENABLED_KERNEL_BENCHMARKS=$enableval],
137+
[ENABLED_KERNEL_BENCHMARKS="no"])
138138
if test "$ENABLED_KERNEL_BENCHMARKS" = "yes"
139139
then
140140
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_KERNEL_BENCHMARKS"
141141
fi
142142
AC_SUBST([ENABLED_KERNEL_BENCHMARKS])
143143

144+
AC_ARG_ENABLE([kernel-verbose-debug],
145+
[AS_HELP_STRING([--enable-kernel-verbose-debug],[Enable supplementary runtime debugging messages for kernel module (default: disabled)])],
146+
[ENABLED_KERNEL_VERBOSE_DEBUG=$enableval],
147+
[ENABLED_KERNEL_VERBOSE_DEBUG="no"])
148+
if test "$ENABLED_KERNEL_VERBOSE_DEBUG" = "yes"
149+
then
150+
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_KERNEL_VERBOSE_DEBUG"
151+
fi
152+
153+
AC_ARG_ENABLE([kernel-stack-debug],
154+
[AS_HELP_STRING([--enable-kernel-stack-debug],[Enable runtime reporting of stack usage in kernel module (default: disabled)])],
155+
[ENABLED_KERNEL_STACK_DEBUG=$enableval],
156+
[ENABLED_KERNEL_STACK_DEBUG="no"])
157+
if test "$ENABLED_KERNEL_STACK_DEBUG" = "yes"
158+
then
159+
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_KERNEL_STACK_DEBUG"
160+
fi
161+
144162
# Linux Kernel Module options (more options later)
145163
AC_ARG_ENABLE([linuxkm],
146164
[AS_HELP_STRING([--enable-linuxkm],[Enable Linux Kernel Module (default: disabled)])],
@@ -415,6 +433,9 @@ AC_ARG_ENABLE([fips],
415433
[ENABLED_FIPS=$enableval],
416434
[ENABLED_FIPS="no"])
417435

436+
FIPS_FLAVOR="$ENABLED_FIPS"
437+
AC_SUBST([FIPS_FLAVOR])
438+
418439
# wolfProvider Options
419440
AC_ARG_ENABLE([wolfprovider],
420441
[AS_HELP_STRING([--enable-wolfprovider],[Enable wolfProvider options (default: disabled)])],
@@ -1463,7 +1484,6 @@ then
14631484
test "$enable_pwdbased" = "" && enable_pwdbased=yes
14641485
test "$enable_aeskeywrap" = "" && enable_aeskeywrap=yes
14651486
test "$enable_x963kdf" = "" && enable_x963kdf=yes
1466-
test "$enable_scrypt" = "" && test "$enable_hmac" != "no" && enable_scrypt=yes
14671487
test "$enable_indef" = "" && enable_indef=yes
14681488
test "$enable_enckeys" = "" && enable_enckeys=yes
14691489
test "$enable_hashflags" = "" && enable_hashflags=yes
@@ -1480,11 +1500,11 @@ then
14801500
test "$enable_ssh" = "" && test "$enable_hmac" != "no" && enable_ssh=yes
14811501
test "$enable_rng_bank" = "" && enable_rng_bank=yes
14821502

1483-
# the compiler optimizer generates a weird out-of-bounds bss reference for
1484-
# find_hole() in the FP_ECC implementation.
1485-
if test "$ENABLED_LINUXKM_PIE" != yes
1503+
if test "$KERNEL_MODE_DEFAULTS" != "yes"
14861504
then
1487-
test "$enable_fpecc" = "" && test "$enable_ecc" != "no" && enable_fpecc=yes
1505+
# Scrypt is excluded from kernel module builds (unless explicitly
1506+
# enabled) because of its excessive memory requirements.
1507+
test "$enable_scrypt" = "" && test "$enable_hmac" != "no" && enable_scrypt=yes
14881508
fi
14891509

14901510
if test "x$FIPS_VERSION" != "xv1"

linuxkm/Kbuild

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ else ifeq "$(KERNEL_ARCH)" "arm"
4949
WOLFSSL_CFLAGS += -fno-optimize-sibling-calls -Os
5050
endif
5151

52-
obj-m := libwolfssl.o
52+
ifndef LIBWOLFSSL_NAME
53+
LIBWOLFSSL_NAME := libwolfssl
54+
endif
55+
56+
obj-m := $(LIBWOLFSSL_NAME).o
5357

5458
WOLFSSL_OBJ_TARGETS := $(patsubst %, $(obj)/%, $(WOLFSSL_OBJ_FILES))
5559

@@ -88,10 +92,10 @@ ifndef KERNEL_THREAD_STACK_SIZE
8892
endif
8993
MAX_STACK_FRAME_SIZE=$(shell echo $$(( $(KERNEL_THREAD_STACK_SIZE) / 4)))
9094

91-
libwolfssl-y := $(WOLFSSL_OBJ_FILES) linuxkm/module_hooks.o linuxkm/module_exports.o
95+
$(LIBWOLFSSL_NAME)-y := $(WOLFSSL_OBJ_FILES) linuxkm/module_hooks.o linuxkm/module_exports.o
9296

9397
ifeq "$(FIPS_OPTEST)" "1"
94-
libwolfssl-y += linuxkm/optest-140-3/linuxkm_optest_wrapper.o
98+
$(LIBWOLFSSL_NAME)-y += linuxkm/optest-140-3/linuxkm_optest_wrapper.o
9599
endif
96100

97101
WOLFSSL_CFLAGS_NO_VECTOR_INSNS := $(CFLAGS_SIMD_DISABLE) $(CFLAGS_FPU_DISABLE)
@@ -162,7 +166,7 @@ ifdef KERNEL_EXTRA_CFLAGS_REMOVE
162166
ccflags-remove-y += $(KERNEL_EXTRA_CFLAGS_REMOVE)
163167
endif
164168

165-
$(obj)/libwolfssl.mod.o: ccflags-y := $(PIE_SUPPORT_FLAGS)
169+
$(obj)/$(LIBWOLFSSL_NAME).mod.o: ccflags-y := $(PIE_SUPPORT_FLAGS)
166170
$(obj)/wolfcrypt/test/test.o: ccflags-y += -DNO_MAIN_DRIVER -DWOLFSSL_NO_OPTIONS_H
167171
$(obj)/wolfcrypt/src/aes.o: ccflags-y := $(WOLFSSL_CFLAGS) $(WOLFSSL_CFLAGS_YES_VECTOR_INSNS) $(PIE_FLAGS) $(PIE_SUPPORT_FLAGS)
168172
$(obj)/wolfcrypt/benchmark/benchmark.o: ccflags-y := $(WOLFSSL_CFLAGS) $(CFLAGS_FPU_ENABLE) $(CFLAGS_SIMD_ENABLE) $(PIE_SUPPORT_FLAGS) -DNO_MAIN_FUNCTION -DWOLFSSL_NO_OPTIONS_H
@@ -331,15 +335,19 @@ endif
331335
# auto-generate the exported symbol list, leveraging the WOLFSSL_API visibility tags.
332336
# exclude symbols that don't match wc_* or wolf*.
333337
EXPORT_SYMBOL := EXPORT_SYMBOL_NS_GPL
338+
ifndef WOLFSSL_NS
339+
WOLFSSL_NS := WOLFSSL
340+
endif
334341
$(obj)/linuxkm/module_exports.c: $(src)/module_exports.c.template $(WOLFSSL_OBJ_TARGETS) $(obj)/linuxkm/module_hooks.o
335342
@$(RENAME_PIE_TEXT_AND_DATA_SECTIONS)
336343
@cp $< $@ || exit $$?
337344
if [[ "$${VERSION}" -gt 6 || ("$${VERSION}" -eq 6 && "$${PATCHLEVEL}" -ge 13) ]]; then
338345
# use ASCII octal escape to avoid syntax disruption in the awk script.
339-
ns='\042WOLFSSL\042'
346+
ns='\042$(WOLFSSL_NS)\042'
340347
else
341-
ns='WOLFSSL'
348+
ns='$(WOLFSSL_NS)'
342349
fi
350+
ifndef NO_EXPORTS
343351
$(READELF) --symbols --wide $(filter %.o,$^) |
344352
$(AWK) '/^ *[0-9]+: / {
345353
if ($$8 !~ /^(wc_|wolf|WOLF|TLSX_)/){next;}
@@ -348,5 +356,6 @@ $(obj)/linuxkm/module_exports.c: $(src)/module_exports.c.template $(WOLFSSL_OBJ_
348356
}
349357
}' >> $@ || exit $$?
350358
echo -e "#ifndef NO_CRYPT_TEST\n$(EXPORT_SYMBOL)(wolfcrypt_test, $${ns});\n#endif" >> $@
359+
endif
351360

352361
clean-files := linuxkm src wolfcrypt

linuxkm/Makefile

Lines changed: 84 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,19 @@
2121
.ONESHELL:
2222
SHELL=bash
2323

24-
all: libwolfssl.ko libwolfssl.ko.signed
24+
ifeq "$(quiet)" "silent_"
25+
QFLAG := --quiet
26+
else ifeq "$(V)" "1"
27+
VFLAG := --verbose
28+
else
29+
QFLAG := --quiet
30+
endif
31+
32+
ifndef LIBWOLFSSL_NAME
33+
LIBWOLFSSL_NAME := libwolfssl
34+
endif
35+
36+
all: $(LIBWOLFSSL_NAME).ko $(LIBWOLFSSL_NAME).ko.signed
2537

2638
ifndef MODULE_TOP
2739
MODULE_TOP=$(CURDIR)
@@ -147,8 +159,9 @@ GENERATE_RELOC_TAB := $(AWK) ' \
147159
n=0; \
148160
bad_relocs=0; \
149161
print "\#include <wolfssl/wolfcrypt/libwolfssl_sources.h>"; \
162+
print "\#include <wolfssl/wolfcrypt/memory.h>"; \
150163
printf("%s\n ", \
151-
"WOLFSSL_LOCAL const struct wc_linuxkm_pie_reloc_tab_ent wc_linuxkm_pie_reloc_tab[] = { "); \
164+
"WOLFSSL_LOCAL const struct wc_reloc_table_ent wc_linuxkm_pie_reloc_tab[] = { "); \
152165
if ("SECTION_MAP" in ENVIRON) { \
153166
while (getline <ENVIRON["SECTION_MAP"] > 0) \
154167
section_map[$$1] = $$2; \
@@ -204,8 +217,10 @@ GENERATE_RELOC_TAB := $(AWK) ' \
204217
print >"/dev/stderr"; \
205218
exit(1); \
206219
} \
207-
printf(" { .offset = 0x%xU, .dest_segment = %s, .reloc_type = WC_%s },\n", \
208-
strtonum("0x" gensub("^0*","",1,$$1)), \
220+
printf(" { .offset = 0x%xU, .dest_offset = 0x%xU, .dest_addend = %+d, .dest_segment = %s, .reloc_type = WC_%s },\n", \
221+
strtonum("0x" $$1), \
222+
strtonum("0x" $$4), \
223+
$$6 strtonum("0x" $$7), \
209224
section_tag, reloc_type); \
210225
} \
211226
} \
@@ -214,8 +229,8 @@ GENERATE_RELOC_TAB := $(AWK) ' \
214229
print "Found " bad_relocs " unresolvable relocations." >"/dev/stderr"; \
215230
exit(1); \
216231
} \
217-
print " { .offset = ~0U, .dest_segment = WC_R_SEG_NONE, .reloc_type = WC_R_NONE } };"; \
218-
print "WOLFSSL_LOCAL const unsigned long wc_linuxkm_pie_reloc_tab_length = sizeof wc_linuxkm_pie_reloc_tab / sizeof wc_linuxkm_pie_reloc_tab[0];"; \
232+
print " { .offset = ~0U, .dest_offset = ~0U, .dest_addend = 0, .dest_segment = WC_R_SEG_NONE, .reloc_type = WC_R_NONE } };"; \
233+
print "WOLFSSL_LOCAL const unsigned int wc_linuxkm_pie_reloc_tab_length = (unsigned int)(sizeof wc_linuxkm_pie_reloc_tab / sizeof wc_linuxkm_pie_reloc_tab[0]);"; \
219234
}'
220235

221236
ifeq "$(V)" "1"
@@ -225,8 +240,8 @@ endif
225240
# This rule is .PHONY because it doesn't actually build the module -- Kbuild
226241
# does, and we always need to call Kbuild to enforce rebuild for dependencies
227242
# and config changes.
228-
.PHONY: libwolfssl.ko
229-
libwolfssl.ko:
243+
.PHONY: $(LIBWOLFSSL_NAME).ko
244+
$(LIBWOLFSSL_NAME).ko:
230245
@set -e
231246
@[[ '$(V)' == 1 ]] && { echo 'MODULE_TOP = "$(MODULE_TOP)"';
232247
echo 'SRC_TOP = "$(SRC_TOP)"';
@@ -303,7 +318,7 @@ else
303318
endif
304319

305320
.PHONY: module-update-fips-hash
306-
module-update-fips-hash: libwolfssl.ko
321+
module-update-fips-hash: $(LIBWOLFSSL_NAME).ko
307322
@set -e
308323
@if test -z '$(FIPS_HASH)'; then echo ' $$FIPS_HASH is unset' >&2; exit 1; fi
309324
@if [[ ! '$(FIPS_HASH)' =~ [0-9a-fA-F]{64} ]]; then echo ' $$FIPS_HASH is malformed' >&2; exit 1; fi
@@ -320,9 +335,65 @@ module-update-fips-hash: libwolfssl.ko
320335
if [[ '$(FIPS_HASH)' == "$$current_verifyCore" ]]; then echo ' Supplied FIPS_HASH matches existing verifyCore -- no update needed.'; exit 0; fi; \
321336
echo -n '$(FIPS_HASH)' | dd bs=1 conv=notrunc of="$<" seek=$$verifyCore_offset count=64 status=none && \
322337
echo " FIPS verifyCore updated successfully." && \
323-
if [[ -f libwolfssl.ko.signed ]]; then $(MAKE) -C . libwolfssl.ko.signed; fi
338+
if [[ -f '$(LIBWOLFSSL_NAME).ko.signed' ]]; then $(MAKE) -C . '$(LIBWOLFSSL_NAME).ko.signed'; fi
339+
340+
341+
# linuxkm-fips-hash implements offline (no-load) FIPS hash calculation and graft-in.
342+
#
343+
# libwolfssl.so is built from the same sources as the kernel module, with the
344+
# same FIPS setting, then used with linuxkm-fips-hash to calculate and overwrite
345+
# the hash in libwolfssl.ko. Finally, the module is [re]signed.
346+
#
347+
# Note that libwolfssl.so has to be built from a hierarchy of symlinks, to avoid
348+
# depending on changes/config in the source directory. Also, aside from
349+
# FIPS_FLAVOR, inherited configuration settings in the environment are cleansed.
350+
351+
libwolfssl-user-build/src/.libs/libwolfssl.so:
352+
@set -e
353+
@$(RM) -rf '$(MODULE_TOP)/libwolfssl-user-build'
354+
@mkdir '$(MODULE_TOP)/libwolfssl-user-build'
355+
@cd '$(MODULE_TOP)/libwolfssl-user-build'
356+
@pushd '$(SRC_TOP)' >/dev/null
357+
@echo -n 'Populating tree of symlinks...'
358+
@readarray -d '' -t srcfiles < <(find examples src support tests testsuite wolfcrypt wolfssl configure *.in build-aux debian rpm scripts certs doc mcapi cmake linuxkm/*.[ch] \( -name options.h -o -name user_settings\* \) -prune -o \( ! -type d \) \( -name '*.[chsSi]' -o -name configure -o -name '*.in' -o -name \*.sh -o -path support/\* -o -path build-aux/\* -o -path debian/\* -o -path rpm/\* -o -path scripts/\* -o -path certs/\* -o -path doc/\* -o -path mcapi/\* -o -path cmake/\* \) -print0)
359+
@popd >/dev/null
360+
@for file in "$${srcfiles[@]}"; do if [[ ! -e "$$file" ]]; then mkdir -p "$$(dirname "$$file")" && cp --no-dereference --symbolic-link --no-clobber '$(SRC_TOP)'/"$$file" "$$file"; fi; done
361+
@echo ' done.'
362+
@echo '__attribute__ ((visibility("default"))) extern const char coreKey[];' > user_settings.h
363+
@echo > user_settings_asm.h
364+
@echo -n 'Configuring libwolfssl.so...'
365+
@unset WOLFSSL_CFLAGS WOLFCRYPT_PIE_FILES ASFLAGS_FPUSIMD_ENABLE ASFLAGS_FPU_DISABLE_SIMD_ENABLE src_libwolfssl_la_OBJECTS WOLFSSL_ASFLAGS AM_CFLAGS WOLFSSL_OBJ_FILES ENABLED_LINUXKM_LKCAPI_REGISTER EXTRA_LDFLAGS CC LD
366+
@./configure $(QFLAG) $(VFLAG) --disable-jobserver --enable-cryptonly --enable-fips="$$FIPS_FLAVOR" CFLAGS='-DWC_SYM_RELOC_TABLES_SUPPORT -DWOLFCRYPT_FIPS_CORE_DYNAMIC_HASH_VALUE -DWOLFSSL_USER_SETTINGS -DWOLFSSL_USER_SETTINGS_ASM'
367+
@echo ' done.'
368+
@echo -n 'Compiling and linking libwolfssl.so...'
369+
+$(MAKE) $(QFLAG) >/dev/null
370+
@echo ' done.'
371+
@echo -n 'Fixing FIPS hash...'
372+
@userhash=$$(wolfcrypt/test/testwolfcrypt 2>&1 | sed -n -E 's/^hash = (.+)$$/\1/p')
373+
@if [[ -z "$$userhash" ]]; then echo ' FIPS hash not found!' >&2; exit 1; fi
374+
@find wolfcrypt/src -name '*fips_test*o' -delete
375+
+$(MAKE) $(QFLAG) EXTRA_CFLAGS=-DWOLFCRYPT_FIPS_CORE_HASH_VALUE="$$userhash"
376+
@echo ' done.'
377+
378+
linuxkm-fips-hash: libwolfssl-user-build/src/.libs/libwolfssl.so linuxkm-fips-hash.c
379+
@set -e
380+
@echo -n 'Compiling linuxkm-fips-hash...'
381+
# note direct invocation of cc -- we are compiling for the build host, not the target host.
382+
@cc -Wall -Wextra -O2 -I'$(MODULE_TOP)/libwolfssl-user-build' -o linuxkm-fips-hash linuxkm/linuxkm-fips-hash.c -L '$(MODULE_TOP)/libwolfssl-user-build/src/.libs' -Wl,-rpath-link='$(MODULE_TOP)/libwolfssl-user-build/src/.libs' -Wl,-rpath='$(MODULE_TOP)/libwolfssl-user-build/src/.libs' -lwolfssl
383+
@echo ' done.'
384+
385+
.PHONY: module-with-matching-fips-hash
386+
module-with-matching-fips-hash: $(LIBWOLFSSL_NAME).ko linuxkm-fips-hash
387+
@set -e
388+
@./linuxkm-fips-hash-wrapper.sh "$<" $(QFLAG) $(VFLAG)
389+
+$(MAKE) $(QFLAG) -C . '$(LIBWOLFSSL_NAME).ko.signed'
390+
391+
.PHONY: module-with-matching-fips-hash-no-sign
392+
module-with-matching-fips-hash-no-sign: $(LIBWOLFSSL_NAME).ko linuxkm-fips-hash
393+
@set -e
394+
@./linuxkm-fips-hash-wrapper.sh "$<"
324395

325-
libwolfssl.ko.signed: libwolfssl.ko
396+
$(LIBWOLFSSL_NAME).ko.signed: $(LIBWOLFSSL_NAME).ko
326397
ifdef FORCE_NO_MODULE_SIG
327398
@echo 'Skipping module signature operation because FORCE_NO_MODULE_SIG.'
328399
else
@@ -371,6 +442,8 @@ clean:
371442
$(RM) -rf '$(MODULE_TOP)/linuxkm'
372443
$(RM) -rf '$(MODULE_TOP)/wolfcrypt'
373444
$(RM) -rf '$(MODULE_TOP)/src'
445+
$(RM) -rf '$(MODULE_TOP)/libwolfssl-user-build'
446+
$(RM) -f '$(MODULE_TOP)/linuxkm-fips-hash'
374447

375448
.PHONY: check
376449
check:

0 commit comments

Comments
 (0)