Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 Dec 2011 09:47:36 +0200
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Peter Wemm <peter@wemm.org>
Cc:        freebsd-amd64@freebsd.org
Subject:   Re: amd64/163710: setjump in userboot.so causes stack corruption
Message-ID:  <20111231074736.GW50300@deviant.kiev.zoral.com.ua>
In-Reply-To: <201112310320.pBV3KAQr091274@freefall.freebsd.org>
References:  <201112310320.pBV3KAQr091274@freefall.freebsd.org>

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

--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 <peter@wemm.org>
> To: Russell Cattelan <cattelan@thebarn.com>
> 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 <cattelan@thebarn.com=
> w=3D
>  rote:
>  > On 12/30/11 1:33 AM, Peter Wemm wrote:
>  >> On Thu, Dec 29, 2011 at 7:16 PM, Russell Cattelan
>  >> <cattelan@digitalelves.com> 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--



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