From owner-freebsd-current@FreeBSD.ORG Tue Nov 15 05:49:31 2011 Return-Path: Delivered-To: current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35CE81065774; Tue, 15 Nov 2011 05:49:30 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id ADDED8FC13; Tue, 15 Nov 2011 05:49:30 +0000 (UTC) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.5/8.14.2) with ESMTP id pAF5nU8P096037; Tue, 15 Nov 2011 00:49:30 -0500 (EST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.5/8.14.2/Submit) id pAF5nT6C096036; Tue, 15 Nov 2011 00:49:29 -0500 (EST) (envelope-from das@FreeBSD.ORG) Date: Tue, 15 Nov 2011 00:49:29 -0500 From: David Schultz To: Andrey Chernov , Oliver Pinter , current@FreeBSD.ORG, secteam@FreeBSD.ORG Message-ID: <20111115054929.GA27803@zim.MIT.EDU> Mail-Followup-To: Andrey Chernov , Oliver Pinter , current@FreeBSD.ORG, secteam@FreeBSD.ORG References: <20111112154135.GA21512@zim.MIT.EDU> <20111112171531.GA83419@vniz.net> <20111114013004.GA53392@zim.MIT.EDU> <20111114192721.GA16834@vniz.net> <20111114205855.GB58790@zim.MIT.EDU> <20111114212926.GA28783@vniz.net> <20111114230855.GA59545@zim.MIT.EDU> <20111115004443.GA50429@vniz.net> <20111115023912.GA68523@vniz.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111115023912.GA68523@vniz.net> Cc: Subject: Re: Is fork() hook ever possible? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Nov 2011 05:49:31 -0000 On Tue, Nov 15, 2011, Andrey Chernov wrote: > In case you mean passing later whole structure like: > > arc4_addrandom((u_char *)&rdat, sizeof(rdat)); > > it will be incorrect because it change known algorithm parameters, which > defines exact 128 bytes and not anything else. No, RC4 keys are anything up to 256 bytes. I think what you really want is a union in any case, but relax. arc4_stir() works right now, so I think it can stay as is until we're ready to make further functional changes, e.g., getting entropy from the KERN_ARND sysctl. But that's complicated by the fact that KERN_ARND won't tell you if it has failed to produce any useful entropy, and I won't have the cycles to look into it for a little while.