grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "Out of Partition" error on XFS still occuring


From: Bean
Subject: Re: "Out of Partition" error on XFS still occuring
Date: Sun, 27 Jul 2008 18:06:09 +0800

On Sun, Jul 27, 2008 at 3:47 PM, Pavel Roskin <address@hidden> wrote:
> On Sat, 2008-07-26 at 20:56 -0500, Dan Callahan wrote:
>> Hi, I seem to be able to recreate the xfs "out of partition" error
>> using Debian's most recent grub-pc release, 1.96+20080724-2.
>>
>> This bug is being tracked at
>> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=436943 , and was
>> first reported one year ago. A patch from Niels Böhm last month was
>> thought to resolve it, but I'm still seeing the issue.
>>
>> A dd copy of the offending filesystem is available at
>> http://neoflux.net/tmp/xfs-boot.tar.gz (8.9 MB compressed, 243 MB
>> uncompressed, link should remain active through August.)
>>
>> Mounted as a loopback device in grub-emu, ls (device) detects that it
>> is xfs, but ls (device)/ and ls (device)/grub fail with the out of
>> partition error.
>
> Valgrind on x86_64 indicates something interesting:
>
> $ valgrind grub-fstest /home/proski/tmp/xfs/xfs-boot.img ls /
> ==23594== Memcheck, a memory error detector.
> ==23594== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
> ==23594== Using LibVEX rev 1804, a library for dynamic binary translation.
> ==23594== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
> ==23594== Using valgrind-3.3.0, a dynamic binary instrumentation framework.
> ==23594== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
> ==23594== For more details, rerun with: -v
> ==23594==
> em.map-2.6.25-2-amd64/    ==23594== Conditional jump or move depends on 
> uninitialised value(s)
> ==23594==    at 0x415FB9: call_hook.2389 (xfs.c:378)
> ==23594==    by 0x4167DB: grub_xfs_iterate_dir (xfs.c:469)
> ==23594==    by 0x41697C: grub_xfs_dir (xfs.c:659)
> ==23594==    by 0x4083EC: grub_cmd_ls (ls.c:176)
> ==23594==    by 0x4011C7: execute_command (grub-fstest.c:120)
> ==23594==    by 0x401452: fstest (grub-fstest.c:305)
> ==23594==    by 0x4016DF: main (grub-fstest.c:513)
>
> "em.map-2.6.25-2-amd64/" is apparently the ls output.  Yet Linux can
> mount the volume, and it shows reasonable names.

Hi,

This problem is caused by the previous patch, it expands the size of
grub_xfs_dir_header:

struct grub_xfs_dir_header
{
  grub_uint8_t count;
  grub_uint8_t i8count;
  union
  {
    grub_uint32_t i4;
    grub_uint64_t i8;
  } parent __attribute__ ((packed));
} __attribute__ ((packed));

The size is always 10 bytes, but in fact, when small inode is used, it
should be 6 bytes. Then, in struct grub_xfs_inode, grub_xfs_dir_header
cause subsequence fields to move.

This patch revert the change, it should be ok now.

-- 
Bean

Attachment: xfs.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]