From owner-svn-src-head@freebsd.org Wed Mar 21 14:24:42 2018 Return-Path: Delivered-To: svn-src-head@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 C2D2CF6BC46 for ; Wed, 21 Mar 2018 14:24:42 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from sonic313-33.consmr.mail.gq1.yahoo.com (sonic313-33.consmr.mail.gq1.yahoo.com [98.137.65.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4189871B84 for ; Wed, 21 Mar 2018 14:24:41 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1521642280; bh=MEc+TpRAnxj6q+MJD+5NNr+8DGh4JST9MIWmu5D5ZH0=; h=Subject:To:References:From:Date:In-Reply-To:From:Subject; b=D9Ug2hkcEZzGDdVrgjGkW9Cu7ElY6VRq8Bsls8vUQPShZT0kuBBzfzxguY65Bv7qkU3ntM8RtIfZMocCBXPCdpdAF4p11rWYSx4j9vJ3/QJ4iAnmtmtEQCPZbeAnrHGFQYjwYxvdgTPE2zSe9GbkDdVQRLDMUA5dK0DCXhnFX1IkBrXpnP4gUa1Rh0bQqYOj/jcoLE/VSdhiJuQjNg5r9TuD54h4FHfYH2K5BBiTAZnOHZEg5XpXTqEKOLlUlpMEoYlIj8rIXR1qYZuH+QZ1DRVGjCf22miKCeCg2CVLvFQBQrR4ImUgFEY0vev88csE8pplqreFhyRgJ7lHVr6dqg== X-YMail-OSG: Kj7p6gwVM1kkHyHqRajc95A7ClWYEQO29Wxr.WBVM5gvxdT43CbG6E8TzkFfhBg XDn9lZ1aA.uYI8jUvk4RunenaeyYRoyBCC95YK8QjAetR1rheOBQmYxn_NRgRb6JqjAsBWubJBIo J9RnItIxowGf19HmQlxYYSUlcO1LJ8GFokzeCGFIF3JFwfy2EXS4YdkuGxFONB9lguxtHW5JKXHs 5nynZrRXcvutQ6exI1z8klSCcPa2LsWkCQJd43S2U.o.jOuzd7jTEtiMqcErtMoJNaJPUYg5fTKn DLMZiuhEZT7BZZHkUaE7LyclEJ0voQPsZmxZ3KEipoJ3CitaWWe5cX0f8y_Fr8nvPhKe8aHjWJDG ONw_hb8MnZadXK4ZEC4E368tD7StX405nI3f2PQK7aZR.MIVuAo3Gj2ZtAaxsHIinhTk4wdgoYKQ CFaO_FO4id85ZW51cmBe05eDdMVbG6vXuSsvn.SjX6lLzZGcUKnqKcB._zFnoHOZpRSQl.Qrb_Hp U_422N8MnPg-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.gq1.yahoo.com with HTTP; Wed, 21 Mar 2018 14:24:40 +0000 Received: from 181.52.72.201 (EHLO [192.168.0.4]) ([181.52.72.201]) by smtp405.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID f4b106b0b1d5412ccabdd5406b065f37; Wed, 21 Mar 2018 14:14:30 +0000 (UTC) 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 To: Ian Lepore , Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201803210115.w2L1Fjt9084698@repo.freebsd.org> <1521596451.54965.39.camel@freebsd.org> From: Pedro Giffuni Organization: FreeBSD Project Message-ID: <10290d09-dc33-dae5-aeb8-2e8affb69f29@FreeBSD.org> Date: Wed, 21 Mar 2018 09:14:29 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <1521596451.54965.39.camel@freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Mar 2018 14:24:43 -0000 On 20/03/2018 20:40, Ian Lepore wrote: > 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. That appears to be the main use of getentropy() in OpenBSD. We should now obviate linux_getrandom() as well. Cheers, Pedro.