From owner-freebsd-current@FreeBSD.ORG Sun Dec 4 20:25:32 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B642106566B for ; Sun, 4 Dec 2011 20:25:32 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id AD4E18FC0C for ; Sun, 4 Dec 2011 20:25:31 +0000 (UTC) Received: from alf.home (alf.kiev.zoral.com.ua [10.1.1.177]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id pB4KPJvs056102 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 4 Dec 2011 22:25:19 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from alf.home (kostik@localhost [127.0.0.1]) by alf.home (8.14.5/8.14.5) with ESMTP id pB4KPJBt099456; Sun, 4 Dec 2011 22:25:19 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by alf.home (8.14.5/8.14.5/Submit) id pB4KPJwU099455; Sun, 4 Dec 2011 22:25:19 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: alf.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 4 Dec 2011 22:25:19 +0200 From: Kostik Belousov To: Yamagi Burmeister Message-ID: <20111204202519.GL50300@deviant.kiev.zoral.com.ua> References: <4C2E2BFD.1030204@elischer.org> <20100702184426.GW13238@deviant.kiev.zoral.com.ua> <20111204205427.f0989300.lists@yamagi.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Ob1se4syEfB7Ey0C" Content-Disposition: inline In-Reply-To: <20111204205427.f0989300.lists@yamagi.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-current@freebsd.org, julian@elischer.org Subject: Re: running old binaries on -current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Dec 2011 20:25:32 -0000 --Ob1se4syEfB7Ey0C Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Dec 04, 2011 at 08:54:27PM +0100, Yamagi Burmeister wrote: > On Fri, 2 Jul 2010 21:44:26 +0300 > Kostik Belousov wrote: >=20 > > On Fri, Jul 02, 2010 at 11:12:13AM -0700, Julian Elischer wrote: > > > every now and then, for fun I run up a chroot of freebsd 1.1. or 1.0= =20 > > > under a chroot. Usually hillarity ensues with teh 15 second kernel= =20 > > > compile and the 4 minute make world. > > >=20 > > > in -current I can't do that any more.. any binary just exits with 'Ab= ort'. > > >=20 > > > I think I last tried it in 7.0 or there abouts. > > >=20 > > > I have options COMPAT_AOUT and COMPAT_FREEBSD4 through COMPAT_FREEBSD7 > > >=20 > > > does anyone else have any ideas as to what may be needed? > > >=20 > > > I vaguely remember another option but I am not seeing it at the momen= t. > > >=20 > > > For those of you who do not remember, 1.0 had a.out static binaries o= nly. > > >=20 > >=20 > > Can you ktrace/kdump the run attempt, I suspect that abort is > > sent by image activator. > >=20 > > Also, please put some static binary somewhere to download. >=20 > Hi, > digging around I found one of the first programs ever written. It's an > static aout binary from 1994 or so, running it on FreeBSD 8.2 shows > exactly this problem. Some more extensive tests narrowed this problem > down to FreeBSD 1.x binaries, they're all broken. FreeBSD 2 aout > binaries are still working.=20 > Since Google found this rather old thread I decided to provide the data > your requested, but I do not insist on a fix. I guess that nobody will > try to run FreeBSD 1.x binaries these day... So if you want to spend > some work on this I'll test patches but if you decide to do nothing > it's okay. >=20 > This is the /bin/sh of FreeBSD 1.0 (taken from the official > installation cd image f?r i386): >=20 > % file sh > sh: VAX demand paged pure executable >=20 > % ./sh > Abort >=20 > The ktrace / kdump: > 1065 ktrace RET ktrace 0 > 1065 ktrace CALL execve(0xbfbfee1b,0xbfbfecf8,0xbfbfed00) > 1065 ktrace NAMI "./sh" >=20 > I've uploaded the binary to: > http://deponie.yamagi.org/freebsd/tmp/sh_freebsd1 Try to set sysctl security.bsd.map_at_zero to 1. --Ob1se4syEfB7Ey0C Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk7b1y8ACgkQC3+MBN1Mb4ilFACfZFf4LqqRqcI08qX8bGWNXtaD 3swAoK18yYuQh5Ut8gqJU+pYnPr6uhYZ =MNsE -----END PGP SIGNATURE----- --Ob1se4syEfB7Ey0C--