Misc improvements to comments

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
Manuel Pégourié-Gonnard 2024-09-03 10:10:18 +02:00
parent 9ec6d45e99
commit 15fa9ceedd
2 changed files with 6 additions and 5 deletions

View File

@ -104,7 +104,7 @@
* } else { * } else {
* // safe path * // 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.) * 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 * The value of MBEDTLS_MPI_IS_PUBLIC is chosen in a way that is unlikely to happen by accident, but

View File

@ -6,8 +6,8 @@
* - MBEDTLS_MPI_IS_SECRET: Only safe paths were teken since the last reset * - 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 * - 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 * Use 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. * isn't worth the effort as multithreaded tests add little to no value here.
*/ */
/* /*
* Copyright The Mbed TLS Contributors * 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 * 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 * 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. * This macro expands to an instruction, not an expression.
* It may jump to the \c exit label. * 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. /** 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 * 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. * This macro expands to an instruction, not an expression.
* It may jump to the \c exit label. * It may jump to the \c exit label.