diff options
author | Robert Elliott <elliott@hpe.com> | 2022-09-30 16:40:14 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2022-10-21 19:15:35 +0800 |
commit | 753defbc8745e6596c232113f146a99fcca4abb1 (patch) | |
tree | 732516b749fd602d815a01418e0cfe9cd9736df6 /crypto/poly1305_generic.c | |
parent | 1acc615fc08c8c75da1de6d0b50f18e781045931 (diff) | |
download | linux-crypto-753defbc8745e6596c232113f146a99fcca4abb1.tar.gz linux-crypto-753defbc8745e6596c232113f146a99fcca4abb1.zip |
crypto: tcrypt - fix return value for multiple subtests
When a test mode invokes multiple tests (e.g., mode 0 invokes modes
1 through 199, and mode 3 tests three block cipher modes with des),
don't keep accumulating the return values with ret += tcrypt_test(),
which results in a bogus value if more than one report a nonzero
value (e.g., two reporting -2 (-ENOENT) end up reporting -4 (-EINTR)).
Instead, keep track of the minimum return value reported by any
subtest.
Fixes: 609c8a2babaf ("crypto: tcrypt - Do not exit on success in fips mode")
Signed-off-by: Robert Elliott <elliott@hpe.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/poly1305_generic.c')
0 files changed, 0 insertions, 0 deletions