summaryrefslogtreecommitdiff
path: root/tests/vb2_common_tests.c
Commit message (Collapse)AuthorAgeFilesLines
* treewide: Fix license headers to conform with linterJakub Czapiga2022-10-041-1/+1
| | | | | | | | | | | | | BRANCH=none BUG=none TEST=cros lint Signed-off-by: Jakub Czapiga <jacz@semihalf.com> Change-Id: I7710c43c8c70cf257a898f22c42ecbf350e125a2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3925702 Commit-Queue: Jakub Czapiga <czapiga@google.com> Reviewed-by: Yu-Ping Wu <yupingso@chromium.org> Tested-by: Jakub Czapiga <czapiga@google.com>
* tests/common/tests.h: rename test_common.h to common/tests.hHsin-Te Yuan2022-07-151-1/+1
| | | | | | | | | | | | | | Create tests/common/ to put some common files. BUG=none BRANCH=none TEST=make runtests Signed-off-by: Hsin-Te Yuan <yuanhsinte@google.com> Change-Id: I8918b7a1e62d47fca6074ef123e2de6f46f1aa00 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3754814 Reviewed-by: Hsuan Ting Chen <roccochen@chromium.org> Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
* run2tests: fix more compilation problemsVadim Bendebury2021-09-021-2/+6
| | | | | | | | | | | | | | | | | | | | | | The compiler is too zealous when deciding which addresses are allowed to be accessed. While it is correct in principal, in some controlled cases the code indeed needs to calculate addresses which are beyond the structures boundaries. This patch modifies the code to placate the compiler. BRANCH=none BUG=none TEST='make run2tests' inside chroot does not fail to compile and passes. Change-Id: Iba99714da569a5f28ae95939e93ee1d09da20caa Signed-off-by: Vadim Bendebury <vbendeb@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3133544 Tested-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
* vboot: workbuf alignment should always use 8Joel Kitching2019-11-251-24/+28
| | | | | | | | | | | | | | | | | | | | | | | | Rather than depending on the architecture and environment to provide the correct memory alignment (__BIGGEST_ALIGNMENT__), hardcode to 8, which should be sufficient for all cases. (Previously, by using __BIGGEST_ALIGNMENT__, this is set to 16 in all known cases, which is unnecessarily large.) Update vb2_workbuf tests to be more flexible according to VB2_WORKBUF_ALIGN value. BUG=b:124141368 TEST=make clean && make runtests TEST=Try values of VB2_WORKBUF_ALIGN=2,4,8,16,32,64 BRANCH=none Change-Id: I819586119fa3102fa423a01e0737e6864c05d752 Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1911921 Reviewed-by: Joel Kitching <kitching@chromium.org> Commit-Queue: Joel Kitching <kitching@chromium.org> Tested-by: Joel Kitching <kitching@chromium.org>
* vboot: align workbuf to VB2_WORKBUF_ALIGNJoel Kitching2019-11-131-1/+1
| | | | | | | | | | | | | | | Also standardize on position and spacing of __attribute__. BUG=b:124141368 TEST=make clean && make runtests BRANCH=none Change-Id: Ic61d6193c2413824837a51af98eb2dcd9ea4ab85 Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1902843 Commit-Queue: Joel Kitching <kitching@chromium.org> Tested-by: Joel Kitching <kitching@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
* vboot: relocate vb2_signature and vb2_keybock structsJoel Kitching2019-10-231-0/+38
| | | | | | | | | | | | | | | Move from vboot20 to vboot2. BUG=b:124141368, chromium:968464 TEST=make clean && make runtests BRANCH=none Change-Id: Ib1fe0e2cfb0865fffe33ad35e7bd67d416da4589 Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1776291 Tested-by: Joel Kitching <kitching@chromium.org> Commit-Queue: Joel Kitching <kitching@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
* vboot: add VB2_ASSERT and VB2_DIE macrosJoel Kitching2019-09-231-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | Sometimes vboot needs to make assertions to work sanely without always having to return VB2_ERROR_* values. Add VB2_ASSERT and VB2_DIE macros to deal with these cases. Convert existing VbAssert macro to use either VB2_ASSERT or TEST_* macros depending on the case. Implement testing infrastructure to check that aborts are being triggered correctly. The TEST_ASSERT macro should be used. BUG=b:124141368, chromium:1005700 TEST=make clean && make runtests BRANCH=none Change-Id: I298384ba50842a94a311df7f868f807bf2109cff Signed-off-by: Joel Kitching <kitching@google.com> Cq-Depend: chromium:1813277 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1800112 Tested-by: Joel Kitching <kitching@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Commit-Queue: Joel Kitching <kitching@chromium.org>
* vboot: remove VbPublicKey structJoel Kitching2019-07-101-6/+0
| | | | | | | | | | | | | | | Update all references to vboot2-style struct vb2_packed_key. BUG=b:124141368 TEST=make clean && make runtests BRANCH=none Change-Id: I55a5f6bf315bdb4b83a998759d3732077283998e Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1675871 Tested-by: Joel Kitching <kitching@chromium.org> Commit-Queue: Joel Kitching <kitching@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
* vboot: replace Min macro with VB2_MINstabilize-12331.BJoel Kitching2019-07-061-0/+51
| | | | | | | | | | | | | | | | Replace old vboot1-style Min macro with VB2_MIN, and relocate tests accordingly. BUG=b:124141368 TEST=make clean && make runtests BRANCH=none Change-Id: I73d630147eaf23f97dd750769fb1e911dae01848 Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1675866 Tested-by: Joel Kitching <kitching@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Commit-Queue: Joel Kitching <kitching@chromium.org>
* vboot: remove VerifyMemberInside functionstabilize-12301.BJoel Kitching2019-06-261-16/+16
| | | | | | | | | | | | | | | | | | Use vboot2-style vb2_verify_member_inside instead. Correct some strings in vboot2 tests to refer to new vboot2 functions instead. BUG=b:124141368 TEST=make clean && make runtests BRANCH=none Change-Id: Idb3bcf1657c9d955acc6f93983c7b0c7f06427e3 Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1675870 Tested-by: Joel Kitching <kitching@chromium.org> Commit-Queue: Joel Kitching <kitching@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
* vboot: remove vboot1 version of ARRAY_SIZE macroJoel Kitching2019-06-261-0/+15
| | | | | | | | | | | | | | | | Macro already exists in vboot2-style 2common.h. Relocate tests accordingly. BUG=b:124141368 TEST=make clean && make runtests BRANCH=none Change-Id: I6b96627a05e8c05ff49b8780fe4472890c2a2043 Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1675869 Reviewed-by: Joel Kitching <kitching@chromium.org> Tested-by: Joel Kitching <kitching@chromium.org> Commit-Queue: Joel Kitching <kitching@chromium.org>
* vboot: remove OffsetOf functionJoel Kitching2019-06-261-0/+2
| | | | | | | | | | | | | | | Should use vboot2 equivalent instead: vb2_offset_of BUG=b:124141368 TEST=make clean && make runtests BRANCH=none Change-Id: I64afc88477cbb615a661833f45761030c55fcdf6 Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1675868 Tested-by: Joel Kitching <kitching@chromium.org> Commit-Queue: Joel Kitching <kitching@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
* vboot: move vb2_packed_key and several functions from lib20 to 2libJoel Kitching2019-06-071-1/+108
| | | | | | | | | | | | | | | | | | | * Move vb2_packed_key from vb2_struct.h to 2struct.h * Move vb2_verify_member_inside from lib20/common.c to 2common.c * Move vb2_packed_key_data and vb2_verify_packed_key_inside from lib20/packed_key.c to 2packed_key.c * Relocate tests accordingly BUG=b:124141368, chromium:968464 TEST=make clean && make runtests BRANCH=none Change-Id: I6a9338ffdb640aad071941c3768427e15cd2aa93 Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1642773 Tested-by: Joel Kitching <kitching@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Commit-Queue: Joel Kitching <kitching@chromium.org>
* vboot2: fix alignment issues on 32-bit architecturesBill Richardson2015-01-281-12/+16
| | | | | | | | | | | | | | | | | | We were assuming 8-byte alignment for buffers. That's not true on 32-bit architectures. We should make the alignment requirements explicit (and correct) for all architectures. BUG=chromium:452179 BRANCH=ToT CQ-DEPEND=CL:243380 TEST=manual USE=vboot2 FEATURES=test emerge-x86-alex vboot_reference Change-Id: I120f23e9c5312d7c21ff9ebb6eea2bac1e430e37 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/243362 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* vboot2: Move old struct handling to lib20/Randall Spangler2014-12-041-160/+0
| | | | | | | | | | | | | | | | | | | | | This is part 4 of a series of changes to rearrange the vboot2 library so that it's possible to start using the new-style data structs. This change moves knowledge of the old vboot1 data structs into lib20; 2lib now contains only code which is common to both vboot2.x libraries (that is, code which is data structure version agnostic). No functional changes; just rearranging code and tests. BUG=chromium:423882 BRANCH=none TEST=make runtests && VBOOT2=1 make runtests (works with/withoug VBOOT2 flag) And compile firmware for veyron_pinky CQ-DEPEND=CL:233051 Change-Id: I8f9e67157575e5be14952ef4809c3dfafd92596d Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/233021 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* vboot2: Move knowledge of vboot 2.1 data structures inside lib21/Randall Spangler2014-12-041-494/+0
| | | | | | | | | | | | | | | | | | | Code which compiles against fwlib2 no longer knows or cares about the new data structures. This should shrink fwlib2 a bit. This is part 3 of 4 changes which split vboot 2.0 struct handling (old vboot1 structs) from vboot 2.1 struct handling (new style structs). No functional changes; just shuffling around code. BUG=chromium:423882 BRANCH=none TEST=make runtests && VBOOT2=1 make runtests (works with/withoug VBOOT2 flag) And compile firmware for veyron_pinky. Change-Id: Ibccd7d1974e07f38b90c19c924ef3b1ffcb77d62 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/233020 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* vboot2: Clean up signing data for unit testsRandall Spangler2014-12-041-76/+42
| | | | | | | | | | | | | | | Signing is now simple enough (thanks to full utility lib support for vboot2 data structs) that we don't need the vb2_convert_structs module anymore. Also, use the utility lib function to create a firmware preamble, rather than duplicating that code in the fwlib unit tests. BUG=chromium:423882 BRANCH=none TEST=VBOOT2=1 make runtests, and build firmware for veyron_pinky Change-Id: I1db402a08621f79274d2a69095aebc3e84f4328d Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/232755
* vboot2: Use calloc() in host lib and unit testsRandall Spangler2014-12-031-2/+1
| | | | | | | | | | | | | This is cleaner than malloc() immediately followed by memset(). BUG=chromium:423882 BRANCH=none TEST=VBOOT2=1 make runtests Change-Id: Iac32ca54ba18ef6722c6e9c58d521d5337a816b2 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/232770 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* vboot2: Add host lib function to create a vb2-style keyblockRandall Spangler2014-12-011-64/+23
| | | | | | | | | | | | | | | | | | | Also add vb2_common_desc() helper function to return the description for an object starting with a common struct header. And use the new host lib function to create the keyblock for verifying the firmware lib. Add tests for everything new. BUG=chromium:423882 BRANCH=none TEST=VBOOT2=1 make runtests Change-Id: I1fadb3e249e771a692cc69b23620c6ddd46a48ac Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/231721 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* vboot2: Add host library functions for signing to new struct formatRandall Spangler2014-11-271-0/+1
| | | | | | | | | | | | | | Including signing with bare hashes, and signing an object with more than one signature. With unit tests, even. BUG=chromium:423882 BRANCH=none TEST=VBOOT2=1 make runtests Change-Id: Iad0b9f9f6cca7129071aebf0cbc60c0daa94d382 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/231452 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* vboot2: Add host lib support for bare hash keysRandall Spangler2014-11-271-25/+15
| | | | | | | | | | | | | | And use them in the other vboot2 unit tests. BUG=chromium:423882 BRANCH=none TEST=VBOOT2=1 make runtests Change-Id: I0c3590649a0acf792e41e295ca4279ccba17a41f Reviewed-on: https://chromium-review.googlesource.com/231345 Tested-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org> Commit-Queue: Randall Spangler <rspangler@chromium.org>
* vboot2: Add code and tests for verifying vb2_fw_preamble2Randall Spangler2014-11-121-6/+188
| | | | | | | | | | | | | | | This is the last low-level data structure verification code for the new data structures. Subsequent changes are the next level up the food chain. BUG=chromium:423882 BRANCH=none TEST=VBOOT2=1 make runtests Change-Id: I2e45106c27447eb624c1ed562e40b98088249742 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/228360 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* vboot2: Change preamble to contain a list of signaturesrelease-R40-6457.Bfactory-auron-6459.BRandall Spangler2014-11-061-3/+0
| | | | | | | | | | | | | | | Use struct vb2_signature2 objects to hold the hashes of firmware components, rather than a separate vb2_fw_preamble2_hash struct. Better for code reuse. BUG=chromium:423882 BRANCH=none TEST=VBOOT2=1 make runtests Change-Id: Ia9e23c1488a884f2d6fab4c4be51b25d3ff25c2f Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/228241 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* vboot2: add code to verify vb2_keyblock2Randall Spangler2014-11-061-0/+181
| | | | | | | | | | | | | | | Now supports multiple signatures per keyblock. And associated unit tests. BUG=chromium:423882 BRANCH=none TEST=VBOOT2=1 make runtests Change-Id: I7f2ef216e3689a22ed86c34763f68345d4080e04 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/227181 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* vboot2: add support for verify data / digest using new signature structRandall Spangler2014-11-051-0/+35
| | | | | | | | | | | | | | | This adds the vb2_signature2 equivalents of vb2_verify_digest() and vb2_verify_data(), including support for bare hash signatures. BUG=chromium:423882 BRANCH=none TEST=VBOOT2=1 make runtests Change-Id: I372c9e5f0be926a833e4ca8f84665cfb05907481 Reviewed-on: https://chromium-review.googlesource.com/226950 Tested-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org> Commit-Queue: Randall Spangler <rspangler@chromium.org>
* vboot2: add support for new vb2_signature2 structRandall Spangler2014-11-051-0/+27
| | | | | | | | | | | | | And assocated unit tests. BUG=chromium:423882 BRANCH=none TEST=VBOOT2=1 make runtests Change-Id: I37fccafd8ccee5c0d55e3746c1611a8dff73145a Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/226939 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* vboot2: use common header size fieldsRandall Spangler2014-11-051-36/+135
| | | | | | | | | | | | | | | | Add functions for verifying object integrity using common header size fields. Convert vb2_packed_key2 to use the the new functions. This isn't much prettier for packed keys; the benefit is more obvious for keyblocks (coming next). BUG=chromium:423882 BRANCH=none TEST=VBOOT2=1 make runtests Change-Id: I0c09533368abb7ced3b5ac622a15e62832413b7f Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/226874 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* vboot2: un-nest data structuresRandall Spangler2014-11-011-13/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Originally, we designed the vboot data structures so that some of them had sub-structures. Then the variable-length data for each of the structures was at the end. So: struct vb2_keyblock { struct vb2_packed_key struct vb2_signature } // Followed by variable-length data for keyblock // Followed by variable-length data for packed key // Followed by variable-length data for signature This had the weird side effect that the header and data for the sub-structs were not contiguous. That wasn't too bad before, but it gets more complicated with the new data structures. Each structure now can also have a description. And keyblocks can have a list of signatures. Structures also couldn't really know their own size, since a sub-struct might have a 20-byte header, but then 2K of other data in between that and the data for the sub-struct itself. So, un-nest all the data structures. That is, the keyblock now contains the offset of the signature struct, rather than the signature struct itself. And then all the variable-length data for each struct immediately follows the struct itself. So: struct vb2_keyblock2 { // Offset of packed key // Offset of first signature } // Followed by variable-length data for keyblock struct vb2_packed_key // Followed by variable-length data for packed key struct vb2_signature2 // Followed by variable-length data for signature (desc, sig data) Verifying and traversing these objects is much more straightforward. And each struct can now know its own size. This first change rearranges the structures. Descriptions now immediately follow the fixed size structure headers. The next change adds better verification of the structures, using the fixed_size and total_size fields in the common header. BUG=chromium:423882 BRANCH=none TEST=VBOOT2=1 make runtests Change-Id: Ieb9148d6f26c3e59ea542f3a95e59d8019ccee21 Reviewed-on: https://chromium-review.googlesource.com/226824 Tested-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org> Commit-Queue: Randall Spangler <rspangler@chromium.org>
* vboot2: Add verification for common vb2 struct headerRandall Spangler2014-10-291-1/+45
| | | | | | | | | | | | | | All new-style structs have a common header. This adds a verification function for that common header, and tests for it. BUG=chromium:423882 BRANCH=none TEST=VBOOT2=1 make runtests Change-Id: I668486e77f7200c10b43aa2d17b4dd6639e5538e Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/225459 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* vboot2: new data structuresRandall Spangler2014-10-241-5/+49
| | | | | | | | | | | | | | | | | These structures allow for simplication and feature expansion in vboot. They are NOT backwards-compatible with old vboot1 structs. This CL simply adds the new structs and unit tests for struct packing; future CLs will add support for them in the firmware library and futility. BUG=chromium:423882 BRANCH=none TEST=VBOOT2=1 make runtests Change-Id: I22532acf985dd74316bd30f17e750f993b6c53d7 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/224820 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* vboot2: move vb2_safe_memcmp() from rsa to commonRandall Spangler2014-10-181-0/+11
| | | | | | | | | | | | | | This will be needed by other algorithms, so should not live inside the rsa module. Also added explicit unit tests for it. BUG=chromium:423882 BRANCH=none TEST=VBOOT2=1 make runtests Change-Id: I92c8c6484964a93d755ac2ee93b57511794540e9 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/224111 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* vboot2: Use more specific error codes, part 2Randall Spangler2014-06-111-47/+60
| | | | | | | | | | | | | | | | Error codes reported by the aligment checks in common.c are now very specific, and tests verify the proper errors are reported. Changed args to vb2_member_inside() so I can force wraparounds. BUG=chromium:370082 BRANCH=none TEST=make clean && VBOOT2=1 COV=1 make Change-Id: Ib135674e82005b76bce7a83a1f4a65a9c5296cf4 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/202937 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* vboot2: Add common functionsRandall Spangler2014-06-051-0/+124
| | | | | | | | | | | | | | This is the third of several CLs adding a more memory- and code-efficient firmware verification library. BUG=chromium:370082 BRANCH=none TEST=make clean && COV=1 make Change-Id: I3a5daa5438afc5598d3dfcf5a597ffb16eda8749 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/200140 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* vboot2: Add workbuf functionsRandall Spangler2014-06-031-0/+102
We'll try breaking this up into smaller pieces. This one's pretty small - just the work buffer utility functions. BUG=chromium:370082 BRANCH=none TEST=make clean && VBOOT2=1 COV=1 make Change-Id: I4c417438053c155d6f7f9725552066e9b059951c Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/201141