From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Vcous-0004TZ-M0 for mharc-grub-devel@gnu.org; Sun, 03 Nov 2013 00:03:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48884) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vcoul-0004TT-Eu for grub-devel@gnu.org; Sun, 03 Nov 2013 00:03:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vcouc-0000GA-I0 for grub-devel@gnu.org; Sun, 03 Nov 2013 00:03:51 -0400 Received: from spam1.wiktel.com ([2607:f850:0:2::151]:39324) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vcouc-0000Fu-Bp for grub-devel@gnu.org; Sun, 03 Nov 2013 00:03:42 -0400 Received: from [172.16.0.101] (thief-pool3-123-250.mncable.net [216.172.123.250]) (authenticated bits=0) by spam1.wiktel.com (8.14.4/8.14.4/Debian-2ubuntu2) with ESMTP id rA33YB6S012583 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NOT); Sat, 2 Nov 2013 22:34:11 -0500 Message-ID: <1383449636.2867.111.camel@watermelon.coderich.net> Subject: Re: [PATCH v0] Support to disable reed-solomon codes From: Richard Laager To: Jonathan McCune Date: Sat, 02 Nov 2013 22:33:56 -0500 In-Reply-To: References: <1383350640-13907-1-git-send-email-jonmccune@google.com> <20131102071336.7cff1833@opensuse.site> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-6JlkcYVB3sNsNp25FBCS" X-Mailer: Evolution 3.2.3-0ubuntu6 Mime-Version: 1.0 X-bounce-key: wiktel.com-1; rlaager@wiktel.com; 1383449652; HQvw3zA/yRB/rtro7b8OJxpk3iw; X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f850:0:2::151 Cc: The development of GNU GRUB X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Nov 2013 04:03:57 -0000 --=-6JlkcYVB3sNsNp25FBCS Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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" =3D 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? --=20 Richard --=-6JlkcYVB3sNsNp25FBCS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEABECAAYFAlJ1xCQACgkQbfU6uV4fG87qhACfStmQkstLfDttzLz+RdQ91+uh DRMAn19L9K1MwkAK/7p+j3d1qVczKZri =Qysv -----END PGP SIGNATURE----- --=-6JlkcYVB3sNsNp25FBCS--