grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Laager <rlaager@wiktel.com>
To: Jonathan McCune <jonmccune@google.com>
Cc: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: [PATCH v0] Support to disable reed-solomon codes
Date: Sat, 02 Nov 2013 22:33:56 -0500	[thread overview]
Message-ID: <1383449636.2867.111.camel@watermelon.coderich.net> (raw)
In-Reply-To: <CADtfRCUnHqFsi-RxEnxZ5hEHPtAk8C0NtDtzden_8pDs4BfnEg@mail.gmail.com>

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

I'm not at all familiar with this part of GRUB, so take this with a big
grain of salt.

On Sat, 2013-11-02 at 20:05 -0700, Jonathan McCune wrote:
> I think it should be possible to generate all the necessary signatures
> at *build time* instead of *install time*

If I understand your email correctly, you're saying that at build time,
grub builds core.img. Then at install time, it calculates:
  "core.img.rs" = Reed-Solomon(core.img)
Then it writes the "core.img.rs" data to disk. At boot time, GRUB reads
the "core.img.rs" data from disk, corrects errors, to reproduce
core.img, which is executed.

If you want to verify at boot time, you just do it after the error
correction step. But it sounds like you want to verify the bits on disk
from the host environment. Rather than "backing out" the Reed-Solomon
coding, why not do it the other way around? Verify core.img, then
re-encode the known good copy (for which code already exists as part of
the installation procedure) and then just compare that to what is
actually on disk?

-- 
Richard

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2013-11-03  4:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-02  0:04 [PATCH v0] Support to disable reed-solomon codes Jon McCune
2013-11-02  3:13 ` Andrey Borzenkov
2013-11-03  3:05   ` Jonathan McCune
2013-11-03  3:33     ` Richard Laager [this message]
2013-11-03 22:57       ` Jonathan McCune

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=1383449636.2867.111.camel@watermelon.coderich.net \
    --to=rlaager@wiktel.com \
    --cc=grub-devel@gnu.org \
    --cc=jonmccune@google.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).