From owner-freebsd-arch@FreeBSD.ORG Fri Dec 13 05:32:40 2013 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 01185EFB for ; Fri, 13 Dec 2013 05:32:40 +0000 (UTC) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D46951282 for ; Fri, 13 Dec 2013 05:32:39 +0000 (UTC) Received: from delphij-macbook.local (c-67-188-85-47.hsd1.ca.comcast.net [67.188.85.47]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by anubis.delphij.net (Postfix) with ESMTPSA id 5503326488; Thu, 12 Dec 2013 21:32:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=delphij.net; s=anubis; t=1386912759; bh=AJsQj0VWHbft8ArP30SVHvQZeogSi4PKm9OHPcnjDfM=; h=Date:From:Reply-To:To:Subject:References:In-Reply-To; b=tImHu5Q/uZIkVxvkfKvGejOcEtWOxrhw+fsT0lGqH+5qOwRTt9NRnVpf7a+ssLDfl XGkrFWNtRLlaD/jhbxJfnH1datUUJ3qu/bvpeTVNGqqrSGSt00BQ0wy9kymINy1Th8 jsbGM5vWykytwScN87ZvaB0XLZdckgW4bKmSlx4k= Message-ID: <52AA9BF5.2080406@delphij.net> Date: Thu, 12 Dec 2013 21:32:37 -0800 From: Xin Li Organization: The FreeBSD Project MIME-Version: 1.0 To: Peter Wemm , freebsd-arch@freebsd.org Subject: Re: Removal of a pre-existing library interface References: <52AA3A95.9010904@delphij.net> <52AA9A7E.8030500@wemm.org> In-Reply-To: <52AA9A7E.8030500@wemm.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: d@delphij.net List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Dec 2013 05:32:40 -0000 -----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-----