* [Fwd: Re: Bug#520286: ext2 module fails to recognize ext4 files with extents on big endian]
@ 2009-03-18 17:54 Felix Zielcke
2009-03-18 18:19 ` Gregg C Levine
2009-03-19 8:23 ` Pavel Roskin
0 siblings, 2 replies; 4+ messages in thread
From: Felix Zielcke @ 2009-03-18 17:54 UTC (permalink / raw)
To: The development of GRUB 2
[-- Attachment #1: Type: text/plain, Size: 1338 bytes --]
Any objection that I commit his patch?
-------- Weitergeleitete Nachricht --------
Von: Michel Dänzer <daenzer@debian.org>
An: Felix Zielcke <fzielcke@z-51.de>
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änzer:
>
> > The function grub_ext2_read_block() doesn't take endianness into account
> > 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 necessary
> > for loading and booting a Linux kernel from an ext4 filesystem on my PowerBook.
>
> Hi,
>
> 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,
--
Felix Zielcke
[-- Attachment #2: grub2-ext4-endianness.diff --]
[-- Type: text/x-patch, Size: 851 bytes --]
--- 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 = EXT2_BLOCK_SIZE (data);
int log2_blksz = LOG2_EXT2_BLOCK_SIZE (data);
- 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änzer <michel@daenzer.net>
+
+ * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
+ checking inode flags for EXT4_EXTENTS_FLAG.
+
^ permalink raw reply [flat|nested] 4+ messages in thread* RE: [Fwd: Re: Bug#520286: ext2 module fails to recognize ext4 files with extents on big endian]
2009-03-18 17:54 [Fwd: Re: Bug#520286: ext2 module fails to recognize ext4 files with extents on big endian] Felix Zielcke
@ 2009-03-18 18:19 ` Gregg C Levine
2009-03-19 8:23 ` Pavel Roskin
1 sibling, 0 replies; 4+ messages in thread
From: Gregg C Levine @ 2009-03-18 18:19 UTC (permalink / raw)
To: 'The development of GRUB 2'
Hello!
None from me, this week.
Especially since we need to move GRUB2 to the point that it is fully ready
to take things over, with regards to Debian and related distributions.
--
Gregg C Levine hansolofalcon@worldnet.att.net
"The Force will be with you always." Obi-Wan Kenobi
> -----Original Message-----
> From: grub-devel-bounces+hansolofalcon=worldnet.att.net@gnu.org
[mailto:grub-devel-
> bounces+hansolofalcon=worldnet.att.net@gnu.org] On Behalf Of Felix Zielcke
> Sent: Wednesday, March 18, 2009 1:55 PM
> To: The development of GRUB 2
> Subject: [Fwd: Re: Bug#520286: ext2 module fails to recognize ext4 files
with extents on
> big endian]
>
> Any objection that I commit his patch?
>
> -------- Weitergeleitete Nachricht --------
> Von: Michel DC$nzer <daenzer@debian.org>
> An: Felix Zielcke <fzielcke@z-51.de>
> 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 DC$nzer:
> >
> > > The function grub_ext2_read_block() doesn't take endianness into
account
> > > 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
necessary
> > > for loading and booting a Linux kernel from an ext4 filesystem on my
PowerBook.
> >
> > Hi,
> >
> > 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,
>
>
> --
> Felix Zielcke
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Fwd: Re: Bug#520286: ext2 module fails to recognize ext4 files with extents on big endian]
2009-03-18 17:54 [Fwd: Re: Bug#520286: ext2 module fails to recognize ext4 files with extents on big endian] Felix Zielcke
2009-03-18 18:19 ` Gregg C Levine
@ 2009-03-19 8:23 ` Pavel Roskin
2009-03-19 9:39 ` Felix Zielcke
1 sibling, 1 reply; 4+ messages in thread
From: Pavel Roskin @ 2009-03-19 8:23 UTC (permalink / raw)
To: The development of GRUB 2
On Wed, 2009-03-18 at 18:54 +0100, Felix Zielcke wrote:
> Any objection that I commit his patch?
I don't have the beginning of this thread, but I confirm that the check
for EXT4_EXTENTS_FLAG won't work on big-endian machines. What's worse,
the bug might affect ext2 and ext3 on such machines as well. So please
go ahead even if that's not a complete fix.
--
Regards,
Pavel Roskin
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-03-19 9:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-18 17:54 [Fwd: Re: Bug#520286: ext2 module fails to recognize ext4 files with extents on big endian] Felix Zielcke
2009-03-18 18:19 ` Gregg C Levine
2009-03-19 8:23 ` Pavel Roskin
2009-03-19 9:39 ` Felix Zielcke
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.