From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Maa40-0006s5-VC for mharc-grub-devel@gnu.org; Mon, 10 Aug 2009 14:57:45 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Maa3z-0006rN-0f for grub-devel@gnu.org; Mon, 10 Aug 2009 14:57:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Maa3u-0006pp-C6 for grub-devel@gnu.org; Mon, 10 Aug 2009 14:57:42 -0400 Received: from [199.232.76.173] (port=47286 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Maa3u-0006pi-6Q for grub-devel@gnu.org; Mon, 10 Aug 2009 14:57:38 -0400 Received: from mailout08.t-online.de ([194.25.134.20]:33631) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Maa3t-0006ct-PB for grub-devel@gnu.org; Mon, 10 Aug 2009 14:57:37 -0400 Received: from fwd01.aul.t-online.de by mailout08.t-online.de with smtp id 1Maa3r-0003HY-07; Mon, 10 Aug 2009 20:57:35 +0200 Received: from [10.3.2.2] (VTIoKmZHYhieZWVj6+HbgyZVyuB0nkt-FQobglkVihgp-HO3ABuSgI2q+m0msZgwt4@[217.235.194.52]) by fwd01.aul.t-online.de with esmtp id 1Maa3j-0CcK8m0; Mon, 10 Aug 2009 20:57:27 +0200 Message-ID: <4A806DA2.3070006@t-online.de> Date: Mon, 10 Aug 2009 20:57:38 +0200 From: Christian Franke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20090403 SeaMonkey/1.1.16 MIME-Version: 1.0 To: The development of GRUB 2 References: <20090802232422.GA23320@thorin> <20090804192715.GA14820@thorin> <4A791A24.8050602@t-online.de> <20090807105810.GB6695@thorin> <20090807114344.GO6695@thorin> <5FD279B0-A670-4A9F-8F5C-C3A56AAABFAB@zetam.org> <4A7DF4DC.5010106@t-online.de> <20090810115224.GJ9344@thorin> In-Reply-To: <20090810115224.GJ9344@thorin> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-ID: VTIoKmZHYhieZWVj6+HbgyZVyuB0nkt-FQobglkVihgp-HO3ABuSgI2q+m0msZgwt4 X-TOI-MSGID: 4b94492a-abd0-4b45-acf1-541b508e7e77 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: [PATCH] ntldr support 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: Mon, 10 Aug 2009 18:57:43 -0000 Robert Millan wrote: >> It probably would make sense that the 'ntldr' command does simple >> signature checks and fail on unknown files unless '--force' is specified. >> > > You mean checking for the PE signature? Yes, this would be nice too. > > A check of the first byte (jmp, 0xe9) and some file size range check (e.g. 0x30000...0x40000) may be enough for a first ntldr command. May also work for bootmgr.exe. EXE ("MZ") and PE headers appear at larger offsets: ntldr from XP SP2: size 251184, EXE header at 0x4d30, PE at 0x4e00 ntldr from XP SP3: size 251712, EXE header at 0x4d40, PE at 0x4e10 bootmgr.exe from Vista: ??? grub4dos checks for ntldr as follows: - file starts with 0xe9, 0x??, 0x01, - first sector does not end with bootsector signature 0x55,0xaa, - file size exceeds 0x30000. -- Regards Christian Franke