On 8/19/18 11:27, Ian Lepore wrote:
> On Sun, 2018-08-19 at 17:40 +0000, Xin LI wrote:
>> Author: delphij
>> Date: Sun Aug 19 17:40:50 2018
>> New Revision: 338059
>> URL: https://svnweb.freebsd.org/changeset/base/338059
>>
>> Log:
>>   Update userland arc4random() with OpenBSD's Chacha20 based
>> arc4random().
>>   
>>     ObsoleteFiles.inc:
>>   
>>       Remove manual pages for arc4random_addrandom(3) and
>>       arc4random_stir(3).
>>   
>>     contrib/ntp/lib/isc/random.c:
>>     contrib/ntp/sntp/libevent/evutil_rand.c:
>>   
>>       Eliminate in-tree usage of arc4random_addrandom().
>>   
> 
> If we don't feed changes for this back upstream, we're going to have to

I'll send these to upstream.

> carry diffs from mainline ntpd forever now. The upstream project is
> receptive to taking diffs from us, but I guess we'd have to figure out
> how to write some autotools detection to create some new HAVE_xxxx
> variables for wrapping these calls.

Calling arc4random_stir() is not required since ~2000.

> Also, does this imply that the ntpd port will fail to build now? I
> would imagine removing such fundamental routines would affect many
> ports.

Not right now (due to the existence of stdlib.h shims).

> All in all, if it's just a matter of our implementation not needing
> these functions, wouldn't it be better to implement them as no-ops and
> document them as such existing only to aid porting existing code?

They are implemented as ABI shims but my intention (bug 230756) is to
remove the obsolete APIs (after a full exprun and have the callers
fixed, of course).  It's reasonable to provide ABI compatibility (they
will remain) but we should fix ports if they are still doing something
that is not needed ~18 years ago :)

Cheers,

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to