Skip to content

Verified boot implementation based on FIT

Kim Phillips u-boot 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest posting 2/20 of 45 patches 0 repliesNew
  2. v2 posting 1/20 of 45 patches 0 repliesSuperseded

Patches in v2 posting 2/2 No applies recorded yet

None of the 45 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [U-Boot] [PATCH v2 0/45] Verified boot implementation based on FIT
Quoted 11 lines · On Sat, 20 Apr 2013 16:03:20 -0700 Simon Glass <[email protected]> wrote:
Quoted 10 lines · Kim Phillips
Quoted 2 lines · On Mon, 18 Mar 2013 16:51:20 -0700 Simon Glass <[email protected]> wrote:

I have received a number of off-list comments - please do copy the list when replying so that everyone can see your comments.

I don't have time to fully review 45 patches, let alone the subject matter (e.g., no support for RSA in h/w, eh? ;), but I did notice some things that bugged me:

Quoted 8 lines
Quoted 5 lines

Re: "[PATCH v2 04/45] libfdt: Add fdt_next_subnode() to permit easy subnode iteration":

- Where's our libfdt maintainer? libfdt patches should be submitted to the dtc project first. It appears "[PATCH v2 40/45] libfdt: Add fdt_find_regions()" also suffers from this problem.

The fdt_next_subnode() is a pretty trivial change. I will submit it to the dtc project.

Ideally we'd apply the patch directly from how it was applied to the upstream dtc project.

Quoted 3 lines

The fdt_find_regions() was submitted to dtc as part of the dtc fdtgrep series. I modified the form of it in response to review feedback and that is ongoing.

ok.

Quoted 17 lines
Quoted 17 lines

- can we improve on the readability of that for loop - the improved one the patch gives us is this:

Quoted 4 lines

for (ndepth = 0,

              noffset = fdt_next_subnode(fit, image_noffset, &ndepth);
              noffset >= 0;
              noffset = fdt_next_subnode(fit, noffset, &ndepth)) {

whereas perhaps something like this:

ndepth = 0;
noffset = fdt_next_subnode(fit, image_noffset, &ndepth);

while (noffset >= 0) {
        // body
        noffset = fdt_next_subnode(fit, noffset, &ndepth);
}
Quoted 4 lines
Quoted 1 line

would be much easier to quickly visually parse?

This suffers from the problem that a 'continue' will not work as expected.

It's not like that can't be fixed - either by manually assigning noffset before it, or by using a goto.

Quoted 2 lines

I think the existing for() loop is a little better overall - everything is in one place.

it's ugly and comparatively unreadable, esp. given its alignment and the ndepth initialization...

Quoted 12 lines
Quoted 11 lines

this would also affect:

Re: "[PATCH v2 12/45] image: Move hash checking into its own function":
- which also adds lines like these:

Review

Quoted 2 lines
(quoted diff) +2 -0
+             *err_msgp = " error!\nCan't get hash algo "
+                             "property";

upon which a subsequent patch ("[PATCH v2 13/45] image: Move error! string to common place", if I'm not mistaken) corrects. Are you intentionally trying to make people review the same code twice??

Quoted 7 lines

No, what is happening here is that the first patch moves the code into a function, and the second patch removes the 'error' part of the strings, not just from that moved code but from everywhere. I find that doing two things at once is harder to review.

I am certainly not added 'error' to the strings in one patch and taking it away in the next :-)

it sounds like the 'error' string removal should appear earlier in the patchseries.

Quoted 9 lines
Quoted 8 lines

Re: "[PATCH v2 07/45] image: Split FIT code into new image-fit.c"
- after the code is split, it appears the rest of the patchseries works on improving image-fit.c instead of updating equivalent code still existing in image.c, IIRC, "[PATCH v2 13/45] image: Move error! string to common place"
- I also found it odd that git format-patch -M on this doesn't produce a shorter patch with "% equivalent" statistics: what else changed?

Quoted 3 lines

Are you suggesting that more patches should affect image.c? If so, please let me know what should specifically you want done and I will take a look. Or perhaps we can improve it once the dust clears.

as above, I believe the answer is to make the common changes (to both image.c and image-fit.c) earlier in the patchseries.

Thanks,

Kim