Quoting Bean <bean12...@gmail.com>:

The current xfs driver uses fixed inode size (256), this patch should fix it.

I'm afraid this patch doesn't take something into account. I tried creating an image by

mkfs.xfs -i log=9 /root/tmp/xfs.img -f

Then I copied stgit sources on top of it (it's just a directory with many files).

Then I ran

valgrind grub-fstest /root/tmp/xfs.img ls -al '/stgit'

It reported this problem:

==11029== Conditional jump or move depends on uninitialised value(s)
==11029==    at 0x403CAE: grub_disk_adjust_range (disk.c:373)
==11029==    by 0x403D6C: grub_disk_read (disk.c:392)
==11029==    by 0x41CB8C: grub_xfs_read_inode (xfs.c:222)
==11029==    by 0x41D217: call_hook.2830 (xfs.c:414)
==11029==    by 0x41D49C: grub_xfs_iterate_dir (xfs.c:469)
==11029==    by 0x41DA6B: grub_xfs_dir (xfs.c:655)
==11029==    by 0x408E72: grub_ls_list_files (ls.c:195)
==11029==    by 0x4093F8: grub_cmd_ls (ls.c:252)
==11029==    by 0x407CB8: grub_extcmd_dispatcher (extcmd.c:48)
==11029==    by 0x400EF1: execute_command (grub-fstest.c:74)
==11029==    by 0x4016AC: fstest (grub-fstest.c:300)
==11029==    by 0x401EBC: main (grub-fstest.c:550)

I tried to track it down, and it appears that line 465 in call_hook() is responsible:

ino = *(grub_uint64_t *) inopos;

First inopos points to valid memory, but at some point it starts pointing to invalid memory. I don't get this problem if I omit "-i log=9" from the mkfs.xfs arguments.

I got some interesting warnings from the RAID code too, which I suppressed by this patch:

--- a/disk/raid.c
+++ b/disk/raid.c
@@ -613,6 +613,7 @@ grub_raid_scan_device (int head_only)

       for (p = grub_raid_list; p; p = p->next)
         {
+         grub_memset(&array, 0, sizeof(array));
           if (! p->detect (disk, &array))
             {
               if (! insert_array (disk, &array, p->name))


Let's fix errors first and then we can add improvements.

--
Regards,
Pavel Roskin


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to