From owner-freebsd-amd64@FreeBSD.ORG Fri Mar 16 22:00:11 2012 Return-Path: Delivered-To: freebsd-amd64@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C9BA106564A for ; Fri, 16 Mar 2012 22:00:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 6D4758FC15 for ; Fri, 16 Mar 2012 22:00:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q2GM0BcD023378 for ; Fri, 16 Mar 2012 22:00:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q2GM0BZd023377; Fri, 16 Mar 2012 22:00:11 GMT (envelope-from gnats) Date: Fri, 16 Mar 2012 22:00:11 GMT Message-Id: <201203162200.q2GM0BZd023377@freefall.freebsd.org> To: freebsd-amd64@FreeBSD.org From: Russell Cattelan Cc: 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 Reply-To: Russell Cattelan List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 22:00:11 -0000 The following reply was made to PR amd64/163710; it has been noted by GNATS. From: Russell Cattelan To: Peter Wemm Cc: freebsd-gnats-submit@freebsd.org Subject: Re: amd64/163710: setjump in userboot.so causes stack corruption Date: Fri, 16 Mar 2012 16:50:19 -0500 This is a multi-part message in MIME format. --------------020407050203000600090705 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 3/16/12 3:51 PM, Peter Wemm wrote: > 2012/3/16 Russell Cattelan : >> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 >> >> On 3/16/12 11:56 AM, Peter Wemm wrote: >>> On Thu, Mar 15, 2012 at 2:40 PM, Russell Cattelan >>> wrote: >>>> The following reply was made to PR amd64/163710; it has been >>>> noted by GNATS. >>> [..] >>>> Does the last patch seem acceptable? >>>> >>>> Can we close this issue out? >>> >>> Sadly not, >>> >>> +no-machine: + rm -f ${.CURDIR}/../../ficl/machine >>> >>> .. this is definitely bogus no matter what. This attempts to >>> modify the source tree which may be read only, and should >>> never even have a "machine->..." symlink in it to remove in the >>> first place. >> The sym link is created by the build of ficl for the loader. See: >> boot/ficl/Makefile machine: ln -sf ${.CURDIR}/../../i386/include >> machine >> >> Are you suggesting that is incorrect and should be fixed? > > No, you're reading it wrong: "ln -sf ${.CURDIR}/../../i386/include > machine" creates ${.OBJDIR}/machine" > > Your patch does a "rm -f ${.CURDIR}/../../ficl/machine" which is > in the source tree, not the obj tree, so it would never exist. And > if it does, then something is wrong with your build environment. > This is pretty easy to reproduce. cd /sys/boot make there will be a symlink in /sys/boot/ficl/machine that points to i386/include. If that link exists and userboot is rebuilt. e.g. cd /sys/boot/userboot make will end up with a userboot.so with an ficl that has been built with 32bit headers and thus have the wrong size structure for setjmp. - -Russell -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk9jtZsACgkQNRmM+OaGhBgVZACggjJYocX+OfI/5Fh2s4nuKFAJ xXQAnRXKoKqx1eM3enbv/ebTMIU7UIuQ =GSzJ -----END PGP SIGNATURE----- --------------020407050203000600090705 Content-Type: text/x-vcard; charset=utf-8; name="cattelan.vcf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="cattelan.vcf" begin:vcard fn:Russell Cattelan n:Cattelan;Russell email;internet:cattelan@thebarn.com tel;cell:612 805 3144 x-mozilla-html:FALSE version:2.1 end:vcard --------------020407050203000600090705--