Removal of a pre-existing library interface
    Xin Li 
    delphij at delphij.net
       
    Fri Dec 13 05:32:40 UTC 2013
    
    
  
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
On 12/12/13, 9:26 PM, Peter Wemm wrote:
> On 12/12/13, 2:37 PM, Xin Li wrote:
>> Hi,
>> 
>> Recently, OpenBSD have moved from RC4 to ChaCha20 for their 
>> arc4random(3) family of functions and they have later removed a
>> few interfaces for good reasons.
>> 
>> On FreeBSD, we aim to maintain ABI stability so we can not
>> simply remove the interface; we can not remove it from -HEAD
>> because they are established by previous -STABLE branches, or we
>> would have to bump major number of shared libraries.  After
>> thinking about some other alternatives, I have created two dummy
>> (well, they also log the event) compatibility shims for these two
>> interfaces that gets removed from OpenBSD.
>> 
>> Is this a reasonable approach of handling changes like this?
> 
> If you wish to avoid a major bump and the symbols are versioned (as
> they are in libc), the one option is this:
> 
> rename function from arcfour_foo to arcfour_foo_compat and 
> _sym_compat(arcfour_foo, arcfour_foo_compat, FBSD_1.3);
> 
> That then provides a versioned symbol to satisfy runtime
> dependencies but will not allow new references.
> 
> We did this with the iconv stuff for early 10.x binaries that we
> didn't want to break but make sure there were no new unintended
> references.
Yes I know this.  Forgot to add the link in previous email.
https://github.com/delphij/freebsd/blob/featurefork/chacha20/lib/libc/gen/arc4random-compat.c
What I'm not clear is whether it's Okay to call syslog() in the context.
Cheers,
-----BEGIN PGP SIGNATURE-----
iQIcBAEBCgAGBQJSqpv1AAoJEJW2GBstM+nslRgP+gMfXWVCKM1o+RxWNxcVVNOi
NWiYcXiFuIwpY0fmtlmoEClG7Re1ZyPPkXQIec5pKMZHrl+KFnqLRdcrxOrgIMa6
1M2YtDRGno+NhkoOvD3ZhqhI1UEL5olpnpqq36Zcc+oe8Vk3H2hk8WNFbhuLpMef
5uidrCG7tGY6w7U2fBHNK0Fl0+GaTpRMB4AvJ+MzqIj65doY0rWbtBjAybWcdid/
kOQN7XTlueNnu54IMeeA0a8kO7oZq2YLeL9/gdocOYbRACnyoLBcoc2R18A+ldNU
CKsKS7BioXlpUG3K3UDCg6qSqmIm4RkSX5RlFfTLPJy7s7O4w8ppgL4L56BqbJAw
y8IbjQXqZhUH7kqCcWBwGXYyoK1+93SeoPuq3MAmzLhmIGnbTrUuuC/vZCQJXv0c
L0UEkZ5X5yXZqW3D5BOBru1Frp1nBXn7m02Cwl5T1BI5G+kcHonlxu3g0Vmj1CHB
paE2gBbXr8S0mmOBviT9Jx61Ph1tXmV9yysxqrCqMJDq1E1BFyNX+9W7sDZi43H7
6NmS17g+MfGbneyGhdRzxcaqgK+qQpa1EpTVQik+pSWnvckm1vwcOs/t6TRWOMaO
o/CLfO1plyJ8gggqO0kbfzVpTNEYC5QiHG0VtO5GIay2vgMT7ZYVUfnSLo0ZMklj
AFUqOvnhixhmTUXEXSFQ
=9nu1
-----END PGP SIGNATURE-----
    
    
More information about the freebsd-arch
mailing list