2012-11-19 19:45:51

by Milan Broz

[permalink] [raw]
Subject: [PATCH] crypto: allow compression algs in fips mode

When in fips mode, compression algoritms fails to initialize,
e.g. modprobe ubifs returns
UBIFS error: compr_init: cannot initialize compressor lzo, error -2

FIPS mode should not care about compression algoritms at all.

Patch just set fips_enabled flag to 1 to all compression algorithms
managed by testmgr.

Signed-off-by: Milan Broz <[email protected]>
---
crypto/testmgr.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index 941d75c..02bc58f 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -2383,6 +2383,7 @@ static const struct alg_test_desc alg_test_descs[] = {
}, {
.alg = "deflate",
.test = alg_test_comp,
+ .fips_allowed = 1,
.suite = {
.comp = {
.comp = {
@@ -2859,6 +2860,7 @@ static const struct alg_test_desc alg_test_descs[] = {
}, {
.alg = "lzo",
.test = alg_test_comp,
+ .fips_allowed = 1,
.suite = {
.comp = {
.comp = {
@@ -3226,6 +3228,7 @@ static const struct alg_test_desc alg_test_descs[] = {
}, {
.alg = "zlib",
.test = alg_test_pcomp,
+ .fips_allowed = 1,
.suite = {
.pcomp = {
.comp = {
--
1.7.10.4


2012-12-06 09:20:16

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH] crypto: allow compression algs in fips mode

On Mon, Nov 19, 2012 at 07:45:40PM +0000, Milan Broz wrote:
> When in fips mode, compression algoritms fails to initialize,
> e.g. modprobe ubifs returns
> UBIFS error: compr_init: cannot initialize compressor lzo, error -2
>
> FIPS mode should not care about compression algoritms at all.
>
> Patch just set fips_enabled flag to 1 to all compression algorithms
> managed by testmgr.
>
> Signed-off-by: Milan Broz <[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