From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1EkKr0-0007dV-4e for mharc-grub-devel@gnu.org; Thu, 08 Dec 2005 07:26:30 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EkKqx-0007bw-K0 for grub-devel@gnu.org; Thu, 08 Dec 2005 07:26:27 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EkKqu-0007ZN-Jl for grub-devel@gnu.org; Thu, 08 Dec 2005 07:26:27 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EkKqu-0007ZB-ER for grub-devel@gnu.org; Thu, 08 Dec 2005 07:26:24 -0500 Received: from [194.109.24.22] (helo=smtp-vbr2.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EkKrv-0001Zp-By for grub-devel@gnu.org; Thu, 08 Dec 2005 07:27:27 -0500 Received: from localhost.localdomain (mgerards.xs4all.nl [82.92.27.129]) by smtp-vbr2.xs4all.nl (8.13.3/8.13.3) with ESMTP id jB8CQ2Tv042903 for ; Thu, 8 Dec 2005 13:26:02 +0100 (CET) (envelope-from mgerards@xs4all.nl) Mail-Copies-To: mgerards@xs4all.nl To: The development of GRUB 2 References: From: Marco Gerards Date: Thu, 08 Dec 2005 13:26:02 +0100 In-Reply-To: (Andre Smith's message of "Thu, 8 Dec 2005 01:10:19 -0500") Message-ID: <878xuvsrl1.fsf@xs4all.nl> User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by XS4ALL Virus Scanner Subject: Re: GRUB2 Build on Mac OS X X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Dec 2005 12:26:27 -0000 Andre Smith writes: Hi Andre, > The GRUB2 build fails on Mac OS X, due to non-support of nested > functions in GCC on OS X. The reasoning behind this, the GCC > implementation of nested functions uses stack based execution. > Hackers use buffer overflows, along with stack based execution, to > exploit weaknesses in poorly written code. Apple has decided to > disable nested function support until a volunteer has patched GCC > with a non-stack based implementation of nested functions. Right, there has been a discussion about this on the list. > I would like to see the PowerPC port of Open Solaris build on Mac > hardware. I have been working on patches for the code that uses > nested functions in the GRUB2 project and I would like get some > feedback from the list. I would also like to solicit help in testing > the patches against the official tree for regression testing. It's not acceptable to me to just remove the nested functions because someone broke some unofficial build of gcc. When an executable stack is not available, there are the following options (as I see them): Enable the executable stack using: 1) Set some bit in the ELF file so the OS knows we want this (that's what linux does). 2) Enable it using some function. 3) Creating our own stack. So on the apple nested functions should not cause an error. Perhaps a serious warning that the stack is not available and a runtime error. In that case we can use the fixes above. So on the apple the right thing to do would be: 1) Fix gcc so nested functions are not fatal. 2) fix GRUB using the methods I described above. What kind of restrictions does opensolaris have on nested functions? If it doesn't cause an error, the problem for opensolaris is not that big. Thanks, Marco