Re: [PATCH 2/3] augment the testmgr code to set TEST_MODE flag on all rng instances

2009-09-16 Thread Neil Horman
patch 2/3: Update testmgr code to place any rng it tests in TEST_MODE

This patch instructs the testmgr code to place all rng allocations that it makes
into test mode, so that in the event that it has internal mechanisms that may
affect the testing of the RNG, they won't affect the outcome of the test they
are preforming.

Signed-off-by: Neil Horman nhor...@tuxdriver.com


 testmgr.c |2 ++
 1 file changed, 2 insertions(+)

diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index 6d5b746..89ea8c1 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -1470,6 +1470,8 @@ static int alg_test_cprng(const struct alg_test_desc 
*desc, const char *driver,
return PTR_ERR(rng);
}
 
+   crypto_rng_set_flags(rng, CRYPTO_RNG_TEST_MODE);
+
err = test_cprng(rng, desc-suite.cprng.vecs, desc-suite.cprng.count);
 
crypto_free_rng(rng);
--
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/3] augment the testmgr code to set TEST_MODE flag on all rng instances

2009-09-16 Thread Jarod Wilson

On 09/16/2009 12:13 PM, Neil Horman wrote:

patch 2/3: Update testmgr code to place any rng it tests in TEST_MODE

This patch instructs the testmgr code to place all rng allocations that it makes
into test mode, so that in the event that it has internal mechanisms that may
affect the testing of the RNG, they won't affect the outcome of the test they
are preforming.

Signed-off-by: Neil Hormannhor...@tuxdriver.com


With these same additions, my fips crypto test code arrives at expected 
results still as well.


Acked-by: Jarod Wilson ja...@redhat.com


--
Jarod Wilson
ja...@redhat.com
--
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html