From owner-freebsd-amd64@FreeBSD.ORG Sat Dec 31 08:17:15 2011 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15BDF1065740 for ; Sat, 31 Dec 2011 08:17:15 +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 6924E8FC16 for ; Sat, 31 Dec 2011 08:17:13 +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 pBV7laa7072836 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 31 Dec 2011 09:47:36 +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 pBV7laIX027551; Sat, 31 Dec 2011 09:47:36 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by alf.home (8.14.5/8.14.5/Submit) id pBV7laM6027550; Sat, 31 Dec 2011 09:47:36 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: alf.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 31 Dec 2011 09:47:36 +0200 From: Kostik Belousov To: Peter Wemm Message-ID: <20111231074736.GW50300@deviant.kiev.zoral.com.ua> References: <201112310320.pBV3KAQr091274@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ORQdwjxFsCjTedSH" Content-Disposition: inline In-Reply-To: <201112310320.pBV3KAQr091274@freefall.freebsd.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-amd64@freebsd.org Subject: Re: amd64/163710: setjump in userboot.so causes stack corruption X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 08:17:15 -0000 --ORQdwjxFsCjTedSH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Dec 31, 2011 at 03:20:10AM +0000, Peter Wemm wrote: > The following reply was made to PR amd64/163710; it has been noted by GNA= TS. >=20 > From: Peter Wemm > To: Russell Cattelan > Cc: freebsd-gnats-submit@freebsd.org > Subject: Re: amd64/163710: setjump in userboot.so causes stack corruption > Date: Fri, 30 Dec 2011 19:16:10 -0800 >=20 > On Fri, Dec 30, 2011 at 12:24 PM, Russell Cattelan w=3D > rote: > > On 12/30/11 1:33 AM, Peter Wemm wrote: > >> On Thu, Dec 29, 2011 at 7:16 PM, Russell Cattelan > >> wrote: > >> > >>>> Description: > >>> For some reason the forth interpreter is built and linked as 32bit e= ven > >>> on amd64. > >> That's the catch. We use the same 32 bit loader on i386 and amd64. > >> The common loader understands both kernel formats. =3DA0This unfortun= ately > >> has meant that the libstand and sys/boot environment has had to be 32 > >> bit. > >> > > Yes this is bit of an odd situation. > > the loader is linked 32bit but userboot.so / libstand is built 64bit > > but pulls in the 32bit ficl lib. > > The 64bit libstand provides the setjmp call that needs 96 bytes > > of space but since ficl is built with the 32bit jump_buf (48 byte ) > > structure > > things go sideways. > =20 > We link the loader with the 32 bit libstand though. It cannot work > any other way. BTX is 32 bit only. userboot.so is 64bit, and, as I already pointed the originator, it uses the separate ficl build, sys/boot/userboot/ficl. --ORQdwjxFsCjTedSH Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk7+vhcACgkQC3+MBN1Mb4iDwgCfTSAY0fMFiBpxeLbgAHJNy9kL QX0AoL01cCVEdui3cMoub/b0Dszky8m6 =ZxEP -----END PGP SIGNATURE----- --ORQdwjxFsCjTedSH--