public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH v5 1/8] lib: rsa: distinguish between tpl and spl for CONFIG_RSA_VERIFY
@ 2020-05-22 14:19 Heiko Stuebner
  2020-05-22 14:19 ` [PATCH v5 2/8] lib: rsa: take spl/non-spl into account when building rsa_verify_with_pkey() Heiko Stuebner
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Heiko Stuebner @ 2020-05-22 14:19 UTC (permalink / raw)
  To: u-boot

From: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>

While the SPL may want to do signature checking this won't be
the case for TPL in all cases, as TPL is mostly used when the
amount of initial memory is not enough for a full SPL.

So on a system where SPL uses DM but TPL does not we currently
end up with a TPL compile error of:

    lib/rsa/rsa-verify.c:48:25: error: dereferencing pointer to incomplete type ?struct checksum_algo?

To prevent that change the $(SPL_) to $(SPL_TPL_) to distinguish
between both. If someone really needs FIT signature checking in
TPL as well, a new TPL_RSA_VERIFY config symbol needs to be added.

Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
---
changes in v5:
- drop change that belongs in patch 2/8
changes in v4:
- amound -> amount
- found another entry to handle
changes in v2:
- fix typo "distinguis(h)"

 lib/rsa/Makefile     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/rsa/Makefile b/lib/rsa/Makefile
index 14ed3cb401..c61ebfd79e 100644
--- a/lib/rsa/Makefile
+++ b/lib/rsa/Makefile
@@ -5,6 +5,6 @@
 # (C) Copyright 2000-2007
 # Wolfgang Denk, DENX Software Engineering, wd at denx.de.
 
-obj-$(CONFIG_$(SPL_)RSA_VERIFY) += rsa-verify.o rsa-checksum.o
+obj-$(CONFIG_$(SPL_TPL_)RSA_VERIFY) += rsa-verify.o rsa-checksum.o
 obj-$(CONFIG_RSA_VERIFY_WITH_PKEY) += rsa-keyprop.o
 obj-$(CONFIG_RSA_SOFTWARE_EXP) += rsa-mod-exp.o
-- 
2.25.1

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

end of thread, other threads:[~2020-06-09 10:18 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-22 14:19 [PATCH v5 1/8] lib: rsa: distinguish between tpl and spl for CONFIG_RSA_VERIFY Heiko Stuebner
2020-05-22 14:19 ` [PATCH v5 2/8] lib: rsa: take spl/non-spl into account when building rsa_verify_with_pkey() Heiko Stuebner
2020-05-25 17:18   ` Heiko Stübner
2020-05-22 14:19 ` [PATCH v5 3/8] lib: rsa: bring exp_len in line when generating a key_prop Heiko Stuebner
2020-05-25 17:18   ` Heiko Stübner
2020-05-22 14:19 ` [PATCH v5 4/8] lib: rsa: fix allocated size for rr and rrtmp in rsa_gen_key_prop() Heiko Stuebner
2020-05-25 17:18   ` Heiko Stübner
2020-05-25 20:43   ` Philipp Tomsich
2020-06-09 10:18     ` Heinrich Schuchardt
2020-05-22 14:19 ` [PATCH v5 5/8] lib: rsa: free local arrays after use " Heiko Stuebner
2020-05-25 17:18   ` Heiko Stübner
2020-05-22 14:19 ` [PATCH v5 6/8] lib: rsa: add documentation to padding_pss_verify to document limitations Heiko Stuebner
2020-05-25 17:18   ` Heiko Stübner
2020-05-22 14:19 ` [PATCH v5 7/8] spl: fit: select SPL_HASH_SUPPORT for SPL_FIT_SIGNATURE Heiko Stuebner
2020-05-22 14:19 ` [PATCH v5 8/8] spl: fit: select SPL_CRYPTO_SUPPORT " Heiko Stuebner

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