NetBSD/lib
riastradh bdad8b2721 New system call getrandom() compatible with Linux and others.
Three ways to call:

getrandom(p, n, 0)              Blocks at boot until full entropy.
                                Returns up to n bytes at p; guarantees
                                up to 256 bytes even if interrupted
                                after blocking.  getrandom(0,0,0)
                                serves as an entropy barrier: return
                                only after system has full entropy.

getrandom(p, n, GRND_INSECURE)  Never blocks.  Guarantees up to 256
                                bytes even if interrupted.  Equivalent
                                to /dev/urandom.  Safe only after
                                successful getrandom(...,0),
                                getrandom(...,GRND_RANDOM), or read
                                from /dev/random.

getrandom(p, n, GRND_RANDOM)    May block at any time.  Returns up to n
                                bytes at p, but no guarantees about how
                                many -- may return as short as 1 byte.
                                Equivalent to /dev/random.  Legacy.
                                Provided only for source compatibility
                                with Linux.

Can also use flags|GRND_NONBLOCK to fail with EWOULDBLOCK/EAGAIN
without producing any output instead of blocking.

- The combination GRND_INSECURE|GRND_NONBLOCK is the same as
  GRND_INSECURE, since GRND_INSECURE never blocks anyway.

- The combinations GRND_INSECURE|GRND_RANDOM and
  GRND_INSECURE|GRND_RANDOM|GRND_NONBLOCK are nonsensical and fail
  with EINVAL.

As proposed on tech-userlevel, tech-crypto, tech-security, and
tech-kern, and subsequently adopted by core (minus the getentropy part
of the proposal, because other operating systems and participants in
the discussion couldn't come to an agreement about getentropy and
blocking semantics):

https://mail-index.netbsd.org/tech-userlevel/2020/05/02/msg012333.html
2020-08-14 00:53:15 +00:00
..
csu Explicitly use -fcommon for globals shared between libc and CSU. 2020-04-22 23:32:25 +00:00
i18n_module
libarch
libbluetooth
libbpfjit
libbsdmalloc
libbz2
libc New system call getrandom() compatible with Linux and others. 2020-08-14 00:53:15 +00:00
libc_fp
libc_vfp
libcompat
libcrypt Remove extra semicolon. 2020-05-14 08:34:17 +00:00
libcurses newwin - fix crash with negative ncols. 2020-07-14 04:39:39 +00:00
libdm Update for proplib(3) API changes. 2020-06-07 05:54:00 +00:00
libedit Fix numeric variable handling in settc (lyzliyuzhi at 163 dot com) 2020-07-10 20:34:24 +00:00
libexecinfo If Unwind_Backtrace is broken, ctx.n will still contain ~0, and we will 2020-07-26 15:53:05 +00:00
libform terminfo: promote numeric parameters from short to int 2020-03-13 15:19:24 +00:00
libintl
libipsec
libisns
libkern
libkvm Cast off_t to size_t to appease lint: 2020-05-02 14:31:13 +00:00
liblwres
libm Provide frexpl on non-long-double systems as alias to frexp. 2020-01-30 20:31:50 +00:00
libmenu terminfo: promote numeric parameters from short to int 2020-03-13 15:19:24 +00:00
libnpf Major NPF improvements (merge from upstream): 2020-05-30 14:16:56 +00:00
libnvmm Reference nvmmctl(8). 2020-02-09 12:19:01 +00:00
libossaudio ossaudio: removed outdated comment 2020-04-20 12:01:44 +00:00
libp2k UVM locking changes, proposed on tech-kern: 2020-02-23 15:46:38 +00:00
libpam lib/libpam: Fix the possible -Werror=stringop-truncation 2020-06-12 01:20:32 +00:00
libpanel terminfo: promote numeric parameters from short to int 2020-03-13 15:19:24 +00:00
libpci
libperfuse miscelaneous -> miscellaneous in comment. 2020-03-05 15:56:20 +00:00
libposix
libppath
libprop Improvements to the problib(3) API: 2020-06-06 21:25:59 +00:00
libpthread s/reseting/resetting/ 2020-07-22 01:24:39 +00:00
libpuffs s/conjuction/conjunction/ 2019-12-27 10:13:59 +00:00
libquota
libradius
librefuse
libresolv
librmt s/transfered/transferred/ 2019-12-27 09:41:48 +00:00
librpcsvc
librt
librump
librumpclient
librumpdev
librumphijack Add pathconf and lpathconf (fixes lib/librumphijack/nfs test which uses ls 2020-05-27 18:55:36 +00:00
librumpnet
librumpres
librumpuser Fix incompatible function pointer casts 2020-06-13 16:51:59 +00:00
librumpvfs
libskey
libss
libtelnet
libterminfo libterminfo: cast to uint16/32_t before conversion to preserve negativity 2020-06-21 15:05:23 +00:00
libukfs
libusbhid lib/libusbhid: Fix possible left shift changes signedness bit. 2020-04-04 21:26:16 +00:00
libutil Fix grammar. 2020-07-30 21:23:36 +00:00
libwrap PR/54992: fix hosts_access(5) to works for IPv6 linklocal address without scope-id 2020-03-30 08:34:38 +00:00
liby
libz
lua
npf
bumpversion
checkoldver
checkver
checkvers
Makefile Rename blacklist -> blocklist 2020-06-15 01:57:29 +00:00
Makefile.inc