New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 611535 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Last visit > 30 days ago
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug

Blocked on:
issue 614780
issue 617247
issue 618835



Sign in to add a comment

vboot: Refactor vboot1 code to use vboot2 library

Project Member Reported by rspangler@chromium.org, May 12 2016

Issue description

Currently, vboot1 and vboot2 both have library functions to verify the vboot1 data structures.  The vboot2 versions are more efficient and require fewer external APIs.

Port the vboot1 higher-level functions to use the vboot2 library, then remove the duplicate vboot1 code.

This is part of a longer process of refactoring the vboot1 kernel verification code so that the UI loop can move out to depthcharge (where it's easier to support non-clamshell devices) instead of being buried inside vboot_reference.
 
Blockedon: 614780
Blockedon: 617247
Blockedon: 618835
Project Member

Comment 4 by bugdroid1@chromium.org, Jul 23 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/7c3ae42e045935728a63a6d592ecf6c5bdbd005a

commit 7c3ae42e045935728a63a6d592ecf6c5bdbd005a
Author: Randall Spangler <rspangler@chromium.org>
Date: Wed May 11 20:50:18 2016

vboot: Convert vboot1 SHA calls to use vboot2

This change replaces all calls to the old vboot1 SHA library with their
vboot2 equivalents.

This is the first in a long series of changes to move the core vboot kernel
verification into vb2, and the control/display loop out to depthcharge.

BUG=chromium:611535
BRANCH=none
TEST=make runtests; build samus firmware and boot it

Change-Id: I31986eb766176c0e39a192c5ce15730471c3cf94
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/344342
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>

[modify] https://crrev.com/7c3ae42e045935728a63a6d592ecf6c5bdbd005a/firmware/lib/cryptolib/padding.c
[modify] https://crrev.com/7c3ae42e045935728a63a6d592ecf6c5bdbd005a/Makefile
[modify] https://crrev.com/7c3ae42e045935728a63a6d592ecf6c5bdbd005a/utility/pad_digest_utility.c
[modify] https://crrev.com/7c3ae42e045935728a63a6d592ecf6c5bdbd005a/tests/vboot_firmware_tests.c
[modify] https://crrev.com/7c3ae42e045935728a63a6d592ecf6c5bdbd005a/tests/vboot_common3_tests.c
[modify] https://crrev.com/7c3ae42e045935728a63a6d592ecf6c5bdbd005a/host/lib/host_keyblock.c
[modify] https://crrev.com/7c3ae42e045935728a63a6d592ecf6c5bdbd005a/futility/file_type_usbpd1.c
[modify] https://crrev.com/7c3ae42e045935728a63a6d592ecf6c5bdbd005a/host/lib/util_misc.c
[modify] https://crrev.com/7c3ae42e045935728a63a6d592ecf6c5bdbd005a/host/linktest/main.c
[modify] https://crrev.com/7c3ae42e045935728a63a6d592ecf6c5bdbd005a/futility/misc.c
[modify] https://crrev.com/7c3ae42e045935728a63a6d592ecf6c5bdbd005a/host/lib/include/file_keys.h
[modify] https://crrev.com/7c3ae42e045935728a63a6d592ecf6c5bdbd005a/utility/signature_digest_utility.c
[modify] https://crrev.com/7c3ae42e045935728a63a6d592ecf6c5bdbd005a/host/lib/signature_digest.c
[delete] https://crrev.com/b3a625f8fef1768d78eab4cfaaea270cb3fbd0c3/firmware/lib/cryptolib/sha_utility.c
[modify] https://crrev.com/7c3ae42e045935728a63a6d592ecf6c5bdbd005a/firmware/lib/cryptolib/include/cryptolib.h
[modify] https://crrev.com/7c3ae42e045935728a63a6d592ecf6c5bdbd005a/futility/vb2_helper.c
[delete] https://crrev.com/b3a625f8fef1768d78eab4cfaaea270cb3fbd0c3/firmware/lib/cryptolib/sha512.c
[modify] https://crrev.com/7c3ae42e045935728a63a6d592ecf6c5bdbd005a/host/lib/file_keys.c
[modify] https://crrev.com/7c3ae42e045935728a63a6d592ecf6c5bdbd005a/firmware/lib/vboot_firmware.c
[delete] https://crrev.com/b3a625f8fef1768d78eab4cfaaea270cb3fbd0c3/firmware/lib/cryptolib/sha1.c
[modify] https://crrev.com/7c3ae42e045935728a63a6d592ecf6c5bdbd005a/tests/sha_test_vectors.h
[delete] https://crrev.com/b3a625f8fef1768d78eab4cfaaea270cb3fbd0c3/firmware/lib/cryptolib/sha256.c
[modify] https://crrev.com/7c3ae42e045935728a63a6d592ecf6c5bdbd005a/firmware/lib/vboot_kernel.c
[modify] https://crrev.com/7c3ae42e045935728a63a6d592ecf6c5bdbd005a/firmware/lib/include/vboot_common.h
[modify] https://crrev.com/7c3ae42e045935728a63a6d592ecf6c5bdbd005a/firmware/lib/cryptolib/rsa_utility.c
[modify] https://crrev.com/7c3ae42e045935728a63a6d592ecf6c5bdbd005a/host/lib/host_signature.c
[modify] https://crrev.com/7c3ae42e045935728a63a6d592ecf6c5bdbd005a/futility/ryu_root_header.c
[modify] https://crrev.com/7c3ae42e045935728a63a6d592ecf6c5bdbd005a/tests/sha_benchmark.c
[modify] https://crrev.com/7c3ae42e045935728a63a6d592ecf6c5bdbd005a/cgpt/cgpt_wrapper.c
[modify] https://crrev.com/7c3ae42e045935728a63a6d592ecf6c5bdbd005a/utility/verify_data.c
[modify] https://crrev.com/7c3ae42e045935728a63a6d592ecf6c5bdbd005a/tests/vboot_common2_tests.c
[delete] https://crrev.com/b3a625f8fef1768d78eab4cfaaea270cb3fbd0c3/firmware/lib/cryptolib/include/sha.h
[modify] https://crrev.com/7c3ae42e045935728a63a6d592ecf6c5bdbd005a/firmware/lib/cryptolib/include/padding.h
[modify] https://crrev.com/7c3ae42e045935728a63a6d592ecf6c5bdbd005a/firmware/lib/vboot_display.c
[modify] https://crrev.com/7c3ae42e045935728a63a6d592ecf6c5bdbd005a/futility/cmd_pcr.c
[modify] https://crrev.com/7c3ae42e045935728a63a6d592ecf6c5bdbd005a/tests/vboot_kernel_tests.c
[modify] https://crrev.com/7c3ae42e045935728a63a6d592ecf6c5bdbd005a/futility/cmd_create.c
[modify] https://crrev.com/7c3ae42e045935728a63a6d592ecf6c5bdbd005a/tests/rsa_utility_tests.c
[modify] https://crrev.com/7c3ae42e045935728a63a6d592ecf6c5bdbd005a/firmware/lib/vboot_common.c

Project Member

Comment 5 by bugdroid1@chromium.org, Jul 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/ca7251286655fe8865d0089bfc23b42ffececbf3

commit ca7251286655fe8865d0089bfc23b42ffececbf3
Author: Randall Spangler <rspangler@chromium.org>
Date: Wed May 25 23:42:44 2016

vboot: Disambiguate vb2.1 structs and functions

Futility needs to link against both vboot1/vboot2.0 and vboot2.1
functions.  This was easy in the past because it did (vboot1 +
vboot2.1) and there's no overlap.

In replacing vboot1 function calls and structs with vboot2.0, now there
are symbol collisions between vboot2.0 and vboot2.1.  For example, both
of them use a struct called vb2_signature, but the structs are defined
differently.  Functions which operate on those structs also overload.

Rename the vb2.1 structs to start with vb21_ instead of vb2_.  Do the
same for vb2.1 functions which operate on vb2.1 data.

BUG=chromium:611535
BRANCH=none
TEST=make runtests

Change-Id: I24defd87cbd9ef64239faf1a8e98ab2372d27539
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/347458
Reviewed-by: Daisuke Nojiri <dnojiri@google.com>

[modify] https://crrev.com/ca7251286655fe8865d0089bfc23b42ffececbf3/host/lib21/host_key.c
[modify] https://crrev.com/ca7251286655fe8865d0089bfc23b42ffececbf3/firmware/lib21/common.c
[modify] https://crrev.com/ca7251286655fe8865d0089bfc23b42ffececbf3/tests/vb21_host_fw_preamble_tests.c
[modify] https://crrev.com/ca7251286655fe8865d0089bfc23b42ffececbf3/firmware/lib21/packed_key.c
[modify] https://crrev.com/ca7251286655fe8865d0089bfc23b42ffececbf3/tests/vb21_api_tests.c
[modify] https://crrev.com/ca7251286655fe8865d0089bfc23b42ffececbf3/futility/cmd_sign.c
[modify] https://crrev.com/ca7251286655fe8865d0089bfc23b42ffececbf3/futility/file_type_usbpd1.c
[modify] https://crrev.com/ca7251286655fe8865d0089bfc23b42ffececbf3/host/lib/include/host_misc.h
[modify] https://crrev.com/ca7251286655fe8865d0089bfc23b42ffececbf3/futility/cmd_show.c
[modify] https://crrev.com/ca7251286655fe8865d0089bfc23b42ffececbf3/futility/futility_options.h
[modify] https://crrev.com/ca7251286655fe8865d0089bfc23b42ffececbf3/tests/vb21_common_tests.c
[modify] https://crrev.com/ca7251286655fe8865d0089bfc23b42ffececbf3/host/lib21/include/host_keyblock2.h
[modify] https://crrev.com/ca7251286655fe8865d0089bfc23b42ffececbf3/firmware/lib21/misc.c
[modify] https://crrev.com/ca7251286655fe8865d0089bfc23b42ffececbf3/futility/vb2_helper.c
[modify] https://crrev.com/ca7251286655fe8865d0089bfc23b42ffececbf3/firmware/2lib/include/2return_codes.h
[modify] https://crrev.com/ca7251286655fe8865d0089bfc23b42ffececbf3/host/lib21/include/host_signature2.h
[modify] https://crrev.com/ca7251286655fe8865d0089bfc23b42ffececbf3/tests/vb21_host_misc_tests.c
[modify] https://crrev.com/ca7251286655fe8865d0089bfc23b42ffececbf3/host/lib/include/util_misc.h
[modify] https://crrev.com/ca7251286655fe8865d0089bfc23b42ffececbf3/host/lib21/host_misc.c
[modify] https://crrev.com/ca7251286655fe8865d0089bfc23b42ffececbf3/tests/vb21_common2_tests.c
[modify] https://crrev.com/ca7251286655fe8865d0089bfc23b42ffececbf3/tests/vb21_host_sig_tests.c
[modify] https://crrev.com/ca7251286655fe8865d0089bfc23b42ffececbf3/host/lib21/host_signature.c
[modify] https://crrev.com/ca7251286655fe8865d0089bfc23b42ffececbf3/tests/vb21_host_key_tests.c
[modify] https://crrev.com/ca7251286655fe8865d0089bfc23b42ffececbf3/tests/vb21_host_keyblock_tests.c
[rename] https://crrev.com/ca7251286655fe8865d0089bfc23b42ffececbf3/firmware/lib21/include/vb21_common.h
[rename] https://crrev.com/ca7251286655fe8865d0089bfc23b42ffececbf3/firmware/lib21/include/vb21_struct.h
[modify] https://crrev.com/ca7251286655fe8865d0089bfc23b42ffececbf3/futility/file_type_rwsig.c
[modify] https://crrev.com/ca7251286655fe8865d0089bfc23b42ffececbf3/host/lib21/host_keyblock.c
[modify] https://crrev.com/ca7251286655fe8865d0089bfc23b42ffececbf3/host/lib21/include/host_key2.h
[modify] https://crrev.com/ca7251286655fe8865d0089bfc23b42ffececbf3/firmware/lib21/api.c
[modify] https://crrev.com/ca7251286655fe8865d0089bfc23b42ffececbf3/tests/vb21_misc_tests.c
[modify] https://crrev.com/ca7251286655fe8865d0089bfc23b42ffececbf3/futility/cmd_create.c
[modify] https://crrev.com/ca7251286655fe8865d0089bfc23b42ffececbf3/host/lib21/host_fw_preamble.c
[modify] https://crrev.com/ca7251286655fe8865d0089bfc23b42ffececbf3/futility/file_type.inc
[modify] https://crrev.com/ca7251286655fe8865d0089bfc23b42ffececbf3/host/lib21/include/host_fw_preamble2.h

Project Member

Comment 6 by bugdroid1@chromium.org, Jul 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/98263a1b17397032b3f7d747d48f8fd914217237

commit 98263a1b17397032b3f7d747d48f8fd914217237
Author: Randall Spangler <rspangler@chromium.org>
Date: Thu Jun 02 23:05:49 2016

vboot: Upgrade VerifyFirmwarePreamble() to vboot2.0

This replaces all calls to vboot1 VerifyFirmwarePreamble() with
equivalent vb2.0 functions.  No effect on ToT firmware, which already
uses the vboot2.0 functions.

BUG=chromium:611535
BRANCH=none
TEST=make runtests

Change-Id: I5c84e9ed0e0c75e2ea8dbd9bfcde0597bc457f24
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/349322
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>

[modify] https://crrev.com/98263a1b17397032b3f7d747d48f8fd914217237/host/lib/host_key.c
[modify] https://crrev.com/98263a1b17397032b3f7d747d48f8fd914217237/firmware/linktest/main.c
[modify] https://crrev.com/98263a1b17397032b3f7d747d48f8fd914217237/Makefile
[modify] https://crrev.com/98263a1b17397032b3f7d747d48f8fd914217237/futility/cmd_vbutil_firmware.c
[modify] https://crrev.com/98263a1b17397032b3f7d747d48f8fd914217237/tests/vboot_common3_tests.c
[modify] https://crrev.com/98263a1b17397032b3f7d747d48f8fd914217237/tests/vb21_api_tests.c
[modify] https://crrev.com/98263a1b17397032b3f7d747d48f8fd914217237/host/lib/util_misc.c
[modify] https://crrev.com/98263a1b17397032b3f7d747d48f8fd914217237/host/lib/include/host_key.h
[modify] https://crrev.com/98263a1b17397032b3f7d747d48f8fd914217237/futility/cmd_show.c
[modify] https://crrev.com/98263a1b17397032b3f7d747d48f8fd914217237/futility/futility_options.h
[modify] https://crrev.com/98263a1b17397032b3f7d747d48f8fd914217237/futility/cmd_vbutil_key.c
[modify] https://crrev.com/98263a1b17397032b3f7d747d48f8fd914217237/firmware/lib21/misc.c
[modify] https://crrev.com/98263a1b17397032b3f7d747d48f8fd914217237/firmware/2lib/include/2misc.h
[modify] https://crrev.com/98263a1b17397032b3f7d747d48f8fd914217237/host/lib/include/util_misc.h
[modify] https://crrev.com/98263a1b17397032b3f7d747d48f8fd914217237/futility/vb1_helper.h
[modify] https://crrev.com/98263a1b17397032b3f7d747d48f8fd914217237/firmware/2lib/include/2api.h
[modify] https://crrev.com/98263a1b17397032b3f7d747d48f8fd914217237/firmware/lib/include/vboot_common.h
[modify] https://crrev.com/98263a1b17397032b3f7d747d48f8fd914217237/futility/vb1_helper.c
[modify] https://crrev.com/98263a1b17397032b3f7d747d48f8fd914217237/futility/file_type_bios.c
[modify] https://crrev.com/98263a1b17397032b3f7d747d48f8fd914217237/futility/cmd_vbutil_keyblock.c
[modify] https://crrev.com/98263a1b17397032b3f7d747d48f8fd914217237/firmware/lib21/api.c
[modify] https://crrev.com/98263a1b17397032b3f7d747d48f8fd914217237/tests/vb21_misc_tests.c
[modify] https://crrev.com/98263a1b17397032b3f7d747d48f8fd914217237/firmware/lib/vboot_common.c

Project Member

Comment 7 by bugdroid1@chromium.org, Aug 4 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/158b29672a17c1d11e182f0285e0009dd39e5204

commit 158b29672a17c1d11e182f0285e0009dd39e5204
Author: Randall Spangler <rspangler@chromium.org>
Date: Fri Jun 03 21:00:27 2016

futility: cmd_show uses only vboot 2.0 APIs

This removes the remaining vboot 1.0 API calls from cmd_show.

BUG=chromium:611535
BRANCH=none
TEST=make runtests

Change-Id: I03c4260aa034100efbbea1005367cd85dfff273d
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/350173
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>

[modify] https://crrev.com/158b29672a17c1d11e182f0285e0009dd39e5204/futility/vb1_helper.h
[modify] https://crrev.com/158b29672a17c1d11e182f0285e0009dd39e5204/futility/cmd_show.c
[modify] https://crrev.com/158b29672a17c1d11e182f0285e0009dd39e5204/firmware/lib20/include/vb2_struct.h
[modify] https://crrev.com/158b29672a17c1d11e182f0285e0009dd39e5204/Makefile
[modify] https://crrev.com/158b29672a17c1d11e182f0285e0009dd39e5204/firmware/lib20/include/vb2_common.h
[modify] https://crrev.com/158b29672a17c1d11e182f0285e0009dd39e5204/host/lib21/include/host_key2.h
[modify] https://crrev.com/158b29672a17c1d11e182f0285e0009dd39e5204/firmware/lib20/kernel.c
[modify] https://crrev.com/158b29672a17c1d11e182f0285e0009dd39e5204/futility/vb1_helper.c
[modify] https://crrev.com/158b29672a17c1d11e182f0285e0009dd39e5204/host/lib/util_misc.c
[modify] https://crrev.com/158b29672a17c1d11e182f0285e0009dd39e5204/tests/vb20_common3_tests.c
[modify] https://crrev.com/158b29672a17c1d11e182f0285e0009dd39e5204/host/lib/include/util_misc.h

Project Member

Comment 8 by bugdroid1@chromium.org, Aug 4 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/31f04ada58bc67680ec9d62a404365803c76ffc1

commit 31f04ada58bc67680ec9d62a404365803c76ffc1
Author: Randall Spangler <rspangler@chromium.org>
Date: Fri Jun 17 17:57:53 2016

vboot: Always compile vb2.1 stuff into utillib

Some of the vboot 2.0 and 2.1 functions call common code that currently
lives inside the vb2.1 host library.  To be able to use vboot 2.0 code
in futility, we always need to include the 2.1 sources.

BUG=chromium:611535
BRANCH=none
TEST=make runtests

Change-Id: Ib01622fa462d0bceda1e6041b5e3395ee7c2f94f
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/356127
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>

[modify] https://crrev.com/31f04ada58bc67680ec9d62a404365803c76ffc1/Makefile

Project Member

Comment 9 by bugdroid1@chromium.org, Aug 4 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/814aaf09ceecddb16a01e1cbe0df4299b83b5699

commit 814aaf09ceecddb16a01e1cbe0df4299b83b5699
Author: Randall Spangler <rspangler@chromium.org>
Date: Fri Jun 17 17:48:16 2016

futility: Create signatures using vboot 2.0 APIs

Refactor futility to use only vboot 2.0 APIs to create signatures.

BUG=chromium:611535
BRANCH=none
TEST=make runtests

Change-Id: I176e7f424fa556d34d8fe691df5681f1e43210ce
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/356128
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>

[modify] https://crrev.com/814aaf09ceecddb16a01e1cbe0df4299b83b5699/tests/vboot_common_tests.c
[add] https://crrev.com/814aaf09ceecddb16a01e1cbe0df4299b83b5699/host/lib/host_common2.c
[modify] https://crrev.com/814aaf09ceecddb16a01e1cbe0df4299b83b5699/Makefile
[modify] https://crrev.com/814aaf09ceecddb16a01e1cbe0df4299b83b5699/futility/cmd_vbutil_firmware.c
[modify] https://crrev.com/814aaf09ceecddb16a01e1cbe0df4299b83b5699/host/lib/host_keyblock.c
[modify] https://crrev.com/814aaf09ceecddb16a01e1cbe0df4299b83b5699/futility/cmd_sign.c
[modify] https://crrev.com/814aaf09ceecddb16a01e1cbe0df4299b83b5699/host/linktest/main.c
[modify] https://crrev.com/814aaf09ceecddb16a01e1cbe0df4299b83b5699/host/lib/include/host_key.h
[modify] https://crrev.com/814aaf09ceecddb16a01e1cbe0df4299b83b5699/futility/cmd_show.c
[modify] https://crrev.com/814aaf09ceecddb16a01e1cbe0df4299b83b5699/host/lib/include/host_common.h
[modify] https://crrev.com/814aaf09ceecddb16a01e1cbe0df4299b83b5699/firmware/lib20/include/vb2_struct.h
[modify] https://crrev.com/814aaf09ceecddb16a01e1cbe0df4299b83b5699/futility/futility_options.h
[modify] https://crrev.com/814aaf09ceecddb16a01e1cbe0df4299b83b5699/host/lib21/include/host_signature2.h
[add] https://crrev.com/814aaf09ceecddb16a01e1cbe0df4299b83b5699/host/lib/host_signature2.c
[modify] https://crrev.com/814aaf09ceecddb16a01e1cbe0df4299b83b5699/host/lib/include/host_signature.h
[modify] https://crrev.com/814aaf09ceecddb16a01e1cbe0df4299b83b5699/tests/vb20_common2_tests.c
[modify] https://crrev.com/814aaf09ceecddb16a01e1cbe0df4299b83b5699/host/lib/host_signature.c
[modify] https://crrev.com/814aaf09ceecddb16a01e1cbe0df4299b83b5699/futility/file_type_bios.c
[modify] https://crrev.com/814aaf09ceecddb16a01e1cbe0df4299b83b5699/tests/run_preamble_tests.sh
[modify] https://crrev.com/814aaf09ceecddb16a01e1cbe0df4299b83b5699/tests/vb20_common3_tests.c
[modify] https://crrev.com/814aaf09ceecddb16a01e1cbe0df4299b83b5699/firmware/include/vboot_struct.h
[modify] https://crrev.com/814aaf09ceecddb16a01e1cbe0df4299b83b5699/host/lib/host_common.c
[modify] https://crrev.com/814aaf09ceecddb16a01e1cbe0df4299b83b5699/tests/vb20_common_tests.c
[modify] https://crrev.com/814aaf09ceecddb16a01e1cbe0df4299b83b5699/host/lib21/host_signature.c
[modify] https://crrev.com/814aaf09ceecddb16a01e1cbe0df4299b83b5699/futility/file_type.inc
[add] https://crrev.com/814aaf09ceecddb16a01e1cbe0df4299b83b5699/host/lib/host_key2.c
[modify] https://crrev.com/814aaf09ceecddb16a01e1cbe0df4299b83b5699/tests/gen_preamble_testdata.sh

Project Member

Comment 10 by bugdroid1@chromium.org, Aug 10 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/939cc3a5c25a3333fadafc7fc341d7e320f72fab

commit 939cc3a5c25a3333fadafc7fc341d7e320f72fab
Author: Randall Spangler <rspangler@chromium.org>
Date: Tue Jun 21 22:23:32 2016

futility: Use only vboot 2.0 APIs for keyblocks

This refactors futility and the host library to use only vboot 2.0 APIs
to create and verify keyblocks.

BUG=chromium:611535
BRANCH=none
TEST=make runtests

Change-Id: Ia3cc1e24971b94f01bcb4890c8666a3af6f84841
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/356129
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>

[modify] https://crrev.com/939cc3a5c25a3333fadafc7fc341d7e320f72fab/host/lib/include/host_key.h
[modify] https://crrev.com/939cc3a5c25a3333fadafc7fc341d7e320f72fab/futility/vb1_helper.h
[modify] https://crrev.com/939cc3a5c25a3333fadafc7fc341d7e320f72fab/futility/cmd_vbutil_kernel.c
[modify] https://crrev.com/939cc3a5c25a3333fadafc7fc341d7e320f72fab/tests/vb20_common3_tests.c
[modify] https://crrev.com/939cc3a5c25a3333fadafc7fc341d7e320f72fab/host/lib/extract_vmlinuz.c
[modify] https://crrev.com/939cc3a5c25a3333fadafc7fc341d7e320f72fab/futility/futility_options.h
[modify] https://crrev.com/939cc3a5c25a3333fadafc7fc341d7e320f72fab/host/lib/host_keyblock.c
[modify] https://crrev.com/939cc3a5c25a3333fadafc7fc341d7e320f72fab/host/lib/include/host_keyblock.h
[modify] https://crrev.com/939cc3a5c25a3333fadafc7fc341d7e320f72fab/futility/dump_kernel_config_lib.c
[modify] https://crrev.com/939cc3a5c25a3333fadafc7fc341d7e320f72fab/futility/file_type_bios.c
[modify] https://crrev.com/939cc3a5c25a3333fadafc7fc341d7e320f72fab/futility/cmd_vbutil_firmware.c
[modify] https://crrev.com/939cc3a5c25a3333fadafc7fc341d7e320f72fab/tests/vboot_common3_tests.c
[modify] https://crrev.com/939cc3a5c25a3333fadafc7fc341d7e320f72fab/firmware/2lib/include/2return_codes.h
[modify] https://crrev.com/939cc3a5c25a3333fadafc7fc341d7e320f72fab/futility/cmd_vbutil_keyblock.c
[modify] https://crrev.com/939cc3a5c25a3333fadafc7fc341d7e320f72fab/futility/vb1_helper.c
[modify] https://crrev.com/939cc3a5c25a3333fadafc7fc341d7e320f72fab/futility/file_type.inc
[modify] https://crrev.com/939cc3a5c25a3333fadafc7fc341d7e320f72fab/futility/cmd_sign.c
[modify] https://crrev.com/939cc3a5c25a3333fadafc7fc341d7e320f72fab/host/linktest/main.c
[modify] https://crrev.com/939cc3a5c25a3333fadafc7fc341d7e320f72fab/host/lib/host_key2.c
[modify] https://crrev.com/939cc3a5c25a3333fadafc7fc341d7e320f72fab/host/lib/host_signature2.c

Project Member

Comment 11 by bugdroid1@chromium.org, Aug 10 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/d46461cec2aa7547b3722623b85dcfb2f298f859

commit d46461cec2aa7547b3722623b85dcfb2f298f859
Author: Randall Spangler <rspangler@chromium.org>
Date: Wed Jun 22 23:46:23 2016

futility: Use vboot 2.0 APIs for private keys

This replaces calls to the vboot 1 host library with their vboot 2.0
equivalents.

BUG=chromium:611535
BRANCH=none
TEST=make runtests

Change-Id: Id061554fd82ea3efe35d0fe1485693b47599a863
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/356540
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>

[modify] https://crrev.com/d46461cec2aa7547b3722623b85dcfb2f298f859/host/lib/include/host_key.h
[modify] https://crrev.com/d46461cec2aa7547b3722623b85dcfb2f298f859/futility/vb1_helper.h
[modify] https://crrev.com/d46461cec2aa7547b3722623b85dcfb2f298f859/futility/cmd_vbutil_kernel.c
[modify] https://crrev.com/d46461cec2aa7547b3722623b85dcfb2f298f859/host/lib/include/host_common.h
[modify] https://crrev.com/d46461cec2aa7547b3722623b85dcfb2f298f859/tests/vb20_common3_tests.c
[modify] https://crrev.com/d46461cec2aa7547b3722623b85dcfb2f298f859/host/lib/host_key.c
[modify] https://crrev.com/d46461cec2aa7547b3722623b85dcfb2f298f859/futility/futility_options.h
[modify] https://crrev.com/d46461cec2aa7547b3722623b85dcfb2f298f859/host/lib/host_signature.c
[modify] https://crrev.com/d46461cec2aa7547b3722623b85dcfb2f298f859/host/lib/host_key2.c
[modify] https://crrev.com/d46461cec2aa7547b3722623b85dcfb2f298f859/futility/cmd_vbutil_key.c
[modify] https://crrev.com/d46461cec2aa7547b3722623b85dcfb2f298f859/host/lib21/include/host_key2.h
[modify] https://crrev.com/d46461cec2aa7547b3722623b85dcfb2f298f859/futility/cmd_vbutil_firmware.c
[modify] https://crrev.com/d46461cec2aa7547b3722623b85dcfb2f298f859/firmware/2lib/include/2return_codes.h
[modify] https://crrev.com/d46461cec2aa7547b3722623b85dcfb2f298f859/futility/cmd_create.c
[modify] https://crrev.com/d46461cec2aa7547b3722623b85dcfb2f298f859/futility/vb1_helper.c
[modify] https://crrev.com/d46461cec2aa7547b3722623b85dcfb2f298f859/host/lib/include/host_signature.h
[modify] https://crrev.com/d46461cec2aa7547b3722623b85dcfb2f298f859/futility/file_type.inc
[modify] https://crrev.com/d46461cec2aa7547b3722623b85dcfb2f298f859/futility/cmd_sign.c
[modify] https://crrev.com/d46461cec2aa7547b3722623b85dcfb2f298f859/host/linktest/main.c
[modify] https://crrev.com/d46461cec2aa7547b3722623b85dcfb2f298f859/tests/vboot_common2_tests.c
[modify] https://crrev.com/d46461cec2aa7547b3722623b85dcfb2f298f859/host/lib/host_common.c

Project Member

Comment 12 by bugdroid1@chromium.org, Sep 2 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/f7559e4b4652134b1e15de3ce31ee50a3de00f69

commit f7559e4b4652134b1e15de3ce31ee50a3de00f69
Author: Randall Spangler <rspangler@chromium.org>
Date: Thu Jun 23 20:45:59 2016

futility: Use vboot 2.0 APIs for public keys

This replaces calls to the old vboot 1 APIs with their vboot 2.0
equivalents.

BUG=chromium:611535
BRANCH=none
TEST=make runtests

Change-Id: Ieb1a127577c6428c47ac088c3aaa0d0dad6275a8
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/356541
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>

[modify] https://crrev.com/f7559e4b4652134b1e15de3ce31ee50a3de00f69/tests/verify_kernel.c
[modify] https://crrev.com/f7559e4b4652134b1e15de3ce31ee50a3de00f69/firmware/lib20/kernel.c
[modify] https://crrev.com/f7559e4b4652134b1e15de3ce31ee50a3de00f69/firmware/lib20/misc.c
[modify] https://crrev.com/f7559e4b4652134b1e15de3ce31ee50a3de00f69/futility/cmd_vbutil_firmware.c
[modify] https://crrev.com/f7559e4b4652134b1e15de3ce31ee50a3de00f69/tests/vboot_common3_tests.c
[modify] https://crrev.com/f7559e4b4652134b1e15de3ce31ee50a3de00f69/host/lib/host_common2.c
[modify] https://crrev.com/f7559e4b4652134b1e15de3ce31ee50a3de00f69/futility/cmd_sign.c
[modify] https://crrev.com/f7559e4b4652134b1e15de3ce31ee50a3de00f69/host/linktest/main.c
[modify] https://crrev.com/f7559e4b4652134b1e15de3ce31ee50a3de00f69/host/lib/include/host_key.h
[modify] https://crrev.com/f7559e4b4652134b1e15de3ce31ee50a3de00f69/firmware/lib20/include/vb2_struct.h
[modify] https://crrev.com/f7559e4b4652134b1e15de3ce31ee50a3de00f69/futility/futility_options.h
[modify] https://crrev.com/f7559e4b4652134b1e15de3ce31ee50a3de00f69/futility/cmd_vbutil_key.c
[modify] https://crrev.com/f7559e4b4652134b1e15de3ce31ee50a3de00f69/firmware/2lib/include/2return_codes.h
[modify] https://crrev.com/f7559e4b4652134b1e15de3ce31ee50a3de00f69/host/lib/host_key.c
[modify] https://crrev.com/f7559e4b4652134b1e15de3ce31ee50a3de00f69/host/lib/include/util_misc.h
[modify] https://crrev.com/f7559e4b4652134b1e15de3ce31ee50a3de00f69/futility/vb1_helper.h
[modify] https://crrev.com/f7559e4b4652134b1e15de3ce31ee50a3de00f69/futility/vb1_helper.c
[modify] https://crrev.com/f7559e4b4652134b1e15de3ce31ee50a3de00f69/futility/file_type_bios.c
[modify] https://crrev.com/f7559e4b4652134b1e15de3ce31ee50a3de00f69/futility/cmd_vbutil_keyblock.c
[modify] https://crrev.com/f7559e4b4652134b1e15de3ce31ee50a3de00f69/futility/cmd_vbutil_kernel.c
[modify] https://crrev.com/f7559e4b4652134b1e15de3ce31ee50a3de00f69/tests/vb20_common3_tests.c
[modify] https://crrev.com/f7559e4b4652134b1e15de3ce31ee50a3de00f69/futility/cmd_create.c
[modify] https://crrev.com/f7559e4b4652134b1e15de3ce31ee50a3de00f69/tests/vb20_common2_tests.c
[modify] https://crrev.com/f7559e4b4652134b1e15de3ce31ee50a3de00f69/tests/vboot_common2_tests.c
[modify] https://crrev.com/f7559e4b4652134b1e15de3ce31ee50a3de00f69/host/lib/host_key2.c

Project Member

Comment 14 by bugdroid1@chromium.org, Sep 7 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/7d0cc747c75408a6edabbf4adeb4e898b6118e97

commit 7d0cc747c75408a6edabbf4adeb4e898b6118e97
Author: Randall Spangler <rspangler@chromium.org>
Date: Thu Jun 30 18:30:32 2016

vboot: Remove vboot1 host signature functions

These have been superseded by their vboot2 equivalents.  No firmware
changes; host-only.

BUG=chromium:611535
BRANCH=none
TEST=make runtests

Change-Id: I36b5d3357767f32489efb7e480049620dcc0fce4
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/363970
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>

[modify] https://crrev.com/7d0cc747c75408a6edabbf4adeb4e898b6118e97/host/lib/include/host_signature.h
[modify] https://crrev.com/7d0cc747c75408a6edabbf4adeb4e898b6118e97/tests/vboot_common2_tests.c
[modify] https://crrev.com/7d0cc747c75408a6edabbf4adeb4e898b6118e97/host/lib/host_signature.c
[modify] https://crrev.com/7d0cc747c75408a6edabbf4adeb4e898b6118e97/host/linktest/main.c
[modify] https://crrev.com/7d0cc747c75408a6edabbf4adeb4e898b6118e97/host/lib/host_keyblock.c

Project Member

Comment 15 by bugdroid1@chromium.org, Sep 7 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/5c537e3ea8d391937938536e7170a5bfefbdafcb

commit 5c537e3ea8d391937938536e7170a5bfefbdafcb
Author: Randall Spangler <rspangler@chromium.org>
Date: Thu Jun 30 21:52:30 2016

futility: use vboot2 functions for kernel preamble

Another in a long series of refactoring changes to replace old vboot1
code with its vboot2 equivalent.  Futility changes only; no change to
firmware.

BUG=chromium:611535
BRANCH=none
TEST=make runtests

Change-Id: I7be813b82820674e975db13d5e540e49bdea028d
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/366057
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>

[modify] https://crrev.com/5c537e3ea8d391937938536e7170a5bfefbdafcb/futility/vb1_helper.h
[modify] https://crrev.com/5c537e3ea8d391937938536e7170a5bfefbdafcb/futility/cmd_vbutil_kernel.c
[modify] https://crrev.com/5c537e3ea8d391937938536e7170a5bfefbdafcb/host/lib/extract_vmlinuz.c
[modify] https://crrev.com/5c537e3ea8d391937938536e7170a5bfefbdafcb/futility/futility_options.h
[modify] https://crrev.com/5c537e3ea8d391937938536e7170a5bfefbdafcb/futility/dump_kernel_config_lib.c
[modify] https://crrev.com/5c537e3ea8d391937938536e7170a5bfefbdafcb/futility/vb1_helper.c
[modify] https://crrev.com/5c537e3ea8d391937938536e7170a5bfefbdafcb/tests/run_preamble_tests.sh
[modify] https://crrev.com/5c537e3ea8d391937938536e7170a5bfefbdafcb/futility/cmd_sign.c
[modify] https://crrev.com/5c537e3ea8d391937938536e7170a5bfefbdafcb/tests/gen_preamble_testdata.sh

Project Member

Comment 16 by bugdroid1@chromium.org, Oct 19 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/depthcharge/+/a91d15b1f1d44c37c9a177726eda2dbd407af5ce

commit a91d15b1f1d44c37c9a177726eda2dbd407af5ce
Author: Randall Spangler <rspangler@chromium.org>
Date: Mon Oct 17 17:40:58 2016

vboot: Add vb2ex_printf() callback for vboot2

The vboot2 library uses a different debug printf call than vboot1.  Add
it.  Currently, this has no effect because no vboot2 apis which generate
debug output are linked into depthcharge, but this is about to change.

BUG=chromium:611535
BRANCH=none
TEST=emerge-samus depthcharge; build samus firmware; still boots

Change-Id: I34ef301704b343e3b89c66fb383985741d58280f
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/399763
Reviewed-by: Julius Werner <jwerner@chromium.org>

[modify] https://crrev.com/a91d15b1f1d44c37c9a177726eda2dbd407af5ce/src/vboot/callbacks/debug.c

Project Member

Comment 17 by bugdroid1@chromium.org, Oct 23 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/664096bd1a7247b751bf4e564738d53a1e2795c2

commit 664096bd1a7247b751bf4e564738d53a1e2795c2
Author: Randall Spangler <rspangler@chromium.org>
Date: Thu Oct 13 23:16:41 2016

vboot: use standard memcmp, memcpy, memset

Originally, we didn't trust the firmware to provide these functions from
a standard library.  Now, with coreboot, we do.

BUG=chromium:611535
BRANCH=none
TEST=make runtests; emerge-kevin coreboot depthcharge

Change-Id: I4e624c40085f2b665275a38624340b2f6aabcf11
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/399120
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>

[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/tests/vboot_common_tests.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/tests/vboot_display_tests.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/tests/vboot_audio_tests.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/firmware/lib/cryptolib/rsa.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/Makefile
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/tests/vboot_api_kernel_tests.c
[delete] https://crrev.com/08d56aa7a7df69e80aa0a1fd6e847aa1adde5f9c/firmware/stub/utility_stub.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/firmware/lib/tpm_lite/mocked_tlcl.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/firmware/lib/vboot_nvstorage.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/tests/vboot_common3_tests.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/tests/vboot_api_kernel3_tests.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/futility/cmd_sign.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/tests/vb20_rsa_padding_tests.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/tests/vboot_api_kernel2_tests.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/firmware/lib/mocked_rollback_index.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/firmware/lib/vboot_common_init.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/tests/cgptlib_test.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/tests/rollback_index2_tests.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/firmware/lib/stateful_util.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/tests/vboot_api_kernel4_tests.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/tests/vboot_region_tests.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/utility/load_kernel_test.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/firmware/lib/include/utility.h
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/tests/vboot_api_kernel5_tests.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/firmware/lib/vboot_api_kernel.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/firmware/lib/tpm2_lite/marshaling.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/firmware/lib/gpt_misc.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/firmware/stub/tpm_lite_stub.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/firmware/lib/utility_string.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/firmware/lib/rollback_index.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/firmware/lib/vboot_audio.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/futility/vb1_helper.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/firmware/lib/include/sysincludes.h
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/tests/vboot_api_devmode_tests.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/firmware/lib/tpm_lite/tlcl.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/host/arch/arm/lib/crossystem_arch.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/tests/vb2_rsa_utility_tests.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/tests/rsa_padding_test.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/tests/vboot_common2_tests.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/tests/vb20_common3_tests.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/firmware/lib/vboot_display.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/firmware/lib/tpm2_lite/tlcl.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/firmware/lib/region-kernel.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/host/lib/signature_digest.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/firmware/lib/cgptlib/cgptlib_internal.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/tests/vboot_kernel_tests.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/firmware/lib/vboot_kernel.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/tests/rsa_utility_tests.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/firmware/lib/vboot_common.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/firmware/lib/cgptlib/cgptlib.c
[modify] https://crrev.com/664096bd1a7247b751bf4e564738d53a1e2795c2/firmware/lib/region-init.c

Project Member

Comment 19 by bugdroid1@chromium.org, Oct 29 2016

Project Member

Comment 20 by bugdroid1@chromium.org, Oct 30 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/13b109762a3bfec025a9bfcb3ead927d0291280e

commit 13b109762a3bfec025a9bfcb3ead927d0291280e
Author: Randall Spangler <rspangler@chromium.org>
Date: Fri Oct 14 18:04:27 2016

vboot: use vb2 verification functions for kernel verification

This removes old vboot1 functions in favor of the new vboot2 functions.

BUG=chromium:611535
BRANCH=none
TEST=make runtests; emerge-kevin coreboot depthcharge

Change-Id: Idc64f7714bbd9d4fa82d14b6b5d73d71c61de854
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/400900
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>

[modify] https://crrev.com/13b109762a3bfec025a9bfcb3ead927d0291280e/firmware/lib/include/vboot_common.h
[modify] https://crrev.com/13b109762a3bfec025a9bfcb3ead927d0291280e/firmware/lib20/kernel.c
[modify] https://crrev.com/13b109762a3bfec025a9bfcb3ead927d0291280e/firmware/linktest/main.c
[modify] https://crrev.com/13b109762a3bfec025a9bfcb3ead927d0291280e/Makefile
[modify] https://crrev.com/13b109762a3bfec025a9bfcb3ead927d0291280e/firmware/2lib/include/2common.h
[modify] https://crrev.com/13b109762a3bfec025a9bfcb3ead927d0291280e/tests/vboot_api_kernel5_tests.c
[modify] https://crrev.com/13b109762a3bfec025a9bfcb3ead927d0291280e/firmware/lib/vboot_api_kernel.c
[delete] https://crrev.com/f41cd04d9eeefe7b7b98c67484ee96ba4fbf1125/tests/vboot_common3_tests.c
[modify] https://crrev.com/13b109762a3bfec025a9bfcb3ead927d0291280e/tests/vboot_kernel_tests.c
[modify] https://crrev.com/13b109762a3bfec025a9bfcb3ead927d0291280e/firmware/lib/vboot_kernel.c
[modify] https://crrev.com/13b109762a3bfec025a9bfcb3ead927d0291280e/firmware/lib/vboot_common.c
[delete] https://crrev.com/f41cd04d9eeefe7b7b98c67484ee96ba4fbf1125/tests/vboot_common2_tests.c

Project Member

Comment 21 by bugdroid1@chromium.org, Oct 30 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/5a9f498182586f64865b51c874619d674f5d842c

commit 5a9f498182586f64865b51c874619d674f5d842c
Author: Randall Spangler <rspangler@chromium.org>
Date: Fri Oct 14 22:37:25 2016

host,test: Remove unneeded vb1 rsa functions

Another in a continued stream of refactoring.  This change removes more
of the vb1 rsa library code and associated tests, in favor of their vb2
equivalents.  This change touches only host-side code and its tests, not
firmware.

BUG=chromium:611535
BRANCH=none
TEST=make runtests; emerge-kevin coreboot depthcharge

Change-Id: I1973bc2f03c60da62232e30bab0fa5fe791b6b34
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/400901

[delete] https://crrev.com/13b109762a3bfec025a9bfcb3ead927d0291280e/tests/rsa_verify_benchmark.c
[modify] https://crrev.com/5a9f498182586f64865b51c874619d674f5d842c/utility/verify_data.c
[modify] https://crrev.com/5a9f498182586f64865b51c874619d674f5d842c/firmware/lib/cryptolib/include/rsa.h
[delete] https://crrev.com/13b109762a3bfec025a9bfcb3ead927d0291280e/firmware/lib/cryptolib/rsa.c
[delete] https://crrev.com/13b109762a3bfec025a9bfcb3ead927d0291280e/firmware/lib/cryptolib/rsa_utility.c
[delete] https://crrev.com/13b109762a3bfec025a9bfcb3ead927d0291280e/tests/rsa_utility_tests.c
[modify] https://crrev.com/5a9f498182586f64865b51c874619d674f5d842c/Makefile
[modify] https://crrev.com/5a9f498182586f64865b51c874619d674f5d842c/utility/pad_digest_utility.c
[modify] https://crrev.com/5a9f498182586f64865b51c874619d674f5d842c/utility/signature_digest_utility.c
[modify] https://crrev.com/5a9f498182586f64865b51c874619d674f5d842c/host/lib/include/file_keys.h
[modify] https://crrev.com/5a9f498182586f64865b51c874619d674f5d842c/host/linktest/main.c
[modify] https://crrev.com/5a9f498182586f64865b51c874619d674f5d842c/tests/vb20_rsa_padding_tests.c
[modify] https://crrev.com/5a9f498182586f64865b51c874619d674f5d842c/host/lib/host_key.c
[delete] https://crrev.com/13b109762a3bfec025a9bfcb3ead927d0291280e/utility/include/verify_data.h
[modify] https://crrev.com/5a9f498182586f64865b51c874619d674f5d842c/host/lib/file_keys.c
[delete] https://crrev.com/13b109762a3bfec025a9bfcb3ead927d0291280e/tests/rsa_padding_test.c
[modify] https://crrev.com/5a9f498182586f64865b51c874619d674f5d842c/host/lib/host_key2.c
[delete] https://crrev.com/13b109762a3bfec025a9bfcb3ead927d0291280e/tests/run_rsa_tests.sh

Project Member

Comment 22 by bugdroid1@chromium.org, Nov 6 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/46a382d6136f2fd206fd8c95180dbb816c9ad5ce

commit 46a382d6136f2fd206fd8c95180dbb816c9ad5ce
Author: Randall Spangler <rspangler@chromium.org>
Date: Tue Oct 18 19:00:07 2016

vboot: Remove vboot1 cryptolib padding source

The old vboot1 cryptolib hard-coded many of its padding arrays in a
padding.c file.  Use the equivalent vboot2 apis instead.

This change is almost exclusively on the host and test side; the only
firmware impact is on a single line of debug output.

BUG=chromium:611535
BRANCH=none
TEST=make runtests; emerge-kevin coreboot depthcharge

Change-Id: If689ffd92f0255847bea2424950da4547b2c0df3
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/400902
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>

[delete] https://crrev.com/a03a164a76a97f3f6a60ddf18c466b38f8a77400/firmware/lib/cryptolib/padding.c
[modify] https://crrev.com/46a382d6136f2fd206fd8c95180dbb816c9ad5ce/host/lib21/host_key.c
[modify] https://crrev.com/46a382d6136f2fd206fd8c95180dbb816c9ad5ce/tests/vboot_common_tests.c
[modify] https://crrev.com/46a382d6136f2fd206fd8c95180dbb816c9ad5ce/Makefile
[modify] https://crrev.com/46a382d6136f2fd206fd8c95180dbb816c9ad5ce/utility/pad_digest_utility.c
[modify] https://crrev.com/46a382d6136f2fd206fd8c95180dbb816c9ad5ce/futility/cmd_vbutil_firmware.c
[modify] https://crrev.com/46a382d6136f2fd206fd8c95180dbb816c9ad5ce/host/lib/include/signature_digest.h
[modify] https://crrev.com/46a382d6136f2fd206fd8c95180dbb816c9ad5ce/futility/cmd_sign.c
[modify] https://crrev.com/46a382d6136f2fd206fd8c95180dbb816c9ad5ce/utility/signature_digest_utility.c
[modify] https://crrev.com/46a382d6136f2fd206fd8c95180dbb816c9ad5ce/futility/cmd_show.c
[modify] https://crrev.com/46a382d6136f2fd206fd8c95180dbb816c9ad5ce/host/lib/include/host_common.h
[modify] https://crrev.com/46a382d6136f2fd206fd8c95180dbb816c9ad5ce/futility/cmd_vbutil_key.c
[modify] https://crrev.com/46a382d6136f2fd206fd8c95180dbb816c9ad5ce/firmware/lib/cryptolib/include/cryptolib.h
[modify] https://crrev.com/46a382d6136f2fd206fd8c95180dbb816c9ad5ce/futility/vb1_helper.h
[modify] https://crrev.com/46a382d6136f2fd206fd8c95180dbb816c9ad5ce/futility/vb1_helper.c
[delete] https://crrev.com/a03a164a76a97f3f6a60ddf18c466b38f8a77400/scripts/genpadding.sh
[modify] https://crrev.com/46a382d6136f2fd206fd8c95180dbb816c9ad5ce/futility/cmd_vbutil_keyblock.c
[modify] https://crrev.com/46a382d6136f2fd206fd8c95180dbb816c9ad5ce/tests/vb2_rsa_utility_tests.c
[modify] https://crrev.com/46a382d6136f2fd206fd8c95180dbb816c9ad5ce/utility/verify_data.c
[modify] https://crrev.com/46a382d6136f2fd206fd8c95180dbb816c9ad5ce/tests/vb20_common3_tests.c
[modify] https://crrev.com/46a382d6136f2fd206fd8c95180dbb816c9ad5ce/firmware/lib/cryptolib/include/rsa.h
[delete] https://crrev.com/a03a164a76a97f3f6a60ddf18c466b38f8a77400/firmware/lib/cryptolib/include/padding.h
[modify] https://crrev.com/46a382d6136f2fd206fd8c95180dbb816c9ad5ce/host/lib21/include/host_key2.h
[modify] https://crrev.com/46a382d6136f2fd206fd8c95180dbb816c9ad5ce/host/lib/signature_digest.c
[modify] https://crrev.com/46a382d6136f2fd206fd8c95180dbb816c9ad5ce/tests/vb21_common2_tests.c
[modify] https://crrev.com/46a382d6136f2fd206fd8c95180dbb816c9ad5ce/tests/vb20_common2_tests.c
[modify] https://crrev.com/46a382d6136f2fd206fd8c95180dbb816c9ad5ce/firmware/lib/vboot_common.c

Project Member

Comment 23 by bugdroid1@chromium.org, Nov 6 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/13c0776aabc152ba5e8fc758a56fc6e92d746bc5

commit 13c0776aabc152ba5e8fc758a56fc6e92d746bc5
Author: Randall Spangler <rspangler@chromium.org>
Date: Tue Oct 18 20:55:19 2016

vboot: Remove the remainder of vb1 cryptolib

At this point, all that's left are a few constants in the cryptolib
header files, and they're only used by host-side code.  So move them to
a host-side header file and get rid of cryptolib.

BUG=chromium:611535
BRANCH=none
TEST=make runtests; emerge-kevin coreboot depthcharge

Change-Id: I2235f0e84e13fef313afe54e749b73744b157884
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/400903
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>

[modify] https://crrev.com/13c0776aabc152ba5e8fc758a56fc6e92d746bc5/host/lib/host_key.c
[modify] https://crrev.com/13c0776aabc152ba5e8fc758a56fc6e92d746bc5/host/lib/include/host_signature.h
[modify] https://crrev.com/13c0776aabc152ba5e8fc758a56fc6e92d746bc5/futility/cmd_vbutil_firmware.c
[delete] https://crrev.com/46a382d6136f2fd206fd8c95180dbb816c9ad5ce/firmware/lib/cryptolib/README
[modify] https://crrev.com/13c0776aabc152ba5e8fc758a56fc6e92d746bc5/host/lib/host_keyblock.c
[modify] https://crrev.com/13c0776aabc152ba5e8fc758a56fc6e92d746bc5/tests/vb20_rsa_padding_tests.c
[modify] https://crrev.com/13c0776aabc152ba5e8fc758a56fc6e92d746bc5/host/lib/util_misc.c
[modify] https://crrev.com/13c0776aabc152ba5e8fc758a56fc6e92d746bc5/host/lib/include/host_common.h
[modify] https://crrev.com/13c0776aabc152ba5e8fc758a56fc6e92d746bc5/tests/vb2_secdatak_tests.c
[modify] https://crrev.com/13c0776aabc152ba5e8fc758a56fc6e92d746bc5/tests/vb2_nvstorage_tests.c
[modify] https://crrev.com/13c0776aabc152ba5e8fc758a56fc6e92d746bc5/tests/sha_tests.c
[modify] https://crrev.com/13c0776aabc152ba5e8fc758a56fc6e92d746bc5/futility/cmd_vbutil_key.c
[modify] https://crrev.com/13c0776aabc152ba5e8fc758a56fc6e92d746bc5/host/lib/include/file_keys.h
[delete] https://crrev.com/46a382d6136f2fd206fd8c95180dbb816c9ad5ce/firmware/lib/cryptolib/include/cryptolib.h
[modify] https://crrev.com/13c0776aabc152ba5e8fc758a56fc6e92d746bc5/tests/sha_benchmark.c
[modify] https://crrev.com/13c0776aabc152ba5e8fc758a56fc6e92d746bc5/host/lib/file_keys.c
[modify] https://crrev.com/13c0776aabc152ba5e8fc758a56fc6e92d746bc5/host/lib/host_signature2.c
[modify] https://crrev.com/13c0776aabc152ba5e8fc758a56fc6e92d746bc5/firmware/lib/include/vboot_common.h
[modify] https://crrev.com/13c0776aabc152ba5e8fc758a56fc6e92d746bc5/tests/test_common.c
[modify] https://crrev.com/13c0776aabc152ba5e8fc758a56fc6e92d746bc5/tests/vb2_secdata_tests.c
[modify] https://crrev.com/13c0776aabc152ba5e8fc758a56fc6e92d746bc5/tests/vboot_kernel_tests.c
[modify] https://crrev.com/13c0776aabc152ba5e8fc758a56fc6e92d746bc5/futility/ryu_root_header.c
[modify] https://crrev.com/13c0776aabc152ba5e8fc758a56fc6e92d746bc5/futility/cmd_vbutil_keyblock.c
[modify] https://crrev.com/13c0776aabc152ba5e8fc758a56fc6e92d746bc5/tests/rsa_padding_test.h
[modify] https://crrev.com/13c0776aabc152ba5e8fc758a56fc6e92d746bc5/cgpt/cgpt_wrapper.c
[modify] https://crrev.com/13c0776aabc152ba5e8fc758a56fc6e92d746bc5/utility/verify_data.c
[delete] https://crrev.com/46a382d6136f2fd206fd8c95180dbb816c9ad5ce/firmware/lib/cryptolib/include/rsa.h
[modify] https://crrev.com/13c0776aabc152ba5e8fc758a56fc6e92d746bc5/tests/vb2_rsa_utility_tests.c
[modify] https://crrev.com/13c0776aabc152ba5e8fc758a56fc6e92d746bc5/host/lib/host_misc.c
[modify] https://crrev.com/13c0776aabc152ba5e8fc758a56fc6e92d746bc5/host/lib/signature_digest.c
[modify] https://crrev.com/13c0776aabc152ba5e8fc758a56fc6e92d746bc5/host/lib/host_common.c
[modify] https://crrev.com/13c0776aabc152ba5e8fc758a56fc6e92d746bc5/host/lib/host_key2.c

Project Member

Comment 24 by bugdroid1@chromium.org, Nov 6 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/47eeaa6e4a03d2689c9b1b46fc9b0b0b04ace3a6

commit 47eeaa6e4a03d2689c9b1b46fc9b0b0b04ace3a6
Author: Randall Spangler <rspangler@chromium.org>
Date: Tue Oct 18 21:23:01 2016

vboot: remove unused stateful_util

Now that the vboot1 cryptolib code is gone, nothing uses stateful_util.
Remove it and its unit tests.

BUG=chromium:611535
BRANCH=none
TEST=make runtests; emerge-kevin coreboot depthcharge

Change-Id: I75b6014be00c5266545db10e87c1d9485fd1444b
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/400904
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>

[delete] https://crrev.com/13c0776aabc152ba5e8fc758a56fc6e92d746bc5/firmware/lib/stateful_util.c
[delete] https://crrev.com/13c0776aabc152ba5e8fc758a56fc6e92d746bc5/tests/stateful_util_tests.c
[modify] https://crrev.com/47eeaa6e4a03d2689c9b1b46fc9b0b0b04ace3a6/Makefile
[delete] https://crrev.com/13c0776aabc152ba5e8fc758a56fc6e92d746bc5/firmware/lib/include/stateful_util.h

Project Member

Comment 25 by bugdroid1@chromium.org, Nov 6 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/559a110f33b7ebe8d950f1c2de6b3b89791f862b

commit 559a110f33b7ebe8d950f1c2de6b3b89791f862b
Author: Randall Spangler <rspangler@chromium.org>
Date: Tue Oct 18 21:41:22 2016

vboot: use malloc and free directly

Originally, vboot1 code used VbExMalloc() and VbExFree() since it needed
to talk to EFI firmware that didn't have standard malloc() and free().
Now, coreboot and depthcharge implement them as wrappers around those
standard calls.  vboot2 code already calls them directly, so let vboot1
code do that too.

BUG=chromium:611535
BRANCH=none
TEST=make runtests; emerge-kevin coreboot depthcharge

Change-Id: I49ad0e32e38d278dc3589bfaf494bcf0e4b0a4bd
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/400905

[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/tests/vboot_common_tests.c
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/tests/vboot_display_tests.c
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/tests/vboot_audio_tests.c
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/tests/test_common.h
[delete] https://crrev.com/47eeaa6e4a03d2689c9b1b46fc9b0b0b04ace3a6/firmware/stub/vboot_api_stub_sf.c
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/Makefile
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/tests/vboot_api_kernel_tests.c
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/firmware/stub/vboot_api_stub.c
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/firmware/include/gbb_access.h
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/tests/vboot_api_kernel3_tests.c
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/tests/vboot_nvstorage_test.c
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/tests/vb20_rsa_padding_tests.c
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/host/lib/include/host_common.h
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/tests/cgptlib_test.c
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/tests/rollback_index2_tests.c
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/tests/rollback_index3_tests.c
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/tests/vboot_api_kernel4_tests.c
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/tests/vboot_region_tests.c
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/tests/vboot_api_kernel6_tests.c
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/firmware/lib/include/utility.h
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/tests/vboot_api_kernel5_tests.c
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/firmware/lib/vboot_api_kernel.c
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/firmware/lib/gpt_misc.c
[delete] https://crrev.com/47eeaa6e4a03d2689c9b1b46fc9b0b0b04ace3a6/firmware/stub/vboot_api_stub_static_sf.c
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/firmware/stub/tpm_lite_stub.c
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/firmware/stub/vboot_api_stub_stream.c
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/firmware/lib/region-fw.c
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/firmware/lib/vboot_audio.c
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/tests/vboot_api_devmode_tests.c
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/tests/vb2_rsa_utility_tests.c
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/utility/verify_data.c
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/cgpt/cgpt_add.c
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/firmware/lib/vboot_display.c
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/firmware/include/vboot_api.h
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/tests/vboot_api_kernel2_tests.c
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/firmware/lib/region-kernel.c
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/firmware/stub/vboot_api_stub_disk.c
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/tests/vboot_kernel_tests.c
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/firmware/lib/vboot_kernel.c
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/firmware/stub/vboot_api_stub_init.c
[modify] https://crrev.com/559a110f33b7ebe8d950f1c2de6b3b89791f862b/firmware/stub/vboot_api_stub_region.c

Project Member

Comment 26 by bugdroid1@chromium.org, Nov 6 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/6e3931d1f609fc23b3ca8c7f6e563926e4f38b69

commit 6e3931d1f609fc23b3ca8c7f6e563926e4f38b69
Author: Randall Spangler <rspangler@chromium.org>
Date: Tue Oct 18 22:09:21 2016

vboot: Add vb2_unpack_key_buffer

Previously, vb2_unpack_key() actually unpacked a key buffer.  Callers
that had a vb2_packed_key had to typecast it back to a uint8_t buffer to
unpack it.  Rename vb2_unpack_key() to vb2_unpack_key_buffer(), and make
vb2_unpack_key() unpack a vb2_packed_key.

BUG=chromium:611535
BRANCH=none
TEST=make runtests; emerge-kevin coreboot depthcharge;
     emerge-samus and boot it

Change-Id: I9ee38a819c59cc58a72ead78cf5ddf3d0f301ae7
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/400906
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>

[modify] https://crrev.com/6e3931d1f609fc23b3ca8c7f6e563926e4f38b69/tests/vb20_api_kernel_tests.c
[modify] https://crrev.com/6e3931d1f609fc23b3ca8c7f6e563926e4f38b69/firmware/lib20/misc.c
[modify] https://crrev.com/6e3931d1f609fc23b3ca8c7f6e563926e4f38b69/futility/cmd_vbutil_firmware.c
[modify] https://crrev.com/6e3931d1f609fc23b3ca8c7f6e563926e4f38b69/tests/vb20_rsa_padding_tests.c
[modify] https://crrev.com/6e3931d1f609fc23b3ca8c7f6e563926e4f38b69/futility/cmd_show.c
[modify] https://crrev.com/6e3931d1f609fc23b3ca8c7f6e563926e4f38b69/firmware/lib20/api_kernel.c
[modify] https://crrev.com/6e3931d1f609fc23b3ca8c7f6e563926e4f38b69/tests/vboot_api_kernel5_tests.c
[modify] https://crrev.com/6e3931d1f609fc23b3ca8c7f6e563926e4f38b69/firmware/lib/vboot_api_kernel.c
[modify] https://crrev.com/6e3931d1f609fc23b3ca8c7f6e563926e4f38b69/firmware/2lib/include/2return_codes.h
[modify] https://crrev.com/6e3931d1f609fc23b3ca8c7f6e563926e4f38b69/firmware/lib20/api.c
[modify] https://crrev.com/6e3931d1f609fc23b3ca8c7f6e563926e4f38b69/tests/vb20_misc_tests.c
[modify] https://crrev.com/6e3931d1f609fc23b3ca8c7f6e563926e4f38b69/host/lib/host_key.c
[modify] https://crrev.com/6e3931d1f609fc23b3ca8c7f6e563926e4f38b69/futility/vb1_helper.c
[modify] https://crrev.com/6e3931d1f609fc23b3ca8c7f6e563926e4f38b69/firmware/lib20/include/vb2_common.h
[modify] https://crrev.com/6e3931d1f609fc23b3ca8c7f6e563926e4f38b69/firmware/lib20/kernel.c
[modify] https://crrev.com/6e3931d1f609fc23b3ca8c7f6e563926e4f38b69/futility/cmd_vbutil_keyblock.c
[modify] https://crrev.com/6e3931d1f609fc23b3ca8c7f6e563926e4f38b69/utility/verify_data.c
[modify] https://crrev.com/6e3931d1f609fc23b3ca8c7f6e563926e4f38b69/tests/vb20_common3_tests.c
[modify] https://crrev.com/6e3931d1f609fc23b3ca8c7f6e563926e4f38b69/tests/vb20_api_tests.c
[modify] https://crrev.com/6e3931d1f609fc23b3ca8c7f6e563926e4f38b69/firmware/lib20/packed_key.c
[modify] https://crrev.com/6e3931d1f609fc23b3ca8c7f6e563926e4f38b69/tests/vb20_kernel_tests.c
[modify] https://crrev.com/6e3931d1f609fc23b3ca8c7f6e563926e4f38b69/tests/vboot_kernel_tests.c
[modify] https://crrev.com/6e3931d1f609fc23b3ca8c7f6e563926e4f38b69/firmware/lib/vboot_kernel.c
[modify] https://crrev.com/6e3931d1f609fc23b3ca8c7f6e563926e4f38b69/tests/vb20_common2_tests.c

Project Member

Comment 27 by bugdroid1@chromium.org, Nov 15 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/f182401b974b85bc4bc641d8ec43719a99777b1b

commit f182401b974b85bc4bc641d8ec43719a99777b1b
Author: Randall Spangler <rspangler@chromium.org>
Date: Tue Oct 25 17:00:27 2016

vboot: Split partition and vblock verification from LoadKernel()

LoadKernel() was a big function which did everything from looping over
partitions on a drive to loading the data within them to calling the
low-level verification functions on that data.  Split it apart into more
manageable chunks.  This also reduces indentation of the inner parts of
the code, whic increases readability.

No outwardly-visible functionality changes.

BUG=chromium:611535
BRANCH=none
TEST=make runtests; emerge-kevin coreboot depthcharge

Change-Id: Iea79e70163f5d9f1a9d0d897e4a9bacc925a742d
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/404919
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>

[modify] https://crrev.com/f182401b974b85bc4bc641d8ec43719a99777b1b/tests/verify_kernel.c
[modify] https://crrev.com/f182401b974b85bc4bc641d8ec43719a99777b1b/utility/load_kernel_test.c
[modify] https://crrev.com/f182401b974b85bc4bc641d8ec43719a99777b1b/firmware/lib/vboot_api_kernel.c
[modify] https://crrev.com/f182401b974b85bc4bc641d8ec43719a99777b1b/firmware/2lib/include/2return_codes.h
[modify] https://crrev.com/f182401b974b85bc4bc641d8ec43719a99777b1b/firmware/lib/vboot_kernel.c
[modify] https://crrev.com/f182401b974b85bc4bc641d8ec43719a99777b1b/firmware/lib/include/load_kernel_fw.h
[modify] https://crrev.com/f182401b974b85bc4bc641d8ec43719a99777b1b/tests/vboot_kernel_tests.c

Project Member

Comment 28 by bugdroid1@chromium.org, Nov 15 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/eedd4293582b86a43eab6400d0a967bccf14f1fe

commit eedd4293582b86a43eab6400d0a967bccf14f1fe
Author: Randall Spangler <rspangler@chromium.org>
Date: Tue Nov 01 22:29:05 2016

vboot: Remove LoadKernel() LBA size/count checks

Now that LoadKernel() uses a stream API for its partition data, it
doesn't care about those fields.  They're blindly passed to
cgptlib_internal, which does similar checks in CheckParameters() and
CheckHeader().  So, don't duplicate the checks.

BUG=chromium:611535
BRANCH=none
TEST=make runtests; emerge-kevin coreboot depthcharge

Change-Id: I72375496e5df7b7c17df25d358f2555fe41fe520
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/407053
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>

[modify] https://crrev.com/eedd4293582b86a43eab6400d0a967bccf14f1fe/tests/vboot_kernel_tests.c
[modify] https://crrev.com/eedd4293582b86a43eab6400d0a967bccf14f1fe/firmware/lib/vboot_kernel.c

Project Member

Comment 29 by bugdroid1@chromium.org, Dec 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/2603675460d75e3941070c44cfe90ba09a40d0ce

commit 2603675460d75e3941070c44cfe90ba09a40d0ce
Author: Randall Spangler <rspangler@chromium.org>
Date: Thu Oct 27 18:20:34 2016

vboot: Split ec software sync to its own file

This was previously done inside vboot_api_kernel.  But it has nothing to
do with kernel verification; that's just the only place where we could
easily put it given that vboot (currently) owns the firmware UI.

No outwardly-visible functionality changes.

BUG=chromium:611535
BRANCH=none
TEST=make runtests; emerge-kevin coreboot depthcharge

Change-Id: I8a434eb4449a5a86b129ecac61ad81d0ad55549c
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/404920

[add] https://crrev.com/2603675460d75e3941070c44cfe90ba09a40d0ce/firmware/lib/ec_sync.c
[modify] https://crrev.com/2603675460d75e3941070c44cfe90ba09a40d0ce/tests/vboot_api_kernel4_tests.c
[modify] https://crrev.com/2603675460d75e3941070c44cfe90ba09a40d0ce/Makefile
[rename] https://crrev.com/2603675460d75e3941070c44cfe90ba09a40d0ce/tests/ec_sync_tests.c
[modify] https://crrev.com/2603675460d75e3941070c44cfe90ba09a40d0ce/firmware/lib/vboot_api_kernel.c
[modify] https://crrev.com/2603675460d75e3941070c44cfe90ba09a40d0ce/firmware/lib/include/vboot_kernel.h

Project Member

Comment 30 by bugdroid1@chromium.org, Dec 22 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/b57d9505c0922c565d82b82b6229e80adb36cc6f

commit b57d9505c0922c565d82b82b6229e80adb36cc6f
Author: Randall Spangler <rspangler@chromium.org>
Date: Thu Oct 27 20:01:33 2016

vboot: Clean up headers

Minor tidying; no functional changes.

BUG=chromium:611535
BRANCH=none
TEST=make runtests; emerge-kevin coreboot depthcharge

Change-Id: I44c816de67025b83c9e46db54fb5427c684bbfef
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/404921
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>

[modify] https://crrev.com/b57d9505c0922c565d82b82b6229e80adb36cc6f/firmware/2lib/include/2misc.h
[modify] https://crrev.com/b57d9505c0922c565d82b82b6229e80adb36cc6f/firmware/include/vboot_api.h

Project Member

Comment 31 by bugdroid1@chromium.org, Dec 22 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/e4136dcaa0bca8fe1c0a88d4d99de675f218f5aa

commit e4136dcaa0bca8fe1c0a88d4d99de675f218f5aa
Author: Randall Spangler <rspangler@chromium.org>
Date: Thu Oct 27 21:34:59 2016

vboot: Pass vb2 context and use vboot2 NV routines

Passing the vb2 context around allows using more of the vb2 functions in
future changes, and prepares for a future where we directly use the
context as it was set up in firmware verification.

BUG=chromium:611535
BRANCH=none
TEST=make runtests; emerge-kevin coreboot depthcharge

Change-Id: I8efa606dbdec5d195b66eb899e76fdc84337ad36
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/404997
Reviewed-by: Shelley Chen <shchen@chromium.org>

[modify] https://crrev.com/e4136dcaa0bca8fe1c0a88d4d99de675f218f5aa/utility/load_kernel_test.c
[modify] https://crrev.com/e4136dcaa0bca8fe1c0a88d4d99de675f218f5aa/tests/vboot_display_tests.c
[modify] https://crrev.com/e4136dcaa0bca8fe1c0a88d4d99de675f218f5aa/firmware/lib/ec_sync.c
[modify] https://crrev.com/e4136dcaa0bca8fe1c0a88d4d99de675f218f5aa/tests/vboot_api_kernel4_tests.c
[modify] https://crrev.com/e4136dcaa0bca8fe1c0a88d4d99de675f218f5aa/firmware/lib/vboot_display.c
[modify] https://crrev.com/e4136dcaa0bca8fe1c0a88d4d99de675f218f5aa/firmware/linktest/main.c
[modify] https://crrev.com/e4136dcaa0bca8fe1c0a88d4d99de675f218f5aa/tests/ec_sync_tests.c
[modify] https://crrev.com/e4136dcaa0bca8fe1c0a88d4d99de675f218f5aa/tests/vboot_api_kernel2_tests.c
[modify] https://crrev.com/e4136dcaa0bca8fe1c0a88d4d99de675f218f5aa/tests/vboot_api_devmode_tests.c
[modify] https://crrev.com/e4136dcaa0bca8fe1c0a88d4d99de675f218f5aa/firmware/lib/vboot_api_kernel.c
[modify] https://crrev.com/e4136dcaa0bca8fe1c0a88d4d99de675f218f5aa/firmware/lib/include/vboot_kernel.h
[modify] https://crrev.com/e4136dcaa0bca8fe1c0a88d4d99de675f218f5aa/firmware/lib/include/vboot_display.h
[modify] https://crrev.com/e4136dcaa0bca8fe1c0a88d4d99de675f218f5aa/tests/vboot_api_kernel_tests.c
[modify] https://crrev.com/e4136dcaa0bca8fe1c0a88d4d99de675f218f5aa/firmware/lib/vboot_kernel.c
[modify] https://crrev.com/e4136dcaa0bca8fe1c0a88d4d99de675f218f5aa/tests/verify_kernel.c
[modify] https://crrev.com/e4136dcaa0bca8fe1c0a88d4d99de675f218f5aa/firmware/lib/include/load_kernel_fw.h
[modify] https://crrev.com/e4136dcaa0bca8fe1c0a88d4d99de675f218f5aa/tests/vboot_kernel_tests.c

Project Member

Comment 32 by bugdroid1@chromium.org, Jan 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/284bf5549a4df474534f288902db489902407830

commit 284bf5549a4df474534f288902db489902407830
Author: ChromeOS Developer <rspangler@chromium.org>
Date: Mon Oct 31 23:19:20 2016

firmware: Refactor and clean up ec_sync

Previously, the EC software sync process called VbDisplayScreen() from
several function calls deep.  Refactor software sync so that the UI
decisions are at a higher level (in ec_sync_all.c) and isolated from
the low-level EC software sync functionality (in ec_sync.c).

This is one in a series of changes which are more clearly separating
out the UI, to make it easier to support multiple UI across a range of
devices.

BUG=chromium:611535
BRANCH=none
TEST=make runtests; build_packages --board=reef chromeos-firmware; boot reef

Change-Id: I40597abeb5b0cc8f5d8fc2098e4acbed4bf59bf6
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/411921
Reviewed-by: Shelley Chen <shchen@chromium.org>

[modify] https://crrev.com/284bf5549a4df474534f288902db489902407830/firmware/2lib/include/2struct.h
[modify] https://crrev.com/284bf5549a4df474534f288902db489902407830/firmware/include/vboot_struct.h
[modify] https://crrev.com/284bf5549a4df474534f288902db489902407830/firmware/lib/vboot_api_kernel.c
[add] https://crrev.com/284bf5549a4df474534f288902db489902407830/firmware/lib/ec_sync_all.c
[modify] https://crrev.com/284bf5549a4df474534f288902db489902407830/tests/vboot_api_kernel4_tests.c
[modify] https://crrev.com/284bf5549a4df474534f288902db489902407830/firmware/lib/ec_sync.c
[modify] https://crrev.com/284bf5549a4df474534f288902db489902407830/Makefile
[modify] https://crrev.com/284bf5549a4df474534f288902db489902407830/tests/ec_sync_tests.c
[add] https://crrev.com/284bf5549a4df474534f288902db489902407830/firmware/lib/include/ec_sync.h
[modify] https://crrev.com/284bf5549a4df474534f288902db489902407830/firmware/lib/include/vboot_kernel.h
[modify] https://crrev.com/284bf5549a4df474534f288902db489902407830/firmware/2lib/include/2return_codes.h

Project Member

Comment 33 by bugdroid1@chromium.org, Jan 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/ad7a75531ea3bcfb94e0b0ded9ecfdf7a31ba969

commit ad7a75531ea3bcfb94e0b0ded9ecfdf7a31ba969
Author: Randall Spangler <rspangler@chromium.org>
Date: Tue Nov 22 20:58:22 2016

firmware: Remove LoadKernelParams from APIs

This cleans up the vboot functions which handle display so they don't
need to pass it around.  Eventually, it'll be absorbed by vb2_context.

BUG=chromium:611535
BRANCH=none
TEST=make runtests; build_packages --board=reef chromeos-firmware; boot reef

Change-Id: I58169dfd37abe657f9b9aa339cc72ffa398329e0
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/414288
Reviewed-by: Shelley Chen <shchen@chromium.org>

[modify] https://crrev.com/ad7a75531ea3bcfb94e0b0ded9ecfdf7a31ba969/utility/load_kernel_test.c
[modify] https://crrev.com/ad7a75531ea3bcfb94e0b0ded9ecfdf7a31ba969/firmware/lib/ec_sync_all.c
[modify] https://crrev.com/ad7a75531ea3bcfb94e0b0ded9ecfdf7a31ba969/tests/vboot_api_kernel4_tests.c
[modify] https://crrev.com/ad7a75531ea3bcfb94e0b0ded9ecfdf7a31ba969/firmware/lib/ec_sync.c
[modify] https://crrev.com/ad7a75531ea3bcfb94e0b0ded9ecfdf7a31ba969/tests/vboot_api_kernel_tests.c
[modify] https://crrev.com/ad7a75531ea3bcfb94e0b0ded9ecfdf7a31ba969/tests/vboot_api_kernel2_tests.c
[modify] https://crrev.com/ad7a75531ea3bcfb94e0b0ded9ecfdf7a31ba969/tests/vboot_api_devmode_tests.c
[modify] https://crrev.com/ad7a75531ea3bcfb94e0b0ded9ecfdf7a31ba969/firmware/lib/include/ec_sync.h
[modify] https://crrev.com/ad7a75531ea3bcfb94e0b0ded9ecfdf7a31ba969/firmware/lib/include/vboot_kernel.h
[modify] https://crrev.com/ad7a75531ea3bcfb94e0b0ded9ecfdf7a31ba969/firmware/lib/vboot_api_kernel.c
[modify] https://crrev.com/ad7a75531ea3bcfb94e0b0ded9ecfdf7a31ba969/tests/verify_kernel.c
[modify] https://crrev.com/ad7a75531ea3bcfb94e0b0ded9ecfdf7a31ba969/firmware/lib/include/load_kernel_fw.h
[modify] https://crrev.com/ad7a75531ea3bcfb94e0b0ded9ecfdf7a31ba969/tests/vboot_kernel_tests.c

Project Member

Comment 34 by bugdroid1@chromium.org, Jan 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/ad7a75531ea3bcfb94e0b0ded9ecfdf7a31ba969

commit ad7a75531ea3bcfb94e0b0ded9ecfdf7a31ba969
Author: Randall Spangler <rspangler@chromium.org>
Date: Tue Nov 22 20:58:22 2016

firmware: Remove LoadKernelParams from APIs

This cleans up the vboot functions which handle display so they don't
need to pass it around.  Eventually, it'll be absorbed by vb2_context.

BUG=chromium:611535
BRANCH=none
TEST=make runtests; build_packages --board=reef chromeos-firmware; boot reef

Change-Id: I58169dfd37abe657f9b9aa339cc72ffa398329e0
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/414288
Reviewed-by: Shelley Chen <shchen@chromium.org>

[modify] https://crrev.com/ad7a75531ea3bcfb94e0b0ded9ecfdf7a31ba969/utility/load_kernel_test.c
[modify] https://crrev.com/ad7a75531ea3bcfb94e0b0ded9ecfdf7a31ba969/firmware/lib/ec_sync_all.c
[modify] https://crrev.com/ad7a75531ea3bcfb94e0b0ded9ecfdf7a31ba969/tests/vboot_api_kernel4_tests.c
[modify] https://crrev.com/ad7a75531ea3bcfb94e0b0ded9ecfdf7a31ba969/firmware/lib/ec_sync.c
[modify] https://crrev.com/ad7a75531ea3bcfb94e0b0ded9ecfdf7a31ba969/tests/vboot_api_kernel_tests.c
[modify] https://crrev.com/ad7a75531ea3bcfb94e0b0ded9ecfdf7a31ba969/tests/vboot_api_kernel2_tests.c
[modify] https://crrev.com/ad7a75531ea3bcfb94e0b0ded9ecfdf7a31ba969/tests/vboot_api_devmode_tests.c
[modify] https://crrev.com/ad7a75531ea3bcfb94e0b0ded9ecfdf7a31ba969/firmware/lib/include/ec_sync.h
[modify] https://crrev.com/ad7a75531ea3bcfb94e0b0ded9ecfdf7a31ba969/firmware/lib/include/vboot_kernel.h
[modify] https://crrev.com/ad7a75531ea3bcfb94e0b0ded9ecfdf7a31ba969/firmware/lib/vboot_api_kernel.c
[modify] https://crrev.com/ad7a75531ea3bcfb94e0b0ded9ecfdf7a31ba969/tests/verify_kernel.c
[modify] https://crrev.com/ad7a75531ea3bcfb94e0b0ded9ecfdf7a31ba969/firmware/lib/include/load_kernel_fw.h
[modify] https://crrev.com/ad7a75531ea3bcfb94e0b0ded9ecfdf7a31ba969/tests/vboot_kernel_tests.c

Project Member

Comment 35 by bugdroid1@chromium.org, Jan 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/df4eb2bb7be9d61bfe9bdf6c33f836f358b18cf6

commit df4eb2bb7be9d61bfe9bdf6c33f836f358b18cf6
Author: Randall Spangler <rspangler@chromium.org>
Date: Wed Nov 23 20:21:03 2016

firmware: Split out kernel UI

This moves the UI loops out of vboot_api_kernel.c into vboot_ui.c, so
that it'll be easier to support different UIs for different form factors.

BUG=chromium:611535
BRANCH=none
TEST=make runtests; build_packages --board=reef chromeos-firmware; boot reef

Change-Id: I451b15f65aceb427ffdd94b19f44e91ebc10a860
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/414289
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Shelley Chen <shchen@chromium.org>

[modify] https://crrev.com/df4eb2bb7be9d61bfe9bdf6c33f836f358b18cf6/firmware/lib/vboot_api_kernel.c
[modify] https://crrev.com/df4eb2bb7be9d61bfe9bdf6c33f836f358b18cf6/firmware/lib/include/vboot_kernel.h
[modify] https://crrev.com/df4eb2bb7be9d61bfe9bdf6c33f836f358b18cf6/Makefile
[add] https://crrev.com/df4eb2bb7be9d61bfe9bdf6c33f836f358b18cf6/firmware/lib/vboot_ui.c

Project Member

Comment 36 by bugdroid1@chromium.org, Jan 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/21015898b39aa8742057ed6e6423c308c8d0a15d

commit 21015898b39aa8742057ed6e6423c308c8d0a15d
Author: Randall Spangler <rspangler@chromium.org>
Date: Tue Jan 03 21:49:18 2017

firmware: replace VBDEBUG(()) macro with VB2_DEBUG()

The original VBDEBUG macro used doubly-nested parens to work with
MSVC, which didn't support varargs in macros.  We now only use more
modern compilers, so replace it with the VB2_DEBUG macro and get rid
of the ugly and fragile double parens.

BUG=chromium:611535
BRANCH=none
TEST=make runtests; build_packages --board=reef chromeos-firmware

Change-Id: Ifc0cb0733b14daaa1fde095fab7da4215a538c77
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/425133
Reviewed-by: Shelley Chen <shchen@chromium.org>

[modify] https://crrev.com/21015898b39aa8742057ed6e6423c308c8d0a15d/host/lib/crossystem.c
[modify] https://crrev.com/21015898b39aa8742057ed6e6423c308c8d0a15d/tests/vboot_audio_tests.c
[modify] https://crrev.com/21015898b39aa8742057ed6e6423c308c8d0a15d/tests/vboot_api_kernel_tests.c
[modify] https://crrev.com/21015898b39aa8742057ed6e6423c308c8d0a15d/firmware/lib/vboot_common_init.c
[modify] https://crrev.com/21015898b39aa8742057ed6e6423c308c8d0a15d/firmware/lib/vboot_ui.c
[modify] https://crrev.com/21015898b39aa8742057ed6e6423c308c8d0a15d/firmware/lib/tpm2_lite/tlcl.c
[modify] https://crrev.com/21015898b39aa8742057ed6e6423c308c8d0a15d/firmware/lib/include/utility.h
[modify] https://crrev.com/21015898b39aa8742057ed6e6423c308c8d0a15d/firmware/lib/vboot_api_kernel.c
[modify] https://crrev.com/21015898b39aa8742057ed6e6423c308c8d0a15d/firmware/lib/tpm2_lite/marshaling.c
[modify] https://crrev.com/21015898b39aa8742057ed6e6423c308c8d0a15d/firmware/lib/gpt_misc.c
[modify] https://crrev.com/21015898b39aa8742057ed6e6423c308c8d0a15d/host/lib/file_keys.c
[modify] https://crrev.com/21015898b39aa8742057ed6e6423c308c8d0a15d/firmware/stub/tpm_lite_stub.c
[modify] https://crrev.com/21015898b39aa8742057ed6e6423c308c8d0a15d/firmware/lib/rollback_index.c
[modify] https://crrev.com/21015898b39aa8742057ed6e6423c308c8d0a15d/firmware/lib/vboot_audio.c
[modify] https://crrev.com/21015898b39aa8742057ed6e6423c308c8d0a15d/tests/vboot_api_devmode_tests.c
[modify] https://crrev.com/21015898b39aa8742057ed6e6423c308c8d0a15d/firmware/lib/tpm_lite/tlcl.c
[modify] https://crrev.com/21015898b39aa8742057ed6e6423c308c8d0a15d/firmware/lib/vboot_display.c
[modify] https://crrev.com/21015898b39aa8742057ed6e6423c308c8d0a15d/host/lib/host_misc.c
[modify] https://crrev.com/21015898b39aa8742057ed6e6423c308c8d0a15d/firmware/lib/region-kernel.c
[modify] https://crrev.com/21015898b39aa8742057ed6e6423c308c8d0a15d/host/lib/signature_digest.c
[modify] https://crrev.com/21015898b39aa8742057ed6e6423c308c8d0a15d/firmware/lib/vboot_common.c
[modify] https://crrev.com/21015898b39aa8742057ed6e6423c308c8d0a15d/firmware/lib/cgptlib/cgptlib.c

Project Member

Comment 37 by bugdroid1@chromium.org, Mar 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/e0a3f85a46b50bfc0197a75e800eec0ae893e466

commit e0a3f85a46b50bfc0197a75e800eec0ae893e466
Author: Nicolas Boichat <drinkcat@google.com>
Date: Thu Mar 16 18:25:46 2017

host_keyblock: Fix vb2_create_keyblock_external

939cc3a "futility: Use only vboot 2.0 APIs for keyblocks" introduced
2 subtle bugs, and we could still pass unit tests. Until we start
adding more signing algorithms and sig_data_size != 0.

BUG=chromium:611535
BRANCH=none
TEST=make runtests

Change-Id: Ief95e5ab773185b59276cf06d1efaa29f1212466
Reviewed-on: https://chromium-review.googlesource.com/448399
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>

[modify] https://crrev.com/e0a3f85a46b50bfc0197a75e800eec0ae893e466/host/lib/host_keyblock.c

Project Member

Comment 38 by bugdroid1@chromium.org, Mar 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/114ac2079ed5fafc8deb9cbf58b5af01e74432b1

commit 114ac2079ed5fafc8deb9cbf58b5af01e74432b1
Author: Nicolas Boichat <drinkcat@google.com>
Date: Thu Mar 16 18:25:47 2017

vbutil_keyblock: Force checking the signature if signpubkey is provided

Previously, futility vbutil_keyblock --unpack would just ignore the error
if the keyblock was not signed (but a signing public key was provided).

This fix would have caught the regression introduced by
939cc3a "futility: Use only vboot 2.0 APIs for keyblocks"

BUG=chromium:611535
BRANCH=none
TEST=make runtests on m/master => fails
TEST=make runtests with CL:448399 => succeeds

Change-Id: Id7f0a248863aae2f41c2fa46fbb8a37848e707a9
Reviewed-on: https://chromium-review.googlesource.com/449058
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>

[modify] https://crrev.com/114ac2079ed5fafc8deb9cbf58b5af01e74432b1/futility/cmd_vbutil_keyblock.c

Project Member

Comment 39 by bugdroid1@chromium.org, Jul 27 2017

Labels: merge-merged-firmware-reef-9042.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/8d9149e5f18fb7d7528e7948e5412e737ca391ff

commit 8d9149e5f18fb7d7528e7948e5412e737ca391ff
Author: Randall Spangler <rspangler@chromium.org>
Date: Thu Jul 27 20:46:59 2017

vboot: Split ec software sync to its own file

This was previously done inside vboot_api_kernel.  But it has nothing to
do with kernel verification; that's just the only place where we could
easily put it given that vboot (currently) owns the firmware UI.

No outwardly-visible functionality changes.

BUG=chromium:611535
BRANCH=none
TEST=make runtests; emerge-kevin coreboot depthcharge

Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/404920

(cherry picked from commit 2603675460d75e3941070c44cfe90ba09a40d0ce)

Change-Id: I079e7cbf17599017f6626ec0d8077edabca06d08
Reviewed-on: https://chromium-review.googlesource.com/575647
Tested-by: Caveh Jalali <caveh@google.com>
Trybot-Ready: Caveh Jalali <caveh@google.com>
Commit-Queue: Caveh Jalali <caveh@google.com>
Reviewed-by: Caveh Jalali <caveh@google.com>
Reviewed-by: Randall Spangler <rspangler@chromium.org>

[add] https://crrev.com/8d9149e5f18fb7d7528e7948e5412e737ca391ff/firmware/lib/ec_sync.c
[modify] https://crrev.com/8d9149e5f18fb7d7528e7948e5412e737ca391ff/tests/vboot_api_kernel4_tests.c
[modify] https://crrev.com/8d9149e5f18fb7d7528e7948e5412e737ca391ff/Makefile
[rename] https://crrev.com/8d9149e5f18fb7d7528e7948e5412e737ca391ff/tests/ec_sync_tests.c
[modify] https://crrev.com/8d9149e5f18fb7d7528e7948e5412e737ca391ff/firmware/lib/vboot_api_kernel.c
[modify] https://crrev.com/8d9149e5f18fb7d7528e7948e5412e737ca391ff/firmware/lib/include/vboot_kernel.h

Project Member

Comment 40 by bugdroid1@chromium.org, Jul 27 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/96c3bc38d45af0e27e15b85f92b4fc3dfedd9a0c

commit 96c3bc38d45af0e27e15b85f92b4fc3dfedd9a0c
Author: Randall Spangler <rspangler@chromium.org>
Date: Thu Jul 27 20:47:02 2017

vboot: Pass vb2 context and use vboot2 NV routines

Passing the vb2 context around allows using more of the vb2 functions in
future changes, and prepares for a future where we directly use the
context as it was set up in firmware verification.

BUG=chromium:611535
BRANCH=none
TEST=make runtests; emerge-kevin coreboot depthcharge

Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/404997
Reviewed-by: Shelley Chen <shchen@chromium.org>

(cherry picked from commit e4136dcaa0bca8fe1c0a88d4d99de675f218f5aa)

Change-Id: I0bc3a1259ad595cc20b5a1683687227019a4b950
Reviewed-on: https://chromium-review.googlesource.com/575648
Commit-Queue: Caveh Jalali <caveh@google.com>
Tested-by: Caveh Jalali <caveh@google.com>
Trybot-Ready: Caveh Jalali <caveh@google.com>
Reviewed-by: Randall Spangler <rspangler@chromium.org>

[modify] https://crrev.com/96c3bc38d45af0e27e15b85f92b4fc3dfedd9a0c/utility/load_kernel_test.c
[modify] https://crrev.com/96c3bc38d45af0e27e15b85f92b4fc3dfedd9a0c/tests/vboot_display_tests.c
[modify] https://crrev.com/96c3bc38d45af0e27e15b85f92b4fc3dfedd9a0c/firmware/lib/ec_sync.c
[modify] https://crrev.com/96c3bc38d45af0e27e15b85f92b4fc3dfedd9a0c/tests/vboot_api_kernel4_tests.c
[modify] https://crrev.com/96c3bc38d45af0e27e15b85f92b4fc3dfedd9a0c/firmware/lib/vboot_display.c
[modify] https://crrev.com/96c3bc38d45af0e27e15b85f92b4fc3dfedd9a0c/firmware/linktest/main.c
[modify] https://crrev.com/96c3bc38d45af0e27e15b85f92b4fc3dfedd9a0c/tests/ec_sync_tests.c
[modify] https://crrev.com/96c3bc38d45af0e27e15b85f92b4fc3dfedd9a0c/tests/vboot_api_kernel2_tests.c
[modify] https://crrev.com/96c3bc38d45af0e27e15b85f92b4fc3dfedd9a0c/tests/vboot_api_devmode_tests.c
[modify] https://crrev.com/96c3bc38d45af0e27e15b85f92b4fc3dfedd9a0c/firmware/lib/vboot_api_kernel.c
[modify] https://crrev.com/96c3bc38d45af0e27e15b85f92b4fc3dfedd9a0c/firmware/lib/include/vboot_kernel.h
[modify] https://crrev.com/96c3bc38d45af0e27e15b85f92b4fc3dfedd9a0c/firmware/lib/include/vboot_display.h
[modify] https://crrev.com/96c3bc38d45af0e27e15b85f92b4fc3dfedd9a0c/tests/vboot_api_kernel_tests.c
[modify] https://crrev.com/96c3bc38d45af0e27e15b85f92b4fc3dfedd9a0c/firmware/lib/vboot_kernel.c
[modify] https://crrev.com/96c3bc38d45af0e27e15b85f92b4fc3dfedd9a0c/tests/verify_kernel.c
[modify] https://crrev.com/96c3bc38d45af0e27e15b85f92b4fc3dfedd9a0c/firmware/lib/include/load_kernel_fw.h
[modify] https://crrev.com/96c3bc38d45af0e27e15b85f92b4fc3dfedd9a0c/tests/vboot_kernel_tests.c

Project Member

Comment 41 by bugdroid1@chromium.org, Jul 27 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/6f11c41bf16580059b419a1ec0f17c6ef9ef1a45

commit 6f11c41bf16580059b419a1ec0f17c6ef9ef1a45
Author: ChromeOS Developer <rspangler@chromium.org>
Date: Thu Jul 27 20:47:04 2017

firmware: Refactor and clean up ec_sync

Previously, the EC software sync process called VbDisplayScreen() from
several function calls deep.  Refactor software sync so that the UI
decisions are at a higher level (in ec_sync_all.c) and isolated from
the low-level EC software sync functionality (in ec_sync.c).

This is one in a series of changes which are more clearly separating
out the UI, to make it easier to support multiple UI across a range of
devices.

BUG=chromium:611535
BRANCH=none
TEST=make runtests; build_packages --board=reef chromeos-firmware; boot reef

Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/411921
Reviewed-by: Shelley Chen <shchen@chromium.org>

(cherry picked from commit 284bf5549a4df474534f288902db489902407830)

Change-Id: Ic95ba7f129baa6fb4bbf201f20a4ebb2b58b98c6
Reviewed-on: https://chromium-review.googlesource.com/575649
Commit-Queue: Caveh Jalali <caveh@google.com>
Tested-by: Caveh Jalali <caveh@google.com>
Trybot-Ready: Caveh Jalali <caveh@google.com>
Reviewed-by: Randall Spangler <rspangler@chromium.org>

[modify] https://crrev.com/6f11c41bf16580059b419a1ec0f17c6ef9ef1a45/firmware/2lib/include/2struct.h
[modify] https://crrev.com/6f11c41bf16580059b419a1ec0f17c6ef9ef1a45/firmware/include/vboot_struct.h
[modify] https://crrev.com/6f11c41bf16580059b419a1ec0f17c6ef9ef1a45/firmware/lib/vboot_api_kernel.c
[add] https://crrev.com/6f11c41bf16580059b419a1ec0f17c6ef9ef1a45/firmware/lib/ec_sync_all.c
[modify] https://crrev.com/6f11c41bf16580059b419a1ec0f17c6ef9ef1a45/tests/vboot_api_kernel4_tests.c
[modify] https://crrev.com/6f11c41bf16580059b419a1ec0f17c6ef9ef1a45/firmware/lib/ec_sync.c
[modify] https://crrev.com/6f11c41bf16580059b419a1ec0f17c6ef9ef1a45/Makefile
[modify] https://crrev.com/6f11c41bf16580059b419a1ec0f17c6ef9ef1a45/tests/ec_sync_tests.c
[add] https://crrev.com/6f11c41bf16580059b419a1ec0f17c6ef9ef1a45/firmware/lib/include/ec_sync.h
[modify] https://crrev.com/6f11c41bf16580059b419a1ec0f17c6ef9ef1a45/firmware/lib/include/vboot_kernel.h
[modify] https://crrev.com/6f11c41bf16580059b419a1ec0f17c6ef9ef1a45/firmware/2lib/include/2return_codes.h

Project Member

Comment 42 by bugdroid1@chromium.org, Jul 27 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/297932c2618e463203ca955eb75d62b88a491c1c

commit 297932c2618e463203ca955eb75d62b88a491c1c
Author: Randall Spangler <rspangler@chromium.org>
Date: Thu Jul 27 20:47:06 2017

firmware: Remove LoadKernelParams from APIs

This cleans up the vboot functions which handle display so they don't
need to pass it around.  Eventually, it'll be absorbed by vb2_context.

BUG=chromium:611535
BRANCH=none
TEST=make runtests; build_packages --board=reef chromeos-firmware; boot reef

Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/414288
Reviewed-by: Shelley Chen <shchen@chromium.org>

(cherry picked from commit ad7a75531ea3bcfb94e0b0ded9ecfdf7a31ba969)

Change-Id: Ia4651ecb5ee196b938c1bf2641692213903728ed
Reviewed-on: https://chromium-review.googlesource.com/575650
Commit-Queue: Caveh Jalali <caveh@google.com>
Tested-by: Caveh Jalali <caveh@google.com>
Trybot-Ready: Caveh Jalali <caveh@google.com>
Reviewed-by: Randall Spangler <rspangler@chromium.org>

[modify] https://crrev.com/297932c2618e463203ca955eb75d62b88a491c1c/utility/load_kernel_test.c
[modify] https://crrev.com/297932c2618e463203ca955eb75d62b88a491c1c/firmware/lib/ec_sync_all.c
[modify] https://crrev.com/297932c2618e463203ca955eb75d62b88a491c1c/tests/vboot_api_kernel4_tests.c
[modify] https://crrev.com/297932c2618e463203ca955eb75d62b88a491c1c/firmware/lib/ec_sync.c
[modify] https://crrev.com/297932c2618e463203ca955eb75d62b88a491c1c/tests/vboot_api_kernel_tests.c
[modify] https://crrev.com/297932c2618e463203ca955eb75d62b88a491c1c/tests/vboot_api_kernel2_tests.c
[modify] https://crrev.com/297932c2618e463203ca955eb75d62b88a491c1c/tests/vboot_api_devmode_tests.c
[modify] https://crrev.com/297932c2618e463203ca955eb75d62b88a491c1c/firmware/lib/include/ec_sync.h
[modify] https://crrev.com/297932c2618e463203ca955eb75d62b88a491c1c/firmware/lib/include/vboot_kernel.h
[modify] https://crrev.com/297932c2618e463203ca955eb75d62b88a491c1c/firmware/lib/vboot_api_kernel.c
[modify] https://crrev.com/297932c2618e463203ca955eb75d62b88a491c1c/tests/verify_kernel.c
[modify] https://crrev.com/297932c2618e463203ca955eb75d62b88a491c1c/firmware/lib/include/load_kernel_fw.h
[modify] https://crrev.com/297932c2618e463203ca955eb75d62b88a491c1c/tests/vboot_kernel_tests.c

Project Member

Comment 43 by bugdroid1@chromium.org, Aug 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/8e25580609f0e571c839a94fedd51de75caa70ba

commit 8e25580609f0e571c839a94fedd51de75caa70ba
Author: Randall Spangler <rspangler@chromium.org>
Date: Mon Aug 21 16:45:19 2017

firmware: Split out kernel UI

This moves the UI loops out of vboot_api_kernel.c into vboot_ui.c, so
that it'll be easier to support different UIs for different form factors.

This change also fixes some FW FAFT items (ex: firmware_CorruptBothFwSigAB)
which is failed by incorrect recovery reason '2'.

BUG=chromium:611535,b:64546699,b:64816192
BRANCH=none
TEST=make runtests; build_packages --board=reef chromeos-firmware; boot reef

Change-Id: I451b15f65aceb427ffdd94b19f44e91ebc10a860
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/414289
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Shelley Chen <shchen@chromium.org>
(cherry picked from commit df4eb2bb7be9d61bfe9bdf6c33f836f358b18cf6)
Reviewed-on: https://chromium-review.googlesource.com/622170
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: Kevin Chiu <Kevin.Chiu@quantatw.com>
Commit-Queue: Kevin Chiu <Kevin.Chiu@quantatw.com>

[modify] https://crrev.com/8e25580609f0e571c839a94fedd51de75caa70ba/firmware/lib/vboot_api_kernel.c
[modify] https://crrev.com/8e25580609f0e571c839a94fedd51de75caa70ba/firmware/lib/include/vboot_kernel.h
[modify] https://crrev.com/8e25580609f0e571c839a94fedd51de75caa70ba/Makefile
[add] https://crrev.com/8e25580609f0e571c839a94fedd51de75caa70ba/firmware/lib/vboot_ui.c

Project Member

Comment 44 by bugdroid1@chromium.org, Aug 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/406b14d78f27d3143f3a7cd384c8159e33be44c1

commit 406b14d78f27d3143f3a7cd384c8159e33be44c1
Author: Randall Spangler <rspangler@chromium.org>
Date: Mon Aug 21 16:50:27 2017

vboot: Clean up headers

Minor tidying; no functional changes.

BUG=chromium:611535
BRANCH=none
TEST=make runtests; emerge-kevin coreboot depthcharge

Change-Id: I44c816de67025b83c9e46db54fb5427c684bbfef
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/404921
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
(cherry picked from commit b57d9505c0922c565d82b82b6229e80adb36cc6f)
Reviewed-on: https://chromium-review.googlesource.com/622169
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: Kevin Chiu <Kevin.Chiu@quantatw.com>
Commit-Queue: Kevin Chiu <Kevin.Chiu@quantatw.com>

[modify] https://crrev.com/406b14d78f27d3143f3a7cd384c8159e33be44c1/firmware/2lib/include/2misc.h
[modify] https://crrev.com/406b14d78f27d3143f3a7cd384c8159e33be44c1/firmware/include/vboot_api.h

Project Member

Comment 45 by bugdroid1@chromium.org, Jan 6 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/5142132f44bbee683c830fdb837bbedb00bad8ba

commit 5142132f44bbee683c830fdb837bbedb00bad8ba
Author: Randall Spangler <rspangler@chromium.org>
Date: Sat Jan 06 05:14:11 2018

firmware: use sd->gbb_flags

Vboot1 code directly referenced the GBB from cparams even though now
it has access to the GBB flags via the vb2 context.  Refactor all
existing code to use the vb2 context, since that takes us one step
closer to getting rid of the old vboot1 cparams.

No change in functionality.

BUG=chromium:611535
BRANCH=none
TEST=make -j runtests; build bob firmware and boot it

Change-Id: Ic4a5bf215b723a2eacbf0a4cf0eba8b1338155a2
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/847310
Reviewed-by: Shelley Chen <shchen@chromium.org>

[modify] https://crrev.com/5142132f44bbee683c830fdb837bbedb00bad8ba/tests/vboot_detach_menu_tests.c
[modify] https://crrev.com/5142132f44bbee683c830fdb837bbedb00bad8ba/firmware/2lib/include/2struct.h
[modify] https://crrev.com/5142132f44bbee683c830fdb837bbedb00bad8ba/firmware/lib/vboot_ui_menu.c
[modify] https://crrev.com/5142132f44bbee683c830fdb837bbedb00bad8ba/firmware/lib/vboot_ui.c
[modify] https://crrev.com/5142132f44bbee683c830fdb837bbedb00bad8ba/firmware/lib/vboot_display.c
[modify] https://crrev.com/5142132f44bbee683c830fdb837bbedb00bad8ba/firmware/lib/ec_sync.c
[modify] https://crrev.com/5142132f44bbee683c830fdb837bbedb00bad8ba/tests/ec_sync_tests.c
[modify] https://crrev.com/5142132f44bbee683c830fdb837bbedb00bad8ba/tests/vboot_api_kernel2_tests.c
[modify] https://crrev.com/5142132f44bbee683c830fdb837bbedb00bad8ba/tests/vboot_api_devmode_tests.c
[modify] https://crrev.com/5142132f44bbee683c830fdb837bbedb00bad8ba/firmware/lib/vboot_api_kernel.c

Project Member

Comment 46 by bugdroid1@chromium.org, Jan 6 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/de818cc08fab92ad389dc92f31687f3314a1a03a

commit de818cc08fab92ad389dc92f31687f3314a1a03a
Author: Randall Spangler <rspangler@chromium.org>
Date: Sat Jan 06 05:14:11 2018

firmware: simplify audio

Vboot firmware previously supported a rather complex audio looping
library.  Our original intent was to allow developers to flash a
custom beep sequence / tune as an easter egg.  We never fully
supported that, but the code to allow it lived on.  Get rid of that.

Vboot also previously made no assumptions about the frequency of
VbExGetTimer(), which was only used by the vboot_audio library.  So it
spent 10ms every boot measuring the frequency.  Which is silly now,
because depthcharge implements that as a microsecond timer.  Get rid
of that measurement and define the timer as a microsecond timer.

BUG=chromium:611535
BRANCH=none
TEST=make -j runtests; build bob firmware and boot it

Change-Id: I350246874fb36b00149423696285cfcaca0fc526
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/847311
Reviewed-by: Shelley Chen <shchen@chromium.org>

[modify] https://crrev.com/de818cc08fab92ad389dc92f31687f3314a1a03a/tests/vboot_detach_menu_tests.c
[modify] https://crrev.com/de818cc08fab92ad389dc92f31687f3314a1a03a/firmware/lib/vboot_ui_menu.c
[delete] https://crrev.com/5142132f44bbee683c830fdb837bbedb00bad8ba/tests/vboot_audio_tests.c
[modify] https://crrev.com/de818cc08fab92ad389dc92f31687f3314a1a03a/firmware/lib/vboot_ui.c
[modify] https://crrev.com/de818cc08fab92ad389dc92f31687f3314a1a03a/firmware/lib/vboot_audio.c
[modify] https://crrev.com/de818cc08fab92ad389dc92f31687f3314a1a03a/Makefile
[modify] https://crrev.com/de818cc08fab92ad389dc92f31687f3314a1a03a/firmware/lib/include/vboot_audio.h
[modify] https://crrev.com/de818cc08fab92ad389dc92f31687f3314a1a03a/tests/vboot_api_kernel2_tests.c
[modify] https://crrev.com/de818cc08fab92ad389dc92f31687f3314a1a03a/tests/vboot_api_devmode_tests.c
[modify] https://crrev.com/de818cc08fab92ad389dc92f31687f3314a1a03a/firmware/include/vboot_api.h
[delete] https://crrev.com/5142132f44bbee683c830fdb837bbedb00bad8ba/firmware/lib/include/vboot_audio_private.h

Project Member

Comment 47 by bugdroid1@chromium.org, Jan 6 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/1a5e02c7a9ca66fb20f6752225903aa7a4dd0f70

commit 1a5e02c7a9ca66fb20f6752225903aa7a4dd0f70
Author: Randall Spangler <rspangler@chromium.org>
Date: Sat Jan 06 05:14:12 2018

firmware: Align workbuf used size

Previously, workbuf used was not rounded up to a multiple of
VB2_WORKBUF_ALIGN.  The next allocation would be aligned, but not
until it was made.

Change this to round up used size when more workbuf is used.  This
provides better predictability of where the next allocation will be
placed.

Uncovered this problem when I added a new member to vb2_shared_data
which changed its size so it wasn't a multiple of VB2_WORKBUF_ALIGN,
and the vb20 and vb21 unit tests which tried to simulate not enough
buffer broke in strange ways.

BUG=chromium:611535
BRANCH=none
TEST=make -j runtests; build bob firmware and boot it

Change-Id: I0157a1c96326f7fce6be6efbd74d90c3d2942268
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/852488
Reviewed-by: Shelley Chen <shchen@chromium.org>

[modify] https://crrev.com/1a5e02c7a9ca66fb20f6752225903aa7a4dd0f70/tests/vb20_api_kernel_tests.c
[modify] https://crrev.com/1a5e02c7a9ca66fb20f6752225903aa7a4dd0f70/tests/vb20_api_tests.c
[modify] https://crrev.com/1a5e02c7a9ca66fb20f6752225903aa7a4dd0f70/firmware/lib20/api_kernel.c
[modify] https://crrev.com/1a5e02c7a9ca66fb20f6752225903aa7a4dd0f70/tests/vb20_misc_tests.c
[modify] https://crrev.com/1a5e02c7a9ca66fb20f6752225903aa7a4dd0f70/firmware/lib20/api.c
[modify] https://crrev.com/1a5e02c7a9ca66fb20f6752225903aa7a4dd0f70/tests/vb21_misc_tests.c
[modify] https://crrev.com/1a5e02c7a9ca66fb20f6752225903aa7a4dd0f70/firmware/lib21/api.c
[modify] https://crrev.com/1a5e02c7a9ca66fb20f6752225903aa7a4dd0f70/firmware/2lib/include/2common.h
[modify] https://crrev.com/1a5e02c7a9ca66fb20f6752225903aa7a4dd0f70/firmware/2lib/2common.c
[modify] https://crrev.com/1a5e02c7a9ca66fb20f6752225903aa7a4dd0f70/firmware/lib20/misc.c
[modify] https://crrev.com/1a5e02c7a9ca66fb20f6752225903aa7a4dd0f70/tests/vb20_kernel_tests.c
[modify] https://crrev.com/1a5e02c7a9ca66fb20f6752225903aa7a4dd0f70/firmware/lib21/misc.c
[modify] https://crrev.com/1a5e02c7a9ca66fb20f6752225903aa7a4dd0f70/firmware/2lib/include/2misc.h
[modify] https://crrev.com/1a5e02c7a9ca66fb20f6752225903aa7a4dd0f70/tests/vb2_misc_tests.c
[modify] https://crrev.com/1a5e02c7a9ca66fb20f6752225903aa7a4dd0f70/firmware/lib20/kernel.c
[modify] https://crrev.com/1a5e02c7a9ca66fb20f6752225903aa7a4dd0f70/tests/vb21_api_tests.c
[modify] https://crrev.com/1a5e02c7a9ca66fb20f6752225903aa7a4dd0f70/firmware/2lib/2misc.c

Project Member

Comment 48 by bugdroid1@chromium.org, Jan 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/39427240693b31942f89385d3b01083fea1b0678

commit 39427240693b31942f89385d3b01083fea1b0678
Author: Randall Spangler <rspangler@chromium.org>
Date: Tue Jan 09 22:14:16 2018

ec_sync: Use vboot2 context instead of cparams

Copy sync-related flags from cparams / vboot1 shared data to the
equivalent vboot2 structs.  This removes the need for ec_sync to
access the old structs, which are on their way out.

No change in functionality.

BUG=chromium:611535
BRANCH=none
TEST=make -j runtests; build bob firmware and boot it

Change-Id: I50ee76cf275a7fba894c2ec2c3dd83b9a8d91b53
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/852489
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>

[modify] https://crrev.com/39427240693b31942f89385d3b01083fea1b0678/firmware/2lib/include/2api.h
[modify] https://crrev.com/39427240693b31942f89385d3b01083fea1b0678/firmware/lib/vboot_api_kernel.c
[modify] https://crrev.com/39427240693b31942f89385d3b01083fea1b0678/firmware/lib/ec_sync_all.c
[modify] https://crrev.com/39427240693b31942f89385d3b01083fea1b0678/tests/ec_sync_tests.c
[modify] https://crrev.com/39427240693b31942f89385d3b01083fea1b0678/firmware/lib/ec_sync.c
[modify] https://crrev.com/39427240693b31942f89385d3b01083fea1b0678/firmware/lib/include/ec_sync.h

Project Member

Comment 49 by bugdroid1@chromium.org, Jan 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/98616d79c6b60c719bc3e37f7f82028e77983d94

commit 98616d79c6b60c719bc3e37f7f82028e77983d94
Author: Randall Spangler <rspangler@chromium.org>
Date: Tue Jan 09 22:14:17 2018

firmware: Prune down old region API

The region API was a way for firmware and kernel verification to get
at various blocks of caller-provided data.  In practice, we only used
it internally as a way to get at parts of the GBB.  Prune it down to
access only the bits of GBB we still need, from the buffer we already
know we have.

In the long run we should use the same vb2ex_read_resource() API that
vb2 firmware verification does, but that should be done in a follow-up
CL since it'll need to be coordinated with support in depthcharge.

No change in functionality.

BUG=chromium:611535
BRANCH=none
TEST=make -j runtests; build bob firmware and boot it

Change-Id: I5715cb8d88274164a1a73ed4a56bbd93af46f9bf
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/852798
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>

[modify] https://crrev.com/98616d79c6b60c719bc3e37f7f82028e77983d94/tests/vboot_detach_menu_tests.c
[modify] https://crrev.com/98616d79c6b60c719bc3e37f7f82028e77983d94/firmware/2lib/include/2struct.h
[delete] https://crrev.com/79c1c6194bc45728a5043443d80506fa1d35c83b/firmware/include/region.h
[modify] https://crrev.com/98616d79c6b60c719bc3e37f7f82028e77983d94/tests/vboot_display_tests.c
[modify] https://crrev.com/98616d79c6b60c719bc3e37f7f82028e77983d94/Makefile
[modify] https://crrev.com/98616d79c6b60c719bc3e37f7f82028e77983d94/firmware/include/gbb_access.h
[modify] https://crrev.com/98616d79c6b60c719bc3e37f7f82028e77983d94/firmware/lib/vboot_ui.c
[delete] https://crrev.com/79c1c6194bc45728a5043443d80506fa1d35c83b/tests/vboot_region_tests.c
[modify] https://crrev.com/98616d79c6b60c719bc3e37f7f82028e77983d94/utility/load_kernel_test.c
[modify] https://crrev.com/98616d79c6b60c719bc3e37f7f82028e77983d94/tests/vboot_api_kernel5_tests.c
[modify] https://crrev.com/98616d79c6b60c719bc3e37f7f82028e77983d94/firmware/lib/vboot_api_kernel.c
[delete] https://crrev.com/79c1c6194bc45728a5043443d80506fa1d35c83b/firmware/lib/region-fw.c
[modify] https://crrev.com/98616d79c6b60c719bc3e37f7f82028e77983d94/firmware/lib/vboot_ui_menu.c
[modify] https://crrev.com/98616d79c6b60c719bc3e37f7f82028e77983d94/tests/ec_sync_tests.c
[modify] https://crrev.com/98616d79c6b60c719bc3e37f7f82028e77983d94/tests/vboot_api_devmode_tests.c
[modify] https://crrev.com/98616d79c6b60c719bc3e37f7f82028e77983d94/firmware/lib/region-init.c
[modify] https://crrev.com/98616d79c6b60c719bc3e37f7f82028e77983d94/firmware/include/vboot_api.h
[modify] https://crrev.com/98616d79c6b60c719bc3e37f7f82028e77983d94/tests/vboot_api_kernel2_tests.c
[delete] https://crrev.com/79c1c6194bc45728a5043443d80506fa1d35c83b/firmware/lib/region-kernel.c
[modify] https://crrev.com/98616d79c6b60c719bc3e37f7f82028e77983d94/firmware/lib/include/vboot_kernel.h
[modify] https://crrev.com/98616d79c6b60c719bc3e37f7f82028e77983d94/firmware/lib/include/vboot_display.h
[modify] https://crrev.com/98616d79c6b60c719bc3e37f7f82028e77983d94/tests/vboot_kernel_tests.c
[modify] https://crrev.com/98616d79c6b60c719bc3e37f7f82028e77983d94/firmware/lib/vboot_kernel.c
[modify] https://crrev.com/98616d79c6b60c719bc3e37f7f82028e77983d94/firmware/lib/vboot_display.c
[delete] https://crrev.com/79c1c6194bc45728a5043443d80506fa1d35c83b/firmware/stub/vboot_api_stub_region.c

Project Member

Comment 50 by bugdroid1@chromium.org, Jan 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/b07b4b9c71fd54a923fa914a046fcf7183d65c22

commit b07b4b9c71fd54a923fa914a046fcf7183d65c22
Author: Randall Spangler <rspangler@chromium.org>
Date: Tue Jan 09 22:14:17 2018

firmware: Stop using vboot1 cparams internally

Now that vb2_shared_data / vb2_context provides all the same data to
lower-level kernel verification code that cparams did, stop passing
cparams down to those functions.

No change in functionality.

BUG=chromium:611535
BRANCH=none
TEST=make -j runtests; build bob firmware and boot it

Change-Id: I86eb1801ee96d8b56404b74843a8d09e3122567f
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/852814
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>

[modify] https://crrev.com/b07b4b9c71fd54a923fa914a046fcf7183d65c22/tests/vboot_detach_menu_tests.c
[modify] https://crrev.com/b07b4b9c71fd54a923fa914a046fcf7183d65c22/utility/load_kernel_test.c
[modify] https://crrev.com/b07b4b9c71fd54a923fa914a046fcf7183d65c22/tests/vboot_api_kernel_tests.c
[modify] https://crrev.com/b07b4b9c71fd54a923fa914a046fcf7183d65c22/firmware/lib/vboot_ui_menu.c
[modify] https://crrev.com/b07b4b9c71fd54a923fa914a046fcf7183d65c22/firmware/lib/vboot_ui.c
[modify] https://crrev.com/b07b4b9c71fd54a923fa914a046fcf7183d65c22/tests/vboot_api_kernel4_tests.c
[modify] https://crrev.com/b07b4b9c71fd54a923fa914a046fcf7183d65c22/firmware/linktest/main.c
[modify] https://crrev.com/b07b4b9c71fd54a923fa914a046fcf7183d65c22/firmware/include/gbb_access.h
[modify] https://crrev.com/b07b4b9c71fd54a923fa914a046fcf7183d65c22/tests/vboot_api_kernel2_tests.c
[modify] https://crrev.com/b07b4b9c71fd54a923fa914a046fcf7183d65c22/tests/vboot_api_devmode_tests.c
[modify] https://crrev.com/b07b4b9c71fd54a923fa914a046fcf7183d65c22/firmware/lib/vboot_api_kernel.c
[modify] https://crrev.com/b07b4b9c71fd54a923fa914a046fcf7183d65c22/firmware/lib/include/vboot_kernel.h
[modify] https://crrev.com/b07b4b9c71fd54a923fa914a046fcf7183d65c22/tests/vboot_display_tests.c
[modify] https://crrev.com/b07b4b9c71fd54a923fa914a046fcf7183d65c22/tests/ec_sync_tests.c
[modify] https://crrev.com/b07b4b9c71fd54a923fa914a046fcf7183d65c22/firmware/lib/vboot_kernel.c
[modify] https://crrev.com/b07b4b9c71fd54a923fa914a046fcf7183d65c22/tests/verify_kernel.c
[modify] https://crrev.com/b07b4b9c71fd54a923fa914a046fcf7183d65c22/firmware/lib/include/load_kernel_fw.h
[modify] https://crrev.com/b07b4b9c71fd54a923fa914a046fcf7183d65c22/tests/vboot_kernel_tests.c

Project Member

Comment 51 by bugdroid1@chromium.org, Jan 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/79c1c6194bc45728a5043443d80506fa1d35c83b

commit 79c1c6194bc45728a5043443d80506fa1d35c83b
Author: Randall Spangler <rspangler@chromium.org>
Date: Tue Jan 09 22:14:17 2018

firmware: Include vb1 shared data in vb2 struct

Currently, firmware verification uses entirely vb2 structs, including
vb2_shared_data.  This goes through an ugly translation to the old vb1
VbSharedData to pass it to depthcharge.  The vboot kernel verification
maintains an equally ugly translation back to the vb2 struct
internally.

Eventually, we want to get rid of all that and use vb2 all the way
down to what crossystem picks up from the OS.

But before we can do that, we need to finish translating kernel
verification code to use the new vb2 structs.  This is a step on that
path, using vb2_shared_data equivalents where present and hiding the
old vb1 shared data struct as a member of vb2_shared_data so at least
the vboot functions don't need to pass around cparams to get at it.

This will be followed by more CLs which convert more vboot internals
to use vb2 structs directly, and eventually coreboot/depthcharge CLs
which pass the vb2 structs from firmware verification directly to
kernel verification.

No change in functionality.

BUG=chromium:611535
BRANCH=none
TEST=make -j runtests; build bob firmware and boot it

Change-Id: I5df8ce81ba3c3ac3f2cb4229db5461757cd89d8d
Reviewed-on: https://chromium-review.googlesource.com/852856
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>

[modify] https://crrev.com/79c1c6194bc45728a5043443d80506fa1d35c83b/tests/vboot_detach_menu_tests.c
[modify] https://crrev.com/79c1c6194bc45728a5043443d80506fa1d35c83b/firmware/2lib/include/2struct.h
[modify] https://crrev.com/79c1c6194bc45728a5043443d80506fa1d35c83b/tests/vboot_display_tests.c
[modify] https://crrev.com/79c1c6194bc45728a5043443d80506fa1d35c83b/firmware/lib/vboot_ui_menu.c
[modify] https://crrev.com/79c1c6194bc45728a5043443d80506fa1d35c83b/firmware/lib/include/ec_sync.h
[modify] https://crrev.com/79c1c6194bc45728a5043443d80506fa1d35c83b/tests/vboot_api_kernel4_tests.c
[modify] https://crrev.com/79c1c6194bc45728a5043443d80506fa1d35c83b/firmware/lib/vboot_display.c
[modify] https://crrev.com/79c1c6194bc45728a5043443d80506fa1d35c83b/firmware/lib/ec_sync_all.c
[modify] https://crrev.com/79c1c6194bc45728a5043443d80506fa1d35c83b/firmware/lib/vboot_ui.c
[modify] https://crrev.com/79c1c6194bc45728a5043443d80506fa1d35c83b/tests/ec_sync_tests.c
[modify] https://crrev.com/79c1c6194bc45728a5043443d80506fa1d35c83b/tests/vboot_api_kernel2_tests.c
[modify] https://crrev.com/79c1c6194bc45728a5043443d80506fa1d35c83b/tests/vboot_api_devmode_tests.c
[modify] https://crrev.com/79c1c6194bc45728a5043443d80506fa1d35c83b/firmware/lib/vboot_api_kernel.c
[modify] https://crrev.com/79c1c6194bc45728a5043443d80506fa1d35c83b/tests/vboot_kernel_tests.c
[modify] https://crrev.com/79c1c6194bc45728a5043443d80506fa1d35c83b/firmware/lib/vboot_kernel.c
[modify] https://crrev.com/79c1c6194bc45728a5043443d80506fa1d35c83b/tests/vboot_api_kernel5_tests.c
[modify] https://crrev.com/79c1c6194bc45728a5043443d80506fa1d35c83b/tests/verify_kernel.c
[modify] https://crrev.com/79c1c6194bc45728a5043443d80506fa1d35c83b/utility/load_kernel_test.c

Project Member

Comment 52 by bugdroid1@chromium.org, Jan 11 2018

Labels: merge-merged-firmware-fizz-10139.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/d97391040a901a1a942224b5e22aa7f7f860e69a

commit d97391040a901a1a942224b5e22aa7f7f860e69a
Author: Randall Spangler <rspangler@chromium.org>
Date: Thu Jan 11 08:28:56 2018

firmware: use sd->gbb_flags

Vboot1 code directly referenced the GBB from cparams even though now
it has access to the GBB flags via the vb2 context.  Refactor all
existing code to use the vb2 context, since that takes us one step
closer to getting rid of the old vboot1 cparams.

No change in functionality.

BUG=chromium:611535
BRANCH=none
TEST=make -j runtests; build bob firmware and boot it

Change-Id: Ic4a5bf215b723a2eacbf0a4cf0eba8b1338155a2
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/847310
Reviewed-by: Shelley Chen <shchen@chromium.org>
(cherry picked from commit 5142132f44bbee683c830fdb837bbedb00bad8ba)
Reviewed-on: https://chromium-review.googlesource.com/861605
Commit-Queue: Shelley Chen <shchen@chromium.org>
Tested-by: Shelley Chen <shchen@chromium.org>

[modify] https://crrev.com/d97391040a901a1a942224b5e22aa7f7f860e69a/tests/vboot_detach_menu_tests.c
[modify] https://crrev.com/d97391040a901a1a942224b5e22aa7f7f860e69a/firmware/2lib/include/2struct.h
[modify] https://crrev.com/d97391040a901a1a942224b5e22aa7f7f860e69a/firmware/lib/vboot_ui_menu.c
[modify] https://crrev.com/d97391040a901a1a942224b5e22aa7f7f860e69a/firmware/lib/vboot_ui.c
[modify] https://crrev.com/d97391040a901a1a942224b5e22aa7f7f860e69a/firmware/lib/vboot_display.c
[modify] https://crrev.com/d97391040a901a1a942224b5e22aa7f7f860e69a/firmware/lib/ec_sync.c
[modify] https://crrev.com/d97391040a901a1a942224b5e22aa7f7f860e69a/tests/ec_sync_tests.c
[modify] https://crrev.com/d97391040a901a1a942224b5e22aa7f7f860e69a/tests/vboot_api_kernel2_tests.c
[modify] https://crrev.com/d97391040a901a1a942224b5e22aa7f7f860e69a/tests/vboot_api_devmode_tests.c
[modify] https://crrev.com/d97391040a901a1a942224b5e22aa7f7f860e69a/firmware/lib/vboot_api_kernel.c

Project Member

Comment 53 by bugdroid1@chromium.org, Jan 11 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/96c1c70cad14ab7a720b6c4c29c09ade4d07610d

commit 96c1c70cad14ab7a720b6c4c29c09ade4d07610d
Author: Randall Spangler <rspangler@chromium.org>
Date: Thu Jan 11 08:33:01 2018

firmware: Align workbuf used size

Previously, workbuf used was not rounded up to a multiple of
VB2_WORKBUF_ALIGN.  The next allocation would be aligned, but not
until it was made.

Change this to round up used size when more workbuf is used.  This
provides better predictability of where the next allocation will be
placed.

Uncovered this problem when I added a new member to vb2_shared_data
which changed its size so it wasn't a multiple of VB2_WORKBUF_ALIGN,
and the vb20 and vb21 unit tests which tried to simulate not enough
buffer broke in strange ways.

BUG=chromium:611535
BRANCH=none
TEST=make -j runtests; build bob firmware and boot it

Change-Id: I0157a1c96326f7fce6be6efbd74d90c3d2942268
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/852488
Reviewed-by: Shelley Chen <shchen@chromium.org>
(cherry picked from commit 1a5e02c7a9ca66fb20f6752225903aa7a4dd0f70)
Reviewed-on: https://chromium-review.googlesource.com/861607
Commit-Queue: Shelley Chen <shchen@chromium.org>
Tested-by: Shelley Chen <shchen@chromium.org>

[modify] https://crrev.com/96c1c70cad14ab7a720b6c4c29c09ade4d07610d/tests/vb20_api_kernel_tests.c
[modify] https://crrev.com/96c1c70cad14ab7a720b6c4c29c09ade4d07610d/tests/vb20_api_tests.c
[modify] https://crrev.com/96c1c70cad14ab7a720b6c4c29c09ade4d07610d/firmware/lib20/api_kernel.c
[modify] https://crrev.com/96c1c70cad14ab7a720b6c4c29c09ade4d07610d/tests/vb20_misc_tests.c
[modify] https://crrev.com/96c1c70cad14ab7a720b6c4c29c09ade4d07610d/firmware/lib20/api.c
[modify] https://crrev.com/96c1c70cad14ab7a720b6c4c29c09ade4d07610d/tests/vb21_misc_tests.c
[modify] https://crrev.com/96c1c70cad14ab7a720b6c4c29c09ade4d07610d/firmware/lib21/api.c
[modify] https://crrev.com/96c1c70cad14ab7a720b6c4c29c09ade4d07610d/firmware/2lib/include/2common.h
[modify] https://crrev.com/96c1c70cad14ab7a720b6c4c29c09ade4d07610d/firmware/2lib/2common.c
[modify] https://crrev.com/96c1c70cad14ab7a720b6c4c29c09ade4d07610d/firmware/lib20/misc.c
[modify] https://crrev.com/96c1c70cad14ab7a720b6c4c29c09ade4d07610d/tests/vb20_kernel_tests.c
[modify] https://crrev.com/96c1c70cad14ab7a720b6c4c29c09ade4d07610d/firmware/lib21/misc.c
[modify] https://crrev.com/96c1c70cad14ab7a720b6c4c29c09ade4d07610d/firmware/2lib/include/2misc.h
[modify] https://crrev.com/96c1c70cad14ab7a720b6c4c29c09ade4d07610d/tests/vb2_misc_tests.c
[modify] https://crrev.com/96c1c70cad14ab7a720b6c4c29c09ade4d07610d/firmware/lib20/kernel.c
[modify] https://crrev.com/96c1c70cad14ab7a720b6c4c29c09ade4d07610d/tests/vb21_api_tests.c
[modify] https://crrev.com/96c1c70cad14ab7a720b6c4c29c09ade4d07610d/firmware/2lib/2misc.c

Project Member

Comment 54 by bugdroid1@chromium.org, Jan 11 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/af49cc17948972507fcf8a4bd47dbd445ec72006

commit af49cc17948972507fcf8a4bd47dbd445ec72006
Author: Randall Spangler <rspangler@chromium.org>
Date: Thu Jan 11 08:33:02 2018

firmware: simplify audio

Vboot firmware previously supported a rather complex audio looping
library.  Our original intent was to allow developers to flash a
custom beep sequence / tune as an easter egg.  We never fully
supported that, but the code to allow it lived on.  Get rid of that.

Vboot also previously made no assumptions about the frequency of
VbExGetTimer(), which was only used by the vboot_audio library.  So it
spent 10ms every boot measuring the frequency.  Which is silly now,
because depthcharge implements that as a microsecond timer.  Get rid
of that measurement and define the timer as a microsecond timer.

BUG=chromium:611535
BRANCH=none
TEST=make -j runtests; build bob firmware and boot it

Change-Id: I350246874fb36b00149423696285cfcaca0fc526
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/847311
Reviewed-by: Shelley Chen <shchen@chromium.org>
(cherry picked from commit de818cc08fab92ad389dc92f31687f3314a1a03a)
Reviewed-on: https://chromium-review.googlesource.com/861606
Commit-Queue: Shelley Chen <shchen@chromium.org>
Tested-by: Shelley Chen <shchen@chromium.org>

[modify] https://crrev.com/af49cc17948972507fcf8a4bd47dbd445ec72006/tests/vboot_detach_menu_tests.c
[modify] https://crrev.com/af49cc17948972507fcf8a4bd47dbd445ec72006/firmware/lib/vboot_ui_menu.c
[delete] https://crrev.com/96c1c70cad14ab7a720b6c4c29c09ade4d07610d/tests/vboot_audio_tests.c
[modify] https://crrev.com/af49cc17948972507fcf8a4bd47dbd445ec72006/firmware/lib/vboot_ui.c
[modify] https://crrev.com/af49cc17948972507fcf8a4bd47dbd445ec72006/firmware/lib/vboot_audio.c
[modify] https://crrev.com/af49cc17948972507fcf8a4bd47dbd445ec72006/Makefile
[modify] https://crrev.com/af49cc17948972507fcf8a4bd47dbd445ec72006/firmware/lib/include/vboot_audio.h
[modify] https://crrev.com/af49cc17948972507fcf8a4bd47dbd445ec72006/tests/vboot_api_kernel2_tests.c
[modify] https://crrev.com/af49cc17948972507fcf8a4bd47dbd445ec72006/tests/vboot_api_devmode_tests.c
[modify] https://crrev.com/af49cc17948972507fcf8a4bd47dbd445ec72006/firmware/include/vboot_api.h
[delete] https://crrev.com/96c1c70cad14ab7a720b6c4c29c09ade4d07610d/firmware/lib/include/vboot_audio_private.h

Project Member

Comment 55 by bugdroid1@chromium.org, Jan 11 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/076b1c79a8a8f915479f2ef98d3d223dfc88a0bd

commit 076b1c79a8a8f915479f2ef98d3d223dfc88a0bd
Author: Randall Spangler <rspangler@chromium.org>
Date: Thu Jan 11 08:37:38 2018

ec_sync: Use vboot2 context instead of cparams

Copy sync-related flags from cparams / vboot1 shared data to the
equivalent vboot2 structs.  This removes the need for ec_sync to
access the old structs, which are on their way out.

No change in functionality.

BUG=chromium:611535
BRANCH=none
TEST=make -j runtests; build bob firmware and boot it

Change-Id: I50ee76cf275a7fba894c2ec2c3dd83b9a8d91b53
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/852489
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
(cherry picked from commit 39427240693b31942f89385d3b01083fea1b0678)
Reviewed-on: https://chromium-review.googlesource.com/861609
Reviewed-by: Shelley Chen <shchen@chromium.org>
Commit-Queue: Shelley Chen <shchen@chromium.org>
Tested-by: Shelley Chen <shchen@chromium.org>

[modify] https://crrev.com/076b1c79a8a8f915479f2ef98d3d223dfc88a0bd/firmware/2lib/include/2api.h
[modify] https://crrev.com/076b1c79a8a8f915479f2ef98d3d223dfc88a0bd/firmware/lib/vboot_api_kernel.c
[modify] https://crrev.com/076b1c79a8a8f915479f2ef98d3d223dfc88a0bd/firmware/lib/ec_sync_all.c
[modify] https://crrev.com/076b1c79a8a8f915479f2ef98d3d223dfc88a0bd/tests/ec_sync_tests.c
[modify] https://crrev.com/076b1c79a8a8f915479f2ef98d3d223dfc88a0bd/firmware/lib/ec_sync.c
[modify] https://crrev.com/076b1c79a8a8f915479f2ef98d3d223dfc88a0bd/firmware/lib/include/ec_sync.h

Project Member

Comment 56 by bugdroid1@chromium.org, Jan 11 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/adfdcfa91a2812242bdf1c0816f638d676afcf48

commit adfdcfa91a2812242bdf1c0816f638d676afcf48
Author: Randall Spangler <rspangler@chromium.org>
Date: Thu Jan 11 08:41:41 2018

firmware: Include vb1 shared data in vb2 struct

Currently, firmware verification uses entirely vb2 structs, including
vb2_shared_data.  This goes through an ugly translation to the old vb1
VbSharedData to pass it to depthcharge.  The vboot kernel verification
maintains an equally ugly translation back to the vb2 struct
internally.

Eventually, we want to get rid of all that and use vb2 all the way
down to what crossystem picks up from the OS.

But before we can do that, we need to finish translating kernel
verification code to use the new vb2 structs.  This is a step on that
path, using vb2_shared_data equivalents where present and hiding the
old vb1 shared data struct as a member of vb2_shared_data so at least
the vboot functions don't need to pass around cparams to get at it.

This will be followed by more CLs which convert more vboot internals
to use vb2 structs directly, and eventually coreboot/depthcharge CLs
which pass the vb2 structs from firmware verification directly to
kernel verification.

No change in functionality.

BUG=chromium:611535
BRANCH=none
TEST=make -j runtests; build bob firmware and boot it

Change-Id: I5df8ce81ba3c3ac3f2cb4229db5461757cd89d8d
Reviewed-on: https://chromium-review.googlesource.com/852856
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
(cherry picked from commit 79c1c6194bc45728a5043443d80506fa1d35c83b
Reviewed-on: https://chromium-review.googlesource.com/861611
Reviewed-by: Shelley Chen <shchen@chromium.org>
Commit-Queue: Shelley Chen <shchen@chromium.org>
Tested-by: Shelley Chen <shchen@chromium.org>

[modify] https://crrev.com/adfdcfa91a2812242bdf1c0816f638d676afcf48/tests/vboot_detach_menu_tests.c
[modify] https://crrev.com/adfdcfa91a2812242bdf1c0816f638d676afcf48/firmware/2lib/include/2struct.h
[modify] https://crrev.com/adfdcfa91a2812242bdf1c0816f638d676afcf48/tests/vboot_display_tests.c
[modify] https://crrev.com/adfdcfa91a2812242bdf1c0816f638d676afcf48/firmware/lib/vboot_ui_menu.c
[modify] https://crrev.com/adfdcfa91a2812242bdf1c0816f638d676afcf48/firmware/lib/include/ec_sync.h
[modify] https://crrev.com/adfdcfa91a2812242bdf1c0816f638d676afcf48/tests/vboot_api_kernel4_tests.c
[modify] https://crrev.com/adfdcfa91a2812242bdf1c0816f638d676afcf48/firmware/lib/vboot_display.c
[modify] https://crrev.com/adfdcfa91a2812242bdf1c0816f638d676afcf48/firmware/lib/ec_sync_all.c
[modify] https://crrev.com/adfdcfa91a2812242bdf1c0816f638d676afcf48/firmware/lib/vboot_ui.c
[modify] https://crrev.com/adfdcfa91a2812242bdf1c0816f638d676afcf48/tests/ec_sync_tests.c
[modify] https://crrev.com/adfdcfa91a2812242bdf1c0816f638d676afcf48/tests/vboot_api_kernel2_tests.c
[modify] https://crrev.com/adfdcfa91a2812242bdf1c0816f638d676afcf48/tests/vboot_api_devmode_tests.c
[modify] https://crrev.com/adfdcfa91a2812242bdf1c0816f638d676afcf48/firmware/lib/vboot_api_kernel.c
[modify] https://crrev.com/adfdcfa91a2812242bdf1c0816f638d676afcf48/tests/vboot_kernel_tests.c
[modify] https://crrev.com/adfdcfa91a2812242bdf1c0816f638d676afcf48/firmware/lib/vboot_kernel.c
[modify] https://crrev.com/adfdcfa91a2812242bdf1c0816f638d676afcf48/tests/vboot_api_kernel5_tests.c
[modify] https://crrev.com/adfdcfa91a2812242bdf1c0816f638d676afcf48/tests/verify_kernel.c
[modify] https://crrev.com/adfdcfa91a2812242bdf1c0816f638d676afcf48/utility/load_kernel_test.c

Project Member

Comment 57 by bugdroid1@chromium.org, Jan 11 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/78b0927a6db239c1670afcb4c77e30895c2f5e17

commit 78b0927a6db239c1670afcb4c77e30895c2f5e17
Author: Randall Spangler <rspangler@chromium.org>
Date: Thu Jan 11 08:49:33 2018

firmware: Prune down old region API

The region API was a way for firmware and kernel verification to get
at various blocks of caller-provided data.  In practice, we only used
it internally as a way to get at parts of the GBB.  Prune it down to
access only the bits of GBB we still need, from the buffer we already
know we have.

In the long run we should use the same vb2ex_read_resource() API that
vb2 firmware verification does, but that should be done in a follow-up
CL since it'll need to be coordinated with support in depthcharge.

No change in functionality.

BUG=chromium:611535
BRANCH=none
TEST=make -j runtests; build bob firmware and boot it

Change-Id: I5715cb8d88274164a1a73ed4a56bbd93af46f9bf
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/852798
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
(cherry picked from commit 98616d79c6b60c719bc3e37f7f82028e77983d94)
Reviewed-on: https://chromium-review.googlesource.com/861613
Reviewed-by: Shelley Chen <shchen@chromium.org>
Commit-Queue: Shelley Chen <shchen@chromium.org>
Tested-by: Shelley Chen <shchen@chromium.org>

[modify] https://crrev.com/78b0927a6db239c1670afcb4c77e30895c2f5e17/tests/vboot_detach_menu_tests.c
[modify] https://crrev.com/78b0927a6db239c1670afcb4c77e30895c2f5e17/firmware/2lib/include/2struct.h
[delete] https://crrev.com/adfdcfa91a2812242bdf1c0816f638d676afcf48/firmware/include/region.h
[modify] https://crrev.com/78b0927a6db239c1670afcb4c77e30895c2f5e17/tests/vboot_display_tests.c
[modify] https://crrev.com/78b0927a6db239c1670afcb4c77e30895c2f5e17/Makefile
[modify] https://crrev.com/78b0927a6db239c1670afcb4c77e30895c2f5e17/firmware/include/gbb_access.h
[modify] https://crrev.com/78b0927a6db239c1670afcb4c77e30895c2f5e17/firmware/lib/vboot_ui.c
[delete] https://crrev.com/adfdcfa91a2812242bdf1c0816f638d676afcf48/tests/vboot_region_tests.c
[modify] https://crrev.com/78b0927a6db239c1670afcb4c77e30895c2f5e17/utility/load_kernel_test.c
[modify] https://crrev.com/78b0927a6db239c1670afcb4c77e30895c2f5e17/tests/vboot_api_kernel5_tests.c
[modify] https://crrev.com/78b0927a6db239c1670afcb4c77e30895c2f5e17/firmware/lib/vboot_api_kernel.c
[delete] https://crrev.com/adfdcfa91a2812242bdf1c0816f638d676afcf48/firmware/lib/region-fw.c
[modify] https://crrev.com/78b0927a6db239c1670afcb4c77e30895c2f5e17/firmware/lib/vboot_ui_menu.c
[modify] https://crrev.com/78b0927a6db239c1670afcb4c77e30895c2f5e17/tests/ec_sync_tests.c
[modify] https://crrev.com/78b0927a6db239c1670afcb4c77e30895c2f5e17/tests/vboot_api_devmode_tests.c
[modify] https://crrev.com/78b0927a6db239c1670afcb4c77e30895c2f5e17/firmware/lib/region-init.c
[modify] https://crrev.com/78b0927a6db239c1670afcb4c77e30895c2f5e17/firmware/include/vboot_api.h
[modify] https://crrev.com/78b0927a6db239c1670afcb4c77e30895c2f5e17/tests/vboot_api_kernel2_tests.c
[delete] https://crrev.com/adfdcfa91a2812242bdf1c0816f638d676afcf48/firmware/lib/region-kernel.c
[modify] https://crrev.com/78b0927a6db239c1670afcb4c77e30895c2f5e17/firmware/lib/include/vboot_kernel.h
[modify] https://crrev.com/78b0927a6db239c1670afcb4c77e30895c2f5e17/firmware/lib/include/vboot_display.h
[modify] https://crrev.com/78b0927a6db239c1670afcb4c77e30895c2f5e17/tests/vboot_kernel_tests.c
[modify] https://crrev.com/78b0927a6db239c1670afcb4c77e30895c2f5e17/firmware/lib/vboot_kernel.c
[modify] https://crrev.com/78b0927a6db239c1670afcb4c77e30895c2f5e17/firmware/lib/vboot_display.c
[delete] https://crrev.com/adfdcfa91a2812242bdf1c0816f638d676afcf48/firmware/stub/vboot_api_stub_region.c

Project Member

Comment 58 by bugdroid1@chromium.org, Jan 11 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/8af46d24734134158ce8173f700f6187b06a7ac8

commit 8af46d24734134158ce8173f700f6187b06a7ac8
Author: Randall Spangler <rspangler@chromium.org>
Date: Thu Jan 11 08:58:01 2018

firmware: Stop using vboot1 cparams internally

Now that vb2_shared_data / vb2_context provides all the same data to
lower-level kernel verification code that cparams did, stop passing
cparams down to those functions.

No change in functionality.

BUG=chromium:611535
BRANCH=none
TEST=make -j runtests; build bob firmware and boot it

Change-Id: I86eb1801ee96d8b56404b74843a8d09e3122567f
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/852814
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
(cherry picked from commit b07b4b9c71fd54a923fa914a046fcf7183d65c22)
Reviewed-on: https://chromium-review.googlesource.com/861614
Reviewed-by: Shelley Chen <shchen@chromium.org>
Commit-Queue: Shelley Chen <shchen@chromium.org>
Tested-by: Shelley Chen <shchen@chromium.org>

[modify] https://crrev.com/8af46d24734134158ce8173f700f6187b06a7ac8/tests/vboot_detach_menu_tests.c
[modify] https://crrev.com/8af46d24734134158ce8173f700f6187b06a7ac8/utility/load_kernel_test.c
[modify] https://crrev.com/8af46d24734134158ce8173f700f6187b06a7ac8/tests/vboot_api_kernel_tests.c
[modify] https://crrev.com/8af46d24734134158ce8173f700f6187b06a7ac8/firmware/lib/vboot_ui_menu.c
[modify] https://crrev.com/8af46d24734134158ce8173f700f6187b06a7ac8/firmware/lib/vboot_ui.c
[modify] https://crrev.com/8af46d24734134158ce8173f700f6187b06a7ac8/tests/vboot_api_kernel4_tests.c
[modify] https://crrev.com/8af46d24734134158ce8173f700f6187b06a7ac8/firmware/linktest/main.c
[modify] https://crrev.com/8af46d24734134158ce8173f700f6187b06a7ac8/firmware/include/gbb_access.h
[modify] https://crrev.com/8af46d24734134158ce8173f700f6187b06a7ac8/tests/vboot_api_kernel2_tests.c
[modify] https://crrev.com/8af46d24734134158ce8173f700f6187b06a7ac8/tests/vboot_api_devmode_tests.c
[modify] https://crrev.com/8af46d24734134158ce8173f700f6187b06a7ac8/firmware/lib/vboot_api_kernel.c
[modify] https://crrev.com/8af46d24734134158ce8173f700f6187b06a7ac8/firmware/lib/include/vboot_kernel.h
[modify] https://crrev.com/8af46d24734134158ce8173f700f6187b06a7ac8/tests/vboot_display_tests.c
[modify] https://crrev.com/8af46d24734134158ce8173f700f6187b06a7ac8/tests/ec_sync_tests.c
[modify] https://crrev.com/8af46d24734134158ce8173f700f6187b06a7ac8/firmware/lib/vboot_kernel.c
[modify] https://crrev.com/8af46d24734134158ce8173f700f6187b06a7ac8/tests/verify_kernel.c
[modify] https://crrev.com/8af46d24734134158ce8173f700f6187b06a7ac8/firmware/lib/include/load_kernel_fw.h
[modify] https://crrev.com/8af46d24734134158ce8173f700f6187b06a7ac8/tests/vboot_kernel_tests.c

Project Member

Comment 59 by bugdroid1@chromium.org, Mar 8 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/depthcharge/+/45558c95a7fd3f8d974f1e737ccff50cacdc1193

commit 45558c95a7fd3f8d974f1e737ccff50cacdc1193
Author: Randall Spangler <rspangler@chromium.org>
Date: Thu Mar 08 03:46:41 2018

vboot: remove unused vboot1 APIs

As we've refactored the code over the last few years, there are some
dangling features which are no longer used.  Remove the code for them.

BUG=chromium:611535
BRANCH=none
TEST=build and boot bob

Change-Id: I1d309fbbce0e0951b2603528e786f7837297c682
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/954224
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>

[modify] https://crrev.com/45558c95a7fd3f8d974f1e737ccff50cacdc1193/src/vboot/callbacks/misc.c
[modify] https://crrev.com/45558c95a7fd3f8d974f1e737ccff50cacdc1193/src/vboot/callbacks/switches.c
[modify] https://crrev.com/45558c95a7fd3f8d974f1e737ccff50cacdc1193/src/vboot/callbacks/display.c
[modify] https://crrev.com/45558c95a7fd3f8d974f1e737ccff50cacdc1193/src/vboot/callbacks/headless_stub.c

Project Member

Comment 60 by bugdroid1@chromium.org, Mar 8 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/9cc0e31fb527b21e958f423ff739a2c4e915baff

commit 9cc0e31fb527b21e958f423ff739a2c4e915baff
Author: Randall Spangler <rspangler@chromium.org>
Date: Thu Mar 08 08:37:39 2018

firmware: remove unused vboot1 APIs

As we've refactored the code over the last few years, there are some
dangling features which are no longer used.  Remove the code for them.

BUG=chromium:611535
BRANCH=none
TEST=make runtests; build and boot bob
CQ-DEPEND=CL:954224

Change-Id: Id4f3caa0581ce68465ea92e3eeedab501fb6b1aa
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/954354
Reviewed-by: Julius Werner <jwerner@chromium.org>

[modify] https://crrev.com/9cc0e31fb527b21e958f423ff739a2c4e915baff/firmware/stub/vboot_api_stub.c
[modify] https://crrev.com/9cc0e31fb527b21e958f423ff739a2c4e915baff/firmware/include/vboot_api.h

Triage nag: This Chrome OS bug has an owner but no component. Please add a component so that this can be tracked by the relevant team.
Components: OS>Firmware>BIOS

Sign in to add a comment