Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Ih2A1-0000RN-7p for mharc-grub-devel@gnu.org; Sun, 14 Oct 2007 08:01:33 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ih29z-0000QX-JL for grub-devel@gnu.org; Sun, 14 Oct 2007 08:01:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ih29w-0000Py-RD for grub-devel@gnu.org; Sun, 14 Oct 2007 08:01:30 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ih29w-0000Pr-Jx for grub-devel@gnu.org; Sun, 14 Oct 2007 08:01:28 -0400 Received: from aybabtu.com ([69.60.117.155]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Ih29v-00074e-N1 for grub-devel@gnu.org; Sun, 14 Oct 2007 08:01:28 -0400 Received: from [192.168.10.6] (helo=thorin) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1Ih29o-00089c-4V for grub-devel@gnu.org; Sun, 14 Oct 2007 14:01:20 +0200 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1Ih29P-0004N2-BZ for grub-devel@gnu.org; Sun, 14 Oct 2007 14:00:55 +0200 Date: Sun, 14 Oct 2007 14:00:55 +0200 From: Robert Millan To: The development of GRUB 2 Message-ID: <20071014120055.GB16638@thorin> References: <20071012161955.GA26491@thorin> <20071012220337.GB21996@coresystems.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20071012220337.GB21996@coresystems.de> Organization: free as in freedom X-Message-Flag: Microsoft discourages use of Outlook. X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: [PATCH] ELF program header 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: Sun, 14 Oct 2007 12:01:32 -0000 On Sat, Oct 13, 2007 at 12:03:37AM +0200, Stefan Reinauer wrote: > > /* FIXME: Should we support program headers at strange locations? */ > > if (ehdr->e_phoff + ehdr->e_phnum * ehdr->e_phentsize > MULTIBOOT_SEARCH) > > return grub_error (GRUB_ERR_BAD_OS, "program header at a too high offset"); > > > > This breaks self-boot in the LinuxBIOS target. Moving the Program header > > (see attached patch) fixed it, with no apparent drawbacks or regressions in > > any of the ELF loaders around (tested on LinuxBIOS ELF loader and Efika OF). > > I assume this was with LinuxBIOSv3 and Qemu? Yes. > We tried the same but the patch was a lot bigger, trying to actually > leave space in the beginning. Your patch might be enough, that would be > really nice. That's the question. Do we really have to add more space, or is that space already allocated for us? > I didn't really get the sense behind the layers of grub > magic around read() and write(). They're basicaly like pread() and pwrite() with the added functionality of a verbose mode. -- Robert Millan I know my rights; I want my phone call! What use is a phone call, if you are unable to speak? (as seen on /.)