From owner-freebsd-hackers@freebsd.org Wed Aug 1 15:50:09 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90539106161B for ; Wed, 1 Aug 2018 15:50:09 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 412237A71E; Wed, 1 Aug 2018 15:50:09 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 8E50F5A9F17; Wed, 1 Aug 2018 15:50:08 +0000 (UTC) Date: Wed, 1 Aug 2018 15:50:08 +0000 From: Brooks Davis To: Mark Johnston Cc: Konstantin Belousov , freebsd-hackers@freebsd.org Subject: Re: COMPAT_43 users? Message-ID: <20180801155008.GC99632@spindle.one-eyed-alien.net> References: <20180731214920.GA95743@raichu> <20180801075512.GR40119@kib.kiev.ua> <20180801152853.GC97237@raichu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vGgW1X5XWziG23Ko" Content-Disposition: inline In-Reply-To: <20180801152853.GC97237@raichu> User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Aug 2018 15:50:09 -0000 --vGgW1X5XWziG23Ko Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 01, 2018 at 11:28:53AM -0400, Mark Johnston wrote: > On Wed, Aug 01, 2018 at 10:55:12AM +0300, Konstantin Belousov wrote: > > On Tue, Jul 31, 2018 at 05:49:20PM -0400, Mark Johnston wrote: > > > The COMPAT_43 kernel option, which enables syscall support for 4.3BSD > > > binaries, hasn't been enabled in the standard kernel configs for well > > > over a decade, and doesn't appear to be a dependency of any other ker= nel > > > features. Nonetheless, the kernel contains quite a bit of code to > > > support this option. Does anyone use it in modern versions of FreeBSD > > > or have any arguments for keeping it? > >=20 > > COMPAT_43 means two things, the third part is a.out image activator. > > First thing is the lcall $7.$0 syscall emulator, both on amd64 and > > (surprisingly) i386, after 4/4 split. Second thing is the syscalls > > compat shims. > >=20 > > Together, all three things allow to run pre-3.x binaries on the modern > > machines, including amd64. I think this is useful at least for 'waving > > the flag' about our ABI compatibility guarantees, and for the historic > > software reconstruction. I run 1.1.8 chroot and several old binaries > > sometimes, I know that bde does, and there was at least one more user > > some time ago. > >=20 > > What do you mean by a lot of code ? Syscall compats is relatively easy. > > lcall $7,$0 emulation is very non-trivial but tiny. I do maintain this > > code and do not want it to go away. >=20 > Thanks, fair enough. The question was prompted by seeing lots of > COMPAT_OLDSOCK ifdefs while working on some socket code. I've had to figure out the COMPAT_OLDSOCK stuff a couple times in the last few years. The way it's implementation is weird in that it seems to change the system wide socket behavior in a few cases. It might be a worthy endeavor to refactor this into alternate entry points for an a.out compat layer (it's also patently absurd that you can invoke (e.g.) cpuset_setdomain(2) from an a.out binary). -- Brooks --vGgW1X5XWziG23Ko Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJbYdavAAoJEKzQXbSebgfAupAH/2B/HkOtrcMzj245jdVg2A5U IM1zwupcID0u7UUjc1IWTPq0LKQSXtxzVcebdtiDHExHqbOATqmiRdYng9w+mUTA rIToBO00WPtPtZ04IMtRF/JIsyVl91hjgz9QBLJwEkNXEfLusu3BI/53seYLUGn5 m4/C4nNFJxN/8KUMnyUfAFZ7COdl+kPtTgO8Aq2B/Iusq1m4Qz+h4oieXVgvl34B ZYDH8l/BsDnzTcyBhpOsl1pyywS1kfI43g31YsCRyJl6EVY8rjkTckZAHxdCIP+Z jncPC/726ok3j7GdE3Zx1TDdF+N4JM9hP0+UH+KCRYRsA0e5uu6E1wksi4CUNmc= =ENNO -----END PGP SIGNATURE----- --vGgW1X5XWziG23Ko--