public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tsm-mr: fix sample dependencies
@ 2026-03-18 10:51 Arnd Bergmann
  2026-03-18 16:48 ` Eric Biggers
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2026-03-18 10:51 UTC (permalink / raw)
  To: Dan Williams, Dionna Amalie Glaze, Cedric Xing, Eric Biggers
  Cc: Arnd Bergmann, Andrew Morton, Zi Li, Masami Hiramatsu (Google),
	Lance Yang, Zhou Yuhang, Colin Ian King, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

The tsm sample fails to link when crypto support is in a loadable module:

ld.lld-22: error: undefined symbol: crypto_alloc_shash
ld.lld-22: error: undefined symbol: crypto_shash_tfm_digest
ld.lld-22: error: undefined symbol: crypto_destroy_tfm
ld.lld-22: error: undefined symbol: crypto_shash_init
ld.lld-22: error: undefined symbol: crypto_shash_finup
>>> referenced by tsm_mr_sample.c
>>>               samples/tsm-mr/tsm_mr_sample.o:(sample_report_extend_mr) in archive vmlinux.a

This used to be handled indirectly by CONFIG_TSM_MEASUREMENTS forcing
the crypto code to be built-in, but that was changed because TSM
itself does not require it.

Move the select into the Kconfig option that controls the sample
instead.

Fixes: f6953f1f9ec4 ("tsm-mr: Add tsm-mr sample code")
Fixes: 44a3873df811 ("coco/guest: Remove unneeded selection of CRYPTO")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 samples/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/samples/Kconfig b/samples/Kconfig
index 5bc7c9e5a59e..730cc9f4197e 100644
--- a/samples/Kconfig
+++ b/samples/Kconfig
@@ -186,6 +186,8 @@ config SAMPLE_TIMER
 
 config SAMPLE_TSM_MR
 	tristate "TSM measurement sample"
+	select CRYPTO
+	select CRYPTO_HASH
 	select TSM_MEASUREMENTS
 	select VIRT_DRIVERS
 	help
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-03-18 16:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-18 10:51 [PATCH] tsm-mr: fix sample dependencies Arnd Bergmann
2026-03-18 16:48 ` Eric Biggers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox