freebsd-nq/tests/sys/kern
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
..
acct DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
execve DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
pipe DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
coredump_phnum_helper.c Add test case for >65535 segment coredumps 2016-11-01 19:18:16 +00:00
coredump_phnum_test.sh Make test scripts under tests/... non-executable 2017-08-08 04:59:16 +00:00
kern_copyin.c Fix comment. We have different VM layout on MIPS, so test is skipped. 2016-10-18 10:20:58 +00:00
kern_descrip_test.c kern_descrip_test: Fix trivial buffer overrun with readlink(2) 2016-05-12 03:44:29 +00:00
libkern_crc32.c armv8 has support for optional CRC32C instructions. This patch checks if they are 2017-04-27 17:53:05 +00:00
Makefile Implement getrandom(2) and getentropy(3) 2018-03-21 01:15:45 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
Makefile.inc Add include Makefiles for tests/sys/{fs,kern,kqueue,mac}/... 2017-01-14 20:21:21 +00:00
ptrace_test.c Mark the unused argument to continue_thread() as such. 2018-01-24 17:46:20 +00:00
reaper.c reaper: Make REAPER_KILL_SUBTREE actually work. 2016-12-14 22:49:20 +00:00
sys_getrandom.c Implement getrandom(2) and getentropy(3) 2018-03-21 01:15:45 +00:00
unix_passfd_test.c Rename recvfd and sendfd variables in recvfd/sendfd functions to avoid 2015-12-30 18:13:43 +00:00
unix_seqpacket_test.c Send all of data, not just a portion of it 2017-05-28 09:21:28 +00:00
waitpid_nohang.c wait: Do not copyout uninitialized status/rusage/wrusage. 2016-09-09 21:58:48 +00:00