From c96230f5a55561af44fc1b38c4b70fa703d70ed4 Mon Sep 17 00:00:00 2001 From: Neil Horman Date: Thu, 5 Feb 2009 16:01:38 +1100 Subject: [PATCH] --- yaml --- r: 132690 b: refs/heads/master c: c5b1e545a567c52081239bd5d187669640d0146f h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/crypto/ansi_cprng.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 23ac3a1dc4fe..212c03167226 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 563f346d04e8373739240604a51ce8529dd9f07e +refs/heads/master: c5b1e545a567c52081239bd5d187669640d0146f diff --git a/trunk/crypto/ansi_cprng.c b/trunk/crypto/ansi_cprng.c index 74478061ac0c..d80ed4c1e009 100644 --- a/trunk/crypto/ansi_cprng.c +++ b/trunk/crypto/ansi_cprng.c @@ -132,9 +132,15 @@ static int _get_more_prng_bytes(struct prng_context *ctx) */ if (!memcmp(ctx->rand_data, ctx->last_rand_data, DEFAULT_BLK_SZ)) { + if (fips_enabled) { + panic("cprng %p Failed repetition check!\n", + ctx); + } + printk(KERN_ERR "ctx %p Failed repetition check!\n", ctx); + ctx->flags |= PRNG_NEED_RESET; return -EINVAL; }