From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LjzyX-0003cT-Jv for mharc-grub-devel@gnu.org; Wed, 18 Mar 2009 13:54:45 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LjzyV-0003cM-IW for grub-devel@gnu.org; Wed, 18 Mar 2009 13:54:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LjzyQ-0003c8-5G for grub-devel@gnu.org; Wed, 18 Mar 2009 13:54:42 -0400 Received: from [199.232.76.173] (port=37656 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LjzyP-0003c5-VS for grub-devel@gnu.org; Wed, 18 Mar 2009 13:54:38 -0400 Received: from moutng.kundenserver.de ([212.227.126.177]:51201) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LjzyP-0000eD-8o for grub-devel@gnu.org; Wed, 18 Mar 2009 13:54:37 -0400 Received: from [85.180.55.126] (e180055126.adsl.alicedsl.de [85.180.55.126]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0MKv1o-1LjzyM2KzH-000jUo; Wed, 18 Mar 2009 18:54:34 +0100 From: Felix Zielcke To: The development of GRUB 2 Content-Type: multipart/mixed; boundary="=-fKxSnEN2Fz8fzseVtV2C" Date: Wed, 18 Mar 2009 18:54:46 +0100 Message-Id: <1237398886.3415.1.camel@fz.local> Mime-Version: 1.0 X-Mailer: Evolution 2.24.5 X-Provags-ID: V01U2FsdGVkX18pssM+tHbwUw6wwJ9hZcijxs4qX9TEfvzGUBJ PKOfc5SJCX1Qi/M7syqyq+QnefaL8BQ1HVIa0z7rWjpwM0vOWe VL+XrT2CGGHIVLhC8t64g== X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: [Fwd: Re: Bug#520286: ext2 module fails to recognize ext4 files with extents on big endian] 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: Wed, 18 Mar 2009 17:54:43 -0000 --=-fKxSnEN2Fz8fzseVtV2C Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Any objection that I commit his patch? -------- Weitergeleitete Nachricht -------- Von: Michel D=C3=A4nzer An: Felix Zielcke Kopie: 520286@bugs.debian.org Betreff: Re: Bug#520286: ext2 module fails to recognize ext4 files with extents on big endian Datum: Wed, 18 Mar 2009 18:41:47 +0100 On Mit, 2009-03-18 at 18:26 +0100, Felix Zielcke wrote: > Am Mittwoch, den 18.03.2009, 18:00 +0100 schrieb Michel D=C3=A4nzer: >=20 > > The function grub_ext2_read_block() doesn't take endianness into accoun= t > > when checking the inode flags for EXT4_EXTENTS_FLAG, so the check doesn= 't > > work properly on big endian. The attached patch fixes this, it was nece= ssary > > for loading and booting a Linux kernel from an ext4 filesystem on my Po= werBook. >=20 > Hi, >=20 > it would be nice if you could write a ChangeLog entry for this and send > your patch directly upstream to grub-devel@gnu.org, though you need to > subscribe first. Last time I tried this wasn't too pleasant an experience for me I'm afraid (as a result I filed #516458, which was fixed with a different patch, for which I thanked the author personally). The attached includes a ChangeLog entry, but I'd appreciate if you or someone else could take care of getting it integrated upstream. Thanks, --=20 Felix Zielcke --=-fKxSnEN2Fz8fzseVtV2C Content-Disposition: attachment; filename="grub2-ext4-endianness.diff" Content-Type: text/x-patch; name="grub2-ext4-endianness.diff"; charset="UTF-8" Content-Transfer-Encoding: quoted-printable --- grub2-1.96+20090317.orig/fs/ext2.c 2009-02-08 01:28:09.000000000 +0100 +++ grub2-1.96+20090317/fs/ext2.c 2009-03-18 17:29:03.000000000 +0100 @@ -385,7 +385,7 @@ grub_ext2_read_block (grub_fshelp_node_t unsigned int blksz =3D EXT2_BLOCK_SIZE (data); int log2_blksz =3D LOG2_EXT2_BLOCK_SIZE (data); =20 - if (inode->flags & EXT4_EXTENTS_FLAG) + if (grub_le_to_cpu32(inode->flags) & EXT4_EXTENTS_FLAG) { char buf[EXT2_BLOCK_SIZE(data)]; struct grub_ext4_extent_header *leaf; --- grub2-1.96+20090317.orig/ChangeLog 2009-03-14 16:18:59.000000000 +0100 +++ grub2-1.96+20090317/ChangeLog 2009-03-18 18:39:26.000000000 +0100 @@ -0,0 +1,5 @@ +2009-03-18 Michel D=C3=A4nzer + + * fs/ext2.c (grub_ext2_read_block): Take endianness into account when + checking inode flags for EXT4_EXTENTS_FLAG. + --=-fKxSnEN2Fz8fzseVtV2C--