Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/lib/libkern Disable a DIAGNOSTIC test which causes kerne...



details:   https://anonhg.NetBSD.org/src/rev/78fd923452a1
branches:  trunk
changeset: 771637:78fd923452a1
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sun Nov 27 00:09:04 2011 +0000

description:
Disable a DIAGNOSTIC test which causes kernel stack overflow on all arm ports.

Boot failure is reported from several arm users (nonaka@, ryo@, and others),
and too large auto variable in arc4_randrekey() is pointed out by enami@.

diffstat:

 sys/lib/libkern/arc4random.c |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (37 lines):

diff -r f218df1414be -r 78fd923452a1 sys/lib/libkern/arc4random.c
--- a/sys/lib/libkern/arc4random.c      Sat Nov 26 23:42:27 2011 +0000
+++ b/sys/lib/libkern/arc4random.c      Sun Nov 27 00:09:04 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: arc4random.c,v 1.25 2011/11/26 14:04:20 enami Exp $    */
+/*     $NetBSD: arc4random.c,v 1.26 2011/11/27 00:09:04 tsutsui Exp $  */
 
 /*-
  * Copyright (c) 2002, 2011 The NetBSD Foundation, Inc.
@@ -134,9 +134,11 @@
        int n, ask_for_more = 0;
 #ifdef _KERNEL
 #ifdef DIAGNOSTIC
+#if 0  /* XXX rngtest_t is too large and could cause stack overflow */
        rngtest_t rt;
 #endif
 #endif
+#endif
 #if NRND > 0
        static int callback_pending;
        int r;
@@ -225,6 +227,7 @@
                arc4_numbytes = 0;
 #ifdef _KERNEL
 #ifdef DIAGNOSTIC
+#if 0  /* XXX rngtest_t is too large and could cause stack overflow */
                /*
                 * Perform the FIPS 140-2 statistical RNG test; warn if our
                 * output has such poor quality as to fail the test.
@@ -239,6 +242,7 @@
                }
 #endif
 #endif
+#endif
        }
        if (__predict_true(arc4_initialized)) {
                mutex_spin_exit(&arc4_mtx);



Home | Main Index | Thread Index | Old Index