From owner-svn-src-all@FreeBSD.ORG Thu Jan 19 20:30:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A129C106564A for ; Thu, 19 Jan 2012 20:30:14 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from gromit.grondar.org (grandfather.grondar.org [IPv6:2a01:348:0:15:5d59:5c20:0:2]) by mx1.freebsd.org (Postfix) with ESMTP id 3BDD18FC16 for ; Thu, 19 Jan 2012 20:30:14 +0000 (UTC) Received: from uucp by gromit.grondar.org with local-rmail (Exim 4.76 (FreeBSD)) (envelope-from ) id 1Rny4h-000CXk-7Z for svn-src-all@freebsd.org; Thu, 19 Jan 2012 19:55:07 +0000 Received: from localhost ([127.0.0.1] helo=groundzero.grondar.org) by groundzero.grondar.org with esmtp (Exim 4.77 (FreeBSD)) (envelope-from ) id 1Rny2A-000C3x-O6; Thu, 19 Jan 2012 19:52:30 +0000 To: Andrey Chernov In-reply-to: <20120118061943.GA80874@vniz.net> References: <201201162018.q0GKIADK050161@svn.freebsd.org> <20120118061943.GA80874@vniz.net> From: Mark Murray Date: Thu, 19 Jan 2012 19:52:30 +0000 Message-Id: Cc: svn-src-head@FreeBSD.ORG, David Schultz , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG Subject: Re: svn commit: r230230 - head/sys/dev/random X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jan 2012 20:30:14 -0000 Andrey Chernov writes: > On Mon, Jan 16, 2012 at 08:18:10PM +0000, David Schultz wrote: > > Author: das > > Date: Mon Jan 16 20:18:10 2012 > > New Revision: 230230 > > URL: http://svn.freebsd.org/changeset/base/230230 > > > > Log: > > Generate a warning if the kernel's arc4random() is seeded with bogus entropy. > > While you are here, could you review/commit my patch to fix bad 31bit > arc4rand() seeding, please? > > --- yarrow.c.bak 2011-09-26 07:35:48.000000000 +0400 > +++ yarrow.c 2012-01-18 10:13:47.000000000 +0400 This is the wrong place for this; it may achieve the desired result, but the file is where the Yarrow algorithm is implepeneted; ARC4 reseeds are not a part of that, which makes this proposal a layering violation at best, and an unwarranted dependancy at worst. Look at the function random_yarrow_unblock(). Thats where yopu want to be doing this. This function is where the random device is unblocked once safely seeded. M -- Mark R V Murray Cert APS(Open) Dip Phys(Open) BSc Open(Open) BSc(Hons)(Open) Pi: 132511160