* [PATCH] habv4: habv4_get_status(): do not print HAB error event in case of known RNG self test failure
@ 2021-07-16 12:21 Marc Kleine-Budde
2021-07-16 13:00 ` Rouven Czerwinski
2021-07-18 5:09 ` Sascha Hauer
0 siblings, 2 replies; 3+ messages in thread
From: Marc Kleine-Budde @ 2021-07-16 12:21 UTC (permalink / raw)
To: barebox; +Cc: Roland Hieber
In commit
| 655e085e3a22 ("crypto: caam - Always do rng selftest")
the kconfig option CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_SELF_TEST was
removed, which resulted in the pr_debug() never being executed. Remove
the IS_ENABLED() to restore the original behavior, i.e. to not print
the HAB error Event if it is the known RNG self-test failure.
Fixes: 655e085e3a22 ("crypto: caam - Always do rng selftest")
Reported-by: Roland Hieber <rhi@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
drivers/hab/habv4.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/hab/habv4.c b/drivers/hab/habv4.c
index c2acb81369d8..d58768fa5481 100644
--- a/drivers/hab/habv4.c
+++ b/drivers/hab/habv4.c
@@ -553,8 +553,7 @@ static int habv4_get_status(const struct habv4_rvt *rvt)
break;
/* suppress RNG self-test fail events if they can be handled in software */
- if (IS_ENABLED(CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_SELF_TEST) &&
- is_known_rng_fail_event(data, len)) {
+ if (is_known_rng_fail_event(data, len)) {
pr_debug("RNG self-test failure detected, will run software self-test\n");
} else {
pr_err("-------- HAB Event %d --------\n", i);
--
2.30.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] habv4: habv4_get_status(): do not print HAB error event in case of known RNG self test failure
2021-07-16 12:21 [PATCH] habv4: habv4_get_status(): do not print HAB error event in case of known RNG self test failure Marc Kleine-Budde
@ 2021-07-16 13:00 ` Rouven Czerwinski
2021-07-18 5:09 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Rouven Czerwinski @ 2021-07-16 13:00 UTC (permalink / raw)
To: Marc Kleine-Budde, barebox; +Cc: Roland Hieber
On Fri, 2021-07-16 at 14:21 +0200, Marc Kleine-Budde wrote:
> In commit
>
> > 655e085e3a22 ("crypto: caam - Always do rng selftest")
>
> the kconfig option CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_SELF_TEST was
> removed, which resulted in the pr_debug() never being executed. Remove
> the IS_ENABLED() to restore the original behavior, i.e. to not print
> the HAB error Event if it is the known RNG self-test failure.
>
> Fixes: 655e085e3a22 ("crypto: caam - Always do rng selftest")
> Reported-by: Roland Hieber <rhi@pengutronix.de>
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> ---
> drivers/hab/habv4.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/hab/habv4.c b/drivers/hab/habv4.c
> index c2acb81369d8..d58768fa5481 100644
> --- a/drivers/hab/habv4.c
> +++ b/drivers/hab/habv4.c
> @@ -553,8 +553,7 @@ static int habv4_get_status(const struct habv4_rvt *rvt)
> break;
>
> /* suppress RNG self-test fail events if they can be handled in software */
> - if (IS_ENABLED(CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_SELF_TEST) &&
> - is_known_rng_fail_event(data, len)) {
> + if (is_known_rng_fail_event(data, len)) {
> pr_debug("RNG self-test failure detected, will run software self-test\n");
> } else {
> pr_err("-------- HAB Event %d --------\n", i);
Reviewed-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
However I wonder if we need the pr_debug at all, since the selftests
are now always run, regardless of the HAB error. But I guess it's nice
to note that we detected the error and ran the software selftests.
- rcz
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] habv4: habv4_get_status(): do not print HAB error event in case of known RNG self test failure
2021-07-16 12:21 [PATCH] habv4: habv4_get_status(): do not print HAB error event in case of known RNG self test failure Marc Kleine-Budde
2021-07-16 13:00 ` Rouven Czerwinski
@ 2021-07-18 5:09 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2021-07-18 5:09 UTC (permalink / raw)
To: Marc Kleine-Budde; +Cc: barebox, Roland Hieber
On Fri, Jul 16, 2021 at 02:21:10PM +0200, Marc Kleine-Budde wrote:
> In commit
>
> | 655e085e3a22 ("crypto: caam - Always do rng selftest")
>
> the kconfig option CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_SELF_TEST was
> removed, which resulted in the pr_debug() never being executed. Remove
> the IS_ENABLED() to restore the original behavior, i.e. to not print
> the HAB error Event if it is the known RNG self-test failure.
>
> Fixes: 655e085e3a22 ("crypto: caam - Always do rng selftest")
> Reported-by: Roland Hieber <rhi@pengutronix.de>
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> ---
> drivers/hab/habv4.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
Applied, thanks
Sascha
>
> diff --git a/drivers/hab/habv4.c b/drivers/hab/habv4.c
> index c2acb81369d8..d58768fa5481 100644
> --- a/drivers/hab/habv4.c
> +++ b/drivers/hab/habv4.c
> @@ -553,8 +553,7 @@ static int habv4_get_status(const struct habv4_rvt *rvt)
> break;
>
> /* suppress RNG self-test fail events if they can be handled in software */
> - if (IS_ENABLED(CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_SELF_TEST) &&
> - is_known_rng_fail_event(data, len)) {
> + if (is_known_rng_fail_event(data, len)) {
> pr_debug("RNG self-test failure detected, will run software self-test\n");
> } else {
> pr_err("-------- HAB Event %d --------\n", i);
> --
> 2.30.2
>
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-07-18 5:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-16 12:21 [PATCH] habv4: habv4_get_status(): do not print HAB error event in case of known RNG self test failure Marc Kleine-Budde
2021-07-16 13:00 ` Rouven Czerwinski
2021-07-18 5:09 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox