freebsd-skq/lib/libc
Conrad Meyer e9ac27430c 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 <david.carlier AT hardenedbsd.org>
Discussed with:	cperciva, delphij, jhb, markj
Relnotes:	maybe
Differential Revision:	https://reviews.freebsd.org/D14500
2018-03-21 01:15:45 +00:00
..
aarch64 Decrease relative branch brittleness. 2017-06-20 07:25:38 +00:00
amd64 libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
arm Move softfloat symbol map entries to softfloat/Symbol.map. 2018-03-05 20:51:23 +00:00
capability Replace dot-dot relative pathing with SRCTOP-relative paths where possible 2017-01-20 03:23:24 +00:00
compat-43 General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
db libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
gdtoa libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
gen Implement getrandom(2) and getentropy(3) 2018-03-21 01:15:45 +00:00
gmon General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
i386 Remove bogus checks against NCARGS. 2018-01-31 17:57:59 +00:00
iconv libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
include lib: Fix several typos and minor errors 2017-12-27 03:23:41 +00:00
inet SPDX: license IDs for some ISC-related files. 2017-12-08 15:57:29 +00:00
isc SPDX: more ISC-related files. 2017-12-08 17:52:53 +00:00
locale libc/locale: fix an off-by-one in newlocale 2017-12-29 14:56:46 +00:00
md Replace dot-dot relative pathing with SRCTOP-relative paths where possible 2017-01-20 03:23:24 +00:00
mips Move softfloat symbol map entries to softfloat/Symbol.map. 2018-03-05 20:51:23 +00:00
nameser SPDX: license IDs for some ISC-related files. 2017-12-08 15:57:29 +00:00
net Make getnameinfo(3) salen requirement less strict and 2018-03-15 13:46:28 +00:00
nls Use current locale (f.e. set by thread). It was global locale always 2016-08-24 16:44:27 +00:00
posix1e libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
powerpc Remove bogus checks against NCARGS. 2018-01-31 17:57:59 +00:00
powerpc64 Remove bogus checks against NCARGS. 2018-01-31 17:57:59 +00:00
powerpcspe Correct an misunderstanding of MDSRCS. 2017-03-02 17:07:28 +00:00
quad General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
regex Add missing patch from r328240 2018-01-22 02:58:33 +00:00
resolv SPDX: license IDs for some ISC-related files. 2017-12-08 15:57:29 +00:00
riscv Move softfloat symbol map entries to softfloat/Symbol.map. 2018-03-05 20:51:23 +00:00
rpc des_crypt.3: Fix typo. 2018-03-07 09:31:27 +00:00
secure libc: do not include <sys/types.h> where <sys/param.h> was already included 2016-04-18 21:05:15 +00:00
softfloat Move softfloat symbol map entries to softfloat/Symbol.map. 2018-03-05 20:51:23 +00:00
sparc64 o Let rtld(1) set up psABI user trap handlers prior to executing the 2018-02-03 23:14:11 +00:00
stdio __printf_render_int(): small type change to match use. 2018-02-23 01:11:57 +00:00
stdlib Use standard 2-clause license where copyright is held by the FreeBSD Foundation 2018-02-02 16:47:32 +00:00
stdtime libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
string Document memset_s(3). memset_s(3) is defined in 2018-02-16 05:48:45 +00:00
sys Implement getrandom(2) and getentropy(3) 2018-03-21 01:15:45 +00:00
tests Implement getrandom(2) and getentropy(3) 2018-03-21 01:15:45 +00:00
uuid libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
x86/sys Fix a regression in r321608. 2017-08-13 14:42:23 +00:00
xdr General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
yp libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
libc_nossp.ldscript Add different libc ldscript: the one without libssp -- 2016-10-12 13:19:21 +00:00
libc.ldscript
Makefile Support armv7 builds for userland 2017-10-05 23:01:33 +00:00
Makefile.depend DIRDEPS_BUILD: Regenerate without local dependencies. 2016-02-24 17:20:11 +00:00
Versions.def Create namespace for the symbols added during 12-CURRENT cycle. 2016-08-06 13:28:58 +00:00