All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yoshinori K. Okuji" <okuji@enbug.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: Migrating to GRUB 2 in Debian (Re: Interesting GSoC project ideas for 09)
Date: Sun, 22 Mar 2009 22:11:02 +0900	[thread overview]
Message-ID: <200903222211.03080.okuji@enbug.org> (raw)
In-Reply-To: <49C61784.6020602@gmail.com>

On Sunday 22 March 2009 19:48:36 phcoder wrote:
> Hello, I agree that non-sector aligned writes should be handled
> correctly. However I disagree with removing of the magic number. I
> personally would prefer if this file would have magic number and
> checksum. AFAIK currently grub2 doesn't write to FS except in
> load_env/save_env so a bug in code calling the hook could easily be
> present. And I don't want grub2 to corrupt the filesystem because of any
> such mistakes

For magic, alright. But I am not certain about the necessity of checksum.

Bean's code re-reads blocks so as to ensure that blocklists are identical to 
what a given filesystem driver reads. So the probability of accidental writes 
has been reduced very much already. It is hard for me to imagine the benefit 
of adding more overhead. With this condition, if a checksum is invalid, the 
cause must be either of these:

- that GRUB has a bug in a filesystem driver, so this has read wrong sectors
- that the content of grubenv has already been corrupted (e.g. because the 
user modified it mistakenly)

In the latter case, there is no problem in GRUB overwriting the data, so we 
don't have to care. In the former, this means that GRUB cannot read the 
filesystem correctly anyway, so the user cannot boot any OS reliably. It is 
rather surprising that the user has successfully installed GRUB.

Regards,
Okuji



  reply	other threads:[~2009-03-22 13:11 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-25  9:21 Interesting GSoC project ideas for 09 "C. Bergström"
2009-02-25 11:59 ` phcoder
2009-02-27 21:08   ` Robert Millan
2009-02-28 11:54     ` phcoder
2009-03-01  4:28       ` Pavel Roskin
2009-03-01 17:15         ` phcoder
2009-03-04 21:02           ` Robert Millan
2009-03-04 20:59         ` Migrating to GRUB 2 in Debian (Re: Interesting GSoC project ideas for 09) Robert Millan
2009-03-13 11:50           ` Yoshinori K. Okuji
2009-03-13 12:23             ` phcoder
2009-03-14 21:10               ` Yoshinori K. Okuji
2009-03-15  5:52                 ` Bean
2009-03-22  7:01                   ` Yoshinori K. Okuji
2009-03-22 10:48                     ` phcoder
2009-03-22 13:11                       ` Yoshinori K. Okuji [this message]
2009-03-22 13:23                         ` phcoder
2009-03-22 14:02                           ` Yoshinori K. Okuji
2009-03-22 12:29                     ` Robert Millan
2009-03-22 12:50                       ` Yoshinori K. Okuji
2009-03-28 20:02                         ` Yoshinori K. Okuji
2009-03-02  7:52       ` Interesting GSoC project ideas for 09 liu Aleaxander
2009-03-01 14:55   ` liu Aleaxander
2009-03-01 15:30     ` phcoder

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=200903222211.03080.okuji@enbug.org \
    --to=okuji@enbug.org \
    --cc=grub-devel@gnu.org \
    /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.