All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: Dan Williams <dan.j.williams@intel.com>,
	Dionna Amalie Glaze <dionnaglaze@google.com>,
	Cedric Xing <cedric.xing@intel.com>,
	Eric Biggers <ebiggers@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Zi Li <zi.li@linux.dev>,
	"Masami Hiramatsu (Google)" <mhiramat@kernel.org>,
	Lance Yang <lance.yang@linux.dev>,
	Zhou Yuhang <zhouyuhang@kylinos.cn>,
	Colin Ian King <colin.i.king@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH] tsm-mr: fix sample dependencies
Date: Wed, 18 Mar 2026 11:51:55 +0100	[thread overview]
Message-ID: <20260318105200.1985712-1-arnd@kernel.org> (raw)

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


             reply	other threads:[~2026-03-18 10:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-18 10:51 Arnd Bergmann [this message]
2026-03-18 16:48 ` [PATCH] tsm-mr: fix sample dependencies Eric Biggers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260318105200.1985712-1-arnd@kernel.org \
    --to=arnd@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=cedric.xing@intel.com \
    --cc=colin.i.king@gmail.com \
    --cc=dan.j.williams@intel.com \
    --cc=dionnaglaze@google.com \
    --cc=ebiggers@kernel.org \
    --cc=lance.yang@linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=zhouyuhang@kylinos.cn \
    --cc=zi.li@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.