Removal of a pre-existing library interface

Peter Wemm peter at wemm.org
Fri Dec 13 05:26:24 UTC 2013


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.

-- 
Peter Wemm - peter at wemm.org; peter at FreeBSD.org; peter at yahoo-inc.com; KI6FJV
UTF-8: for when a ' just won\342\200\231t do.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20131212/3afb0cf0/attachment.sig>


More information about the freebsd-arch mailing list