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

Issue 6686017: CHROMIUM: verity: collapse check_block into verify_path (Closed)

Created:
9 years, 9 months ago by Mandeep Singh Baines
Modified:
9 years, 7 months ago
Reviewers:
Paul T, ups, Will Drewry
CC:
chromium-os-reviews_chromium.org, vb+kernel_google.com, Olof Johansson, msb+croskernel_chromium.org
Visibility:
Public.

Description

CHROMIUM: verity: collapse check_block into verify_path There was a lot of common code between the two functions. BUG=9752 TEST=Ran tests in verity.git. Ran platform_DMVerityCorruption on H/W. Change-Id: If26ea858537e8a5d28cc1c03ebab794447459388 Signed-off-by: Mandeep Singh Baines <msb@chromium.org>; Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=47a583e

Patch Set 1 #

Patch Set 2 : Fixup. #

Total comments: 2

Patch Set 3 : Fix per review. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -59 lines) Patch
M drivers/md/dm-bht.c View 1 2 3 chunks +29 lines, -59 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Mandeep Singh Baines
9 years, 9 months ago (2011-03-11 23:31:47 UTC) #1
Paul T
LGTM
9 years, 9 months ago (2011-03-14 16:33:11 UTC) #2
Will Drewry
9 years, 9 months ago (2011-03-14 20:55:08 UTC) #3
LGTM with some optional comment clean up.

Thanks -- this is nice and clean!

http://codereview.chromium.org/6686017/diff/3/drivers/md/dm-bht.c
File drivers/md/dm-bht.c (right):

http://codereview.chromium.org/6686017/diff/3/drivers/md/dm-bht.c#newcode674
drivers/md/dm-bht.c:674: * hash in the parent.
Perhaps:

/* Need to check that the hash of the current |block| is accurate in its parent.
*/

Since the variable was renamed to "entry" and that wording doesn't match in the
comment anymore.

http://codereview.chromium.org/6686017/diff/3/drivers/md/dm-bht.c#newcode688
drivers/md/dm-bht.c:688: block = entry->nodes;
This is a nice trick, but I wonder if a little comment or other indicator might
make it easier to follow that after we check the externally supplied block data,
we then reuse the same variable to walk up the tree :)  Maybe just:

/* Keep the containing block of hashes to be verified in the next pass. */

I dunno.

Powered by Google App Engine
This is Rietveld 408576698