From owner-cvs-src-old@FreeBSD.ORG Sat Oct 24 04:56:46 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DD70106568F for ; Sat, 24 Oct 2009 04:56:46 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2B9A98FC14 for ; Sat, 24 Oct 2009 04:56:46 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n9O4ukKf033823 for ; Sat, 24 Oct 2009 04:56:46 GMT (envelope-from ru@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n9O4ukvZ033822 for cvs-src-old@freebsd.org; Sat, 24 Oct 2009 04:56:46 GMT (envelope-from ru@repoman.freebsd.org) Message-Id: <200910240456.n9O4ukvZ033822@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to ru@repoman.freebsd.org using -f From: Ruslan Ermilov Date: Sat, 24 Oct 2009 04:55:14 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: RELENG_8 Subject: cvs commit: src/sys/kern init_main.c stack_protector.c src/sys/sys kernel.h X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Oct 2009 04:56:46 -0000 ru 2009-10-24 04:55:14 UTC FreeBSD src repository Modified files: (Branch: RELENG_8) sys/kern init_main.c stack_protector.c sys/sys kernel.h Log: SVN rev 198434 on 2009-10-24 04:55:14Z by ru MFC r198295: Random number generator initialization cleanup: - Introduce new SI_SUB_RANDOM point in boot sequence to make it clear from where one may start using random(9). It should be as early as possible, so place it just after SI_SUB_CPU where we have some randomness on most platforms via get_cyclecount(). - Move stack protector initialization to be after SI_SUB_RANDOM as before this point we have no randomness at all. This fixes stack protector to actually protect stack with some random guard value instead of a well-known one. Note that this patch doesn't try to address arc4random(9) issues. With current code, it will be implicitly seeded by stack protector and hence will get the same entropy as random(9). It will be securely reseeded once /dev/random is feeded by some entropy from userland. Submitted by: Maxim Dounin Approved by: re (kib) Revision Changes Path 1.303.2.3 +13 -0 src/sys/kern/init_main.c 1.2.2.2 +1 -2 src/sys/kern/stack_protector.c 1.150.2.2 +1 -0 src/sys/sys/kernel.h