2018-05-11 08:05:44

by Gilad Ben-Yossef

[permalink] [raw]
Subject: [PATCH] crypto: reorder paes test lexicographically

Due to a snafu "paes" testmgr tests were not ordered
lexicographically, which led to boot time warnings.
Reorder the tests as needed.

Fixes: a794d8d ("crypto: ccree - enable support for hardware keys")
Reported-by: Abdul Haleem <[email protected]>
Signed-off-by: Gilad Ben-Yossef <[email protected]>
---
crypto/testmgr.c | 44 ++++++++++++++++++++++----------------------
1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index c31da0f..b1b8ebb 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -3012,13 +3012,6 @@ static const struct alg_test_desc alg_test_descs[] = {
}
}
}, {
- /* Same as ecb(aes) except the key is stored in
- * hardware secure memory which we reference by index
- */
- .alg = "ecb(paes)",
- .test = alg_test_null,
- .fips_allowed = 1,
- }, {
.alg = "ecb(khazad)",
.test = alg_test_skcipher,
.suite = {
@@ -3028,6 +3021,13 @@ static const struct alg_test_desc alg_test_descs[] = {
}
}
}, {
+ /* Same as ecb(aes) except the key is stored in
+ * hardware secure memory which we reference by index
+ */
+ .alg = "ecb(paes)",
+ .test = alg_test_null,
+ .fips_allowed = 1,
+ }, {
.alg = "ecb(seed)",
.test = alg_test_skcipher,
.suite = {
@@ -3610,21 +3610,6 @@ static const struct alg_test_desc alg_test_descs[] = {
}
}
}, {
- /* Same as xts(aes) except the key is stored in
- * hardware secure memory which we reference by index
- */
- .alg = "xts(paes)",
- .test = alg_test_null,
- .fips_allowed = 1,
- }, {
- .alg = "xts4096(paes)",
- .test = alg_test_null,
- .fips_allowed = 1,
- }, {
- .alg = "xts512(paes)",
- .test = alg_test_null,
- .fips_allowed = 1,
- }, {
.alg = "xts(camellia)",
.test = alg_test_skcipher,
.suite = {
@@ -3643,6 +3628,13 @@ static const struct alg_test_desc alg_test_descs[] = {
}
}
}, {
+ /* Same as xts(aes) except the key is stored in
+ * hardware secure memory which we reference by index
+ */
+ .alg = "xts(paes)",
+ .test = alg_test_null,
+ .fips_allowed = 1,
+ }, {
.alg = "xts(serpent)",
.test = alg_test_skcipher,
.suite = {
@@ -3679,6 +3671,14 @@ static const struct alg_test_desc alg_test_descs[] = {
}
}
}, {
+ .alg = "xts4096(paes)",
+ .test = alg_test_null,
+ .fips_allowed = 1,
+ }, {
+ .alg = "xts512(paes)",
+ .test = alg_test_null,
+ .fips_allowed = 1,
+ }, {
.alg = "zlib-deflate",
.test = alg_test_comp,
.fips_allowed = 1,
--
2.7.4



2018-05-15 14:09:41

by Abdul Haleem

[permalink] [raw]
Subject: Re: [PATCH] crypto: reorder paes test lexicographically

On Fri, 2018-05-11 at 09:04 +0100, Gilad Ben-Yossef wrote:
> Due to a snafu "paes" testmgr tests were not ordered
> lexicographically, which led to boot time warnings.
> Reorder the tests as needed.
>
> Fixes: a794d8d ("crypto: ccree - enable support for hardware keys")
> Reported-by: Abdul Haleem <[email protected]>
> Signed-off-by: Gilad Ben-Yossef <[email protected]>
> ---
> crypto/testmgr.c | 44 ++++++++++++++++++++++----------------------
> 1 file changed, 22 insertions(+), 22 deletions(-)
>
> diff --git a/crypto/testmgr.c b/crypto/testmgr.c
> index c31da0f..b1b8ebb 100644
> --- a/crypto/testmgr.c
> +++ b/crypto/testmgr.c
> @@ -3012,13 +3012,6 @@ static const struct alg_test_desc alg_test_descs[] = {
> }
> }
> }, {
> - /* Same as ecb(aes) except the key is stored in
> - * hardware secure memory which we reference by index
> - */
> - .alg = "ecb(paes)",
> - .test = alg_test_null,
> - .fips_allowed = 1,
> - }, {
> .alg = "ecb(khazad)",
> .test = alg_test_skcipher,
> .suite = {
> @@ -3028,6 +3021,13 @@ static const struct alg_test_desc alg_test_descs[] = {
> }
> }
> }, {
> + /* Same as ecb(aes) except the key is stored in
> + * hardware secure memory which we reference by index
> + */
> + .alg = "ecb(paes)",
> + .test = alg_test_null,
> + .fips_allowed = 1,
> + }, {
> .alg = "ecb(seed)",
> .test = alg_test_skcipher,
> .suite = {
> @@ -3610,21 +3610,6 @@ static const struct alg_test_desc alg_test_descs[] = {
> }
> }
> }, {
> - /* Same as xts(aes) except the key is stored in
> - * hardware secure memory which we reference by index
> - */
> - .alg = "xts(paes)",
> - .test = alg_test_null,
> - .fips_allowed = 1,
> - }, {
> - .alg = "xts4096(paes)",
> - .test = alg_test_null,
> - .fips_allowed = 1,
> - }, {
> - .alg = "xts512(paes)",
> - .test = alg_test_null,
> - .fips_allowed = 1,
> - }, {
> .alg = "xts(camellia)",
> .test = alg_test_skcipher,
> .suite = {
> @@ -3643,6 +3628,13 @@ static const struct alg_test_desc alg_test_descs[] = {
> }
> }
> }, {
> + /* Same as xts(aes) except the key is stored in
> + * hardware secure memory which we reference by index
> + */
> + .alg = "xts(paes)",
> + .test = alg_test_null,
> + .fips_allowed = 1,
> + }, {
> .alg = "xts(serpent)",
> .test = alg_test_skcipher,
> .suite = {
> @@ -3679,6 +3671,14 @@ static const struct alg_test_desc alg_test_descs[] = {
> }
> }
> }, {
> + .alg = "xts4096(paes)",
> + .test = alg_test_null,
> + .fips_allowed = 1,
> + }, {
> + .alg = "xts512(paes)",
> + .test = alg_test_null,
> + .fips_allowed = 1,
> + }, {
> .alg = "zlib-deflate",
> .test = alg_test_comp,
> .fips_allowed = 1,


Gilad,

The given patch fixes the boot warnings.

Tested-by: Abdul Haleem <[email protected]>

Thanks for the fix.

--
Regard's

Abdul Haleem
IBM Linux Technology Centre




2018-05-17 08:14:52

by Corentin Labbe

[permalink] [raw]
Subject: Re: [PATCH] crypto: reorder paes test lexicographically

On Fri, May 11, 2018 at 09:04:06AM +0100, Gilad Ben-Yossef wrote:
> Due to a snafu "paes" testmgr tests were not ordered
> lexicographically, which led to boot time warnings.
> Reorder the tests as needed.
>
> Fixes: a794d8d ("crypto: ccree - enable support for hardware keys")
> Reported-by: Abdul Haleem <[email protected]>
> Signed-off-by: Gilad Ben-Yossef <[email protected]>

Tested-by: Corentin Labbe <[email protected]>

Thanks

2018-05-18 18:22:08

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH] crypto: reorder paes test lexicographically

On Fri, May 11, 2018 at 09:04:06AM +0100, Gilad Ben-Yossef wrote:
> Due to a snafu "paes" testmgr tests were not ordered
> lexicographically, which led to boot time warnings.
> Reorder the tests as needed.
>
> Fixes: a794d8d ("crypto: ccree - enable support for hardware keys")
> Reported-by: Abdul Haleem <[email protected]>
> Signed-off-by: Gilad Ben-Yossef <[email protected]>

Patch applied. Thanks.
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt