All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrey Borzenkov <arvidjaar@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Cc: me@massimo-maggi.eu
Subject: Re: [PATCH 1/5] Fix reporting of RAIDZ vdevs in zfsinfo
Date: Fri, 9 Aug 2013 06:39:35 +0400	[thread overview]
Message-ID: <20130809063935.0396c64f@opensuse.site> (raw)
In-Reply-To: <52043133.6080603@massimo-maggi.eu>

[-- Attachment #1: Type: text/plain, Size: 1272 bytes --]

В Fri, 09 Aug 2013 02:00:51 +0200
Massimo Maggi <me@massimo-maggi.eu> пишет:

> 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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2013-08-09  2:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1359973957.git.me@massimo-maggi.eu>
2013-02-04 11:08 ` [PATCH 1/5] Fix reporting of RAIDZ vdevs in zfsinfo Massimo Maggi
2013-05-04 22:58   ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-05-06 15:05     ` Massimo Maggi
2013-05-06 18:10       ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-05-06 21:03         ` Massimo Maggi
2013-08-09  0:00           ` Massimo Maggi
2013-08-09  2:39             ` Andrey Borzenkov [this message]
2013-08-09 18:46               ` Massimo Maggi
2013-02-04 11:09 ` [PATCH 2/5] Accept pool version 5000 for feature flags Massimo Maggi
2013-02-04 11:09 ` [PATCH 3/5] Refactoring of function nvlist_find_value Massimo Maggi
2013-02-04 11:09 ` [PATCH 4/5] Check for feature flags needed to read from the pool Massimo Maggi
2013-02-04 11:10 ` [PATCH 5/5] LZ4 compression in ZFS Massimo Maggi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130809063935.0396c64f@opensuse.site \
    --to=arvidjaar@gmail.com \
    --cc=grub-devel@gnu.org \
    --cc=me@massimo-maggi.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.