Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Issue 1519008: VBoot Reference: 18 Exabytes ought to be enough for everybody (Closed)

Created:
10 years, 8 months ago by gauravsh
Modified:
9 years, 6 months ago
Reviewers:
Chris Masone
CC:
chromium-os-reviews_chromium.org, gauravsh
Visibility:
Public.

Description

Propagate use of uint64_t to more functions that may need to deal with arbitrary length data. This CL fixes some functions to use uint64_t that I missed the first time around. It ended up requiring some minor changes to how some of the helper functions work (StatefulMemcpy*()). Also adds new tests to make sure that reference code can verify/process big firmware and kernel images. BUG=670 TEST=Adds some new, old ones still pass.

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : , #

Total comments: 1

Patch Set 4 : Use symbolic constants. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+269 lines, -71 lines) Patch
M src/platform/vboot_reference/common/utility_stub.c View 2 chunks +10 lines, -4 lines 0 comments Download
M src/platform/vboot_reference/crypto/rsa_utility.c View 1 3 chunks +4 lines, -2 lines 0 comments Download
M src/platform/vboot_reference/include/firmware_image.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M src/platform/vboot_reference/include/kernel_image.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M src/platform/vboot_reference/include/rsa_utility.h View 1 1 chunk +1 line, -1 line 0 comments Download
M src/platform/vboot_reference/include/utility.h View 3 chunks +4 lines, -3 lines 0 comments Download
M src/platform/vboot_reference/tests/Makefile View 3 chunks +12 lines, -2 lines 0 comments Download
A src/platform/vboot_reference/tests/big_firmware_tests.c View 2 3 1 chunk +74 lines, -0 lines 0 comments Download
A src/platform/vboot_reference/tests/big_kernel_tests.c View 2 3 1 chunk +76 lines, -0 lines 0 comments Download
M src/platform/vboot_reference/tests/firmware_rollback_tests.c View 2 chunks +3 lines, -2 lines 0 comments Download
M src/platform/vboot_reference/tests/firmware_splicing_tests.c View 2 chunks +17 lines, -10 lines 0 comments Download
M src/platform/vboot_reference/tests/kernel_rollback_tests.c View 1 chunk +4 lines, -2 lines 0 comments Download
M src/platform/vboot_reference/tests/kernel_splicing_tests.c View 2 chunks +17 lines, -11 lines 0 comments Download
M src/platform/vboot_reference/tests/test_common.h View 4 chunks +4 lines, -4 lines 0 comments Download
M src/platform/vboot_reference/tests/test_common.c View 4 chunks +4 lines, -4 lines 0 comments Download
M src/platform/vboot_reference/utils/firmware_image.c View 1 14 chunks +19 lines, -12 lines 0 comments Download
M src/platform/vboot_reference/utils/kernel_image.c View 1 11 chunks +16 lines, -10 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
gauravsh
10 years, 8 months ago (2010-03-29 23:55:37 UTC) #1
Chris Masone
in general, in the test programs, can you store the file basenames in constants, and ...
10 years, 8 months ago (2010-03-30 02:17:03 UTC) #2
gauravsh
On Mon, Mar 29, 2010 at 7:17 PM, <cmasone@chromium.org> wrote: > in general, in the ...
10 years, 8 months ago (2010-03-30 03:19:01 UTC) #3
Chris Masone
10 years, 8 months ago (2010-03-30 03:37:24 UTC) #4
Cool.  LGTM

On 2010/03/30 03:19:01, gauravsh wrote:
> On Mon, Mar 29, 2010 at 7:17 PM,  <mailto:cmasone@chromium.org> wrote:
> > in general, in the test programs, can you store the file basenames in
> > constants,
> > and then just append the extensions? &nbsp;Seems less error prone.
> 
> Agreed. Done. Also made the same change to other tests, no point in
> doing it in a separate CL.
> 
> >
> > Also, do your tests run your code through the error pathways at all?
&nbsp;Like,
> > can
> > you force an overrun to make sure you catch it?
> 
> Most of the testing that I have done to make sure errors are handled
> gracefully is through fuzz testing by "bunny" (a smart fuzzer). It's
> smart enough to notice how changing parts of the input changes program
> control flow and focuses its attention on that. I could write manual
> tests for those too but there are just too many cases to consider.
> 
> Before uint64_t changes in this CL, the Big[Firmware|Kernel]Tests were
> failing - so the tests helped me debug and figure out where exactly
> things were not being handled correctly. So, in a sense, they do
> exercise code pathways where overflows might cause a problem.
> 
> In any case, I guess what I will do is to add some tests for corner
> cases (like header length field all maxed out, etc.). That's a
> separate CL though. Let me know if this is not what you were exactly
> asking.
> 
> >
> >
> > http://codereview.chromium.org/1519008/diff/5001/6008
> > File src/platform/vboot_reference/tests/big_firmware_tests.c (right):
> >
> > http://codereview.chromium.org/1519008/diff/5001/6008#newcode27
> > src/platform/vboot_reference/tests/big_firmware_tests.c:27: uint8_t*
> > firmware_sign_key_buf= BufferFromFile("testkeys/key_rsa1024.keyb",
> > Any reason these filenames aren't symbolic constants?
> >
> > http://codereview.chromium.org/1519008
> >
> 
> 
> 
> -- 
> -g
>

Powered by Google App Engine
This is Rietveld 408576698