From owner-svn-src-all@freebsd.org Wed Mar 21 01:40:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A067EF5EB6E for ; Wed, 21 Mar 2018 01:40:55 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E80D74F3A for ; Wed, 21 Mar 2018 01:40:55 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: bf2f9271-2ca8-11e8-b951-f99fef315fd9 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id bf2f9271-2ca8-11e8-b951-f99fef315fd9; Wed, 21 Mar 2018 01:39:51 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w2L1epIj041495; Tue, 20 Mar 2018 19:40:51 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1521596451.54965.39.camel@freebsd.org> Subject: Re: svn commit: r331279 - in head: include lib/libc/gen lib/libc/sys lib/libc/tests/gen sys/compat/freebsd32 sys/conf sys/kern sys/sys tests/sys/kern usr.bin/truss From: Ian Lepore To: Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Tue, 20 Mar 2018 19:40:51 -0600 In-Reply-To: <201803210115.w2L1Fjt9084698@repo.freebsd.org> References: <201803210115.w2L1Fjt9084698@repo.freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 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: Wed, 21 Mar 2018 01:40:55 -0000 On Wed, 2018-03-21 at 01:15 +0000, Conrad Meyer wrote: > Author: cem > Date: Wed Mar 21 01:15:45 2018 > New Revision: 331279 > URL: https://svnweb.freebsd.org/changeset/base/331279 > > Log: >   Implement getrandom(2) and getentropy(3) >    >   The general idea here is to provide userspace programs with well- > defined >   sources of entropy, in a fashion that doesn't require opening a new > file >   descriptor (ulimits) or accessing paths (/dev/urandom may be > restricted >   by chroot or capsicum). >    >   getrandom(2) is the more general API, and comes from the Linux > world. >   Since our urandom and random devices are identical, the GRND_RANDOM > flag >   is ignored. >    >   getentropy(3) is added as a compatibility shim for the OpenBSD API. >    >   truss(1) support is included. >    >   Tests for both system calls are provided.  Coverage is believed to > be at >   least as comprehensive as LTP getrandom(2) test > coverage.  Additionally, >   instructions for running the LTP tests directly against FreeBSD are > provided >   in the "Test Plan" section of the Differential revision linked > below.  (They >   pass, of course.) >    >   PR: 194204 >   Reported by: David CARLIER hardenedbsd.org> >   Discussed with: cperciva, delphij, jhb, markj >   Relnotes: maybe >   Differential Revision: https://reviews.freebsd.org/D14500 > A good followup to this might be to switch libc's arc4random seeding to getrandom(), instead of using a sysctl in a loop. -- Ian