Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Aug 2018 16:50:26 +0000
From:      Brooks Davis <brooks@freebsd.org>
To:        "Rodney W. Grimes" <freebsd-rwg@pdx.rh.CN85.dnsmgr.net>
Cc:        Mark Johnston <markj@freebsd.org>, Konstantin Belousov <kostikbel@gmail.com>, freebsd-hackers@freebsd.org
Subject:   Re: COMPAT_43 users?
Message-ID:  <20180801165026.GD99632@spindle.one-eyed-alien.net>
In-Reply-To: <201808011611.w71GB29F077911@pdx.rh.CN85.dnsmgr.net>
References:  <20180801155008.GC99632@spindle.one-eyed-alien.net> <201808011611.w71GB29F077911@pdx.rh.CN85.dnsmgr.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--HG+GLK89HZ1zG0kk
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Aug 01, 2018 at 09:11:02AM -0700, Rodney W. Grimes wrote:
> > 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=
 kernel
> > > > > features.  Nonetheless, the kernel contains quite a bit of code to
> > > > > support this option.  Does anyone use it in modern versions of Fr=
eeBSD
> > > > > 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 mod=
ern
> > > > machines, including amd64. I think this is useful at least for 'wav=
ing
> > > > the flag' about our ABI compatibility guarantees, and for the histo=
ric
> > > > 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 us=
er
> > > > 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.
> >=20
> > 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).
>=20
> I do not see what that would be absurd, a.out is a binary executable
> format, nothing should stop me from doing anything from an a.out that
> I can do from a elf.  NOT being able to invoke foo(2) just because
> the binary was compiled to a.out would be absurd.

It's absurd because there is no sensible, supported path to create new
a.out binaries targeting FreeBSD 12.  IMO it would be better to limit
a.out support to syscalls supported by releases where a.out was
supported.

-- Brooks

--HG+GLK89HZ1zG0kk
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEcBAEBAgAGBQJbYeTSAAoJEKzQXbSebgfAufsH/j7y1XQwp8Od/iufYaovMG3W
RgDVmqFoKRPORHO76wVO0zSh4X/mXbjaMaCU14ANPMVSyDeUNHmjrY9HHopedt7m
78CqTKTUNZoM+g9xakL4eDk0tZNhqOsjrUJzX0kxg42NlG5/PpmS9QinktsqUC3Y
c+J9SVKNRP6VsZUxFgHIzYigR38RTBOIcVw5Fg99lRC65mex2PdWkbXvZO8k32cj
QGV1uoDs7DKbyvbPAs/cQYpp7DHzX+5oqyNb3FWKbyYzwUOOQZYC8HwG2AXICXan
tp3KPvJVvTGkJRSlVvFuzeDAzhUjoYPAoV6gwHUz8u7lj2t0DSLodMR/CJFXJ0E=
=gfNq
-----END PGP SIGNATURE-----

--HG+GLK89HZ1zG0kk--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180801165026.GD99632>