From 49645f64904abcd4d08e38cd528bad3af60c2b57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Tue, 3 Sep 2024 10:10:18 +0200 Subject: [PATCH] Misc improvements to comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Manuel Pégourié-Gonnard --- tests/include/test/bignum_codepath_check.h | 9 +++++---- tf-psa-crypto/drivers/builtin/src/bignum_core.h | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/include/test/bignum_codepath_check.h b/tests/include/test/bignum_codepath_check.h index 2f954e94fa..3d72be1b2e 100644 --- a/tests/include/test/bignum_codepath_check.h +++ b/tests/include/test/bignum_codepath_check.h @@ -6,8 +6,8 @@ * - MBEDTLS_MPI_IS_SECRET: Only safe paths were teken since the last reset * - MBEDTLS_MPI_IS_PUBLIC: At least one unsafe path has been taken since the last reset * - * Using a simple global variable to track execution path. Making it work with multithreading - * doesn't worth the effort as multithreaded tests add little to no value here. + * Use a simple global variable to track execution path. Making it work with multithreading + * isn't worth the effort as multithreaded tests add little to no value here. */ /* * Copyright The Mbed TLS Contributors @@ -47,7 +47,7 @@ static inline void mbedtls_codepath_reset(void) * * When a function returns with an error, it can do so before reaching any interesting codepath. The * same can happen if a parameter to the function is zero. In these cases we need to allow - * uninitialised value for the codepath tracking variable. + * the codepath tracking variable to still have its initial "not set" value. * * This macro expands to an instruction, not an expression. * It may jump to the \c exit label. @@ -70,7 +70,8 @@ static inline void mbedtls_codepath_reset(void) /** Check the codepath taken and fail if it doesn't match. * * When a function returns with an error, it can do so before reaching any interesting codepath. In - * this case we need to allow uninitialised value for the codepath tracking variable. + * this case we need to allow the codepath tracking variable to still have its + * initial "not set" value. * * This macro expands to an instruction, not an expression. * It may jump to the \c exit label. diff --git a/tf-psa-crypto/drivers/builtin/src/bignum_core.h b/tf-psa-crypto/drivers/builtin/src/bignum_core.h index da75546d51..484fa8c321 100644 --- a/tf-psa-crypto/drivers/builtin/src/bignum_core.h +++ b/tf-psa-crypto/drivers/builtin/src/bignum_core.h @@ -104,7 +104,7 @@ * } else { * // safe path * } - * not the other way round, in order to prevent misuse. (This is, if a value + * not the other way round, in order to prevent misuse. (That is, if a value * other than the two below is passed, default to the safe path.) * * The value of MBEDTLS_MPI_IS_PUBLIC is chosen in a way that is unlikely to happen by accident, but