Module Name: src
Committed By: christos
Date: Wed Nov 19 14:25:01 UTC 2014
Modified Files:
src/sys/kern: subr_cprng.c
Log Message:
Change debug to diagnostic so that more people see the lossage with bad
random streams, so we can debug it.
To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/kern/subr_cprng.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/subr_cprng.c
diff -u src/sys/kern/subr_cprng.c:1.25 src/sys/kern/subr_cprng.c:1.26
--- src/sys/kern/subr_cprng.c:1.25 Thu Aug 14 12:28:30 2014
+++ src/sys/kern/subr_cprng.c Wed Nov 19 09:25:00 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_cprng.c,v 1.25 2014/08/14 16:28:30 riastradh Exp $ */
+/* $NetBSD: subr_cprng.c,v 1.26 2014/11/19 14:25:00 christos Exp $ */
/*-
* Copyright (c) 2011-2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_cprng.c,v 1.25 2014/08/14 16:28:30 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_cprng.c,v 1.26 2014/11/19 14:25:00 christos Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -50,7 +50,7 @@ __KERNEL_RCSID(0, "$NetBSD: subr_cprng.c
#include <sys/sysctl.h>
#include <sys/rnd.h>
#include <sys/rndsink.h>
-#if DEBUG
+#if DIAGNOSTIC
#include <sys/rngtest.h>
#endif
@@ -67,7 +67,7 @@ static void cprng_strong_generate(struct
static void cprng_strong_reseed(struct cprng_strong *);
static void cprng_strong_reseed_from(struct cprng_strong *, const void *,
size_t, bool);
-#if DEBUG
+#if DIAGNOSTIC
static void cprng_strong_rngtest(struct cprng_strong *);
#endif
@@ -447,12 +447,12 @@ cprng_strong_reseed_from(struct cprng_st
/* XXX Fix nist_ctr_drbg API so this can't happen. */
panic("cprng %s: NIST CTR_DRBG reseed failed", cprng->cs_name);
-#if DEBUG
+#if DIAGNOSTIC
cprng_strong_rngtest(cprng);
#endif
}
-#if DEBUG
+#if DIAGNOSTIC
/*
* Generate some output and apply a statistical RNG test to it.
*/