grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 1/5] Fix reporting of RAIDZ vdevs in zfsinfo


From: Andrey Borzenkov
Subject: Re: [PATCH 1/5] Fix reporting of RAIDZ vdevs in zfsinfo
Date: Fri, 9 Aug 2013 06:39:35 +0400

В Fri, 09 Aug 2013 02:00:51 +0200
Massimo Maggi <address@hidden> пишет:

> On 06/05/2013 23:03, Massimo Maggi wrote:
> > 
> > When the issue about the infinite loop gets fully understood and fixed,
> > I'll send an updated set of patches.
> 
> Sorry for the long wait, I was really busy.
> I've seen that the previous patches were merged. :)
> In https://github.com/maxximino/grub2/issues/1,
> Christopher Siden suggested as a proper fix to check the zio_eck_t
> structure inside the vdev_phys_t structure, which includes a magic
> number, to be sure that the code is looking as a real ZFS filesystem.
> I've added also the validation of the SHA256 checksum of the structure
> itself, so we know that we are not dealing with corrupted or improper data.
> You can find the patch attached.

> +  phys=(vdev_phys_t*)nvlist;
> +  if( grub_zfs_to_cpu64(phys->vp_zbt.zec_magic,
> +       GRUB_ZFS_LITTLE_ENDIAN) == ZEC_MAGIC)
> +    {
> +      endian = GRUB_ZFS_LITTLE_ENDIAN;
> +    }
> +  else if(grub_zfs_to_cpu64(phys->vp_zbt.zec_magic,
> +       GRUB_ZFS_BIG_ENDIAN) != ZEC_MAGIC)

This condition sounds strange. Should it not be " == ZEC_MAGIC"?

> +    {
> +      endian = GRUB_ZFS_BIG_ENDIAN;
> +    }


> Regards,
> Massimo Maggi
> 

Attachment: signature.asc
Description: PGP signature


reply via email to

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