<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/coreboot/vboot.git/tests, branch stabilize-12441.B</title>
<subtitle>review.coreboot.org: vboot.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/vboot.git/'/>
<entry>
<title>tests: Add array bounds check</title>
<updated>2019-08-17T01:13:01+00:00</updated>
<author>
<name>Jacob Garber</name>
<email>jgarber1@ualberta.ca</email>
</author>
<published>2019-08-13T20:50:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/vboot.git/commit/?id=7cdd879fe9381015aa01be36c0937bac8690253e'/>
<id>7cdd879fe9381015aa01be36c0937bac8690253e</id>
<content type='text'>
Ensure that mock_keypresses_count is in bounds before accessing the
mock_keyflags array.

BUG=none
TEST=make clean &amp;&amp; make runtests
BRANCH=none

Change-Id: Ifa8fce5438f2e2547c9e316038466244eee7bfa9
Signed-off-by: Jacob Garber &lt;jgarber1@ualberta.ca&gt;
Found-by: Coverity CID 198899
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1752048
Reviewed-by: Joel Kitching &lt;kitching@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ensure that mock_keypresses_count is in bounds before accessing the
mock_keyflags array.

BUG=none
TEST=make clean &amp;&amp; make runtests
BRANCH=none

Change-Id: Ifa8fce5438f2e2547c9e316038466244eee7bfa9
Signed-off-by: Jacob Garber &lt;jgarber1@ualberta.ca&gt;
Found-by: Coverity CID 198899
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1752048
Reviewed-by: Joel Kitching &lt;kitching@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vboot: vb2_shared_data offsets should hang off parent</title>
<updated>2019-08-16T07:25:30+00:00</updated>
<author>
<name>Joel Kitching</name>
<email>kitching@google.com</email>
</author>
<published>2019-07-25T08:39:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/vboot.git/commit/?id=eb10ebf76d78a7ac7cb6b66c6f1bba747d4e10ca'/>
<id>eb10ebf76d78a7ac7cb6b66c6f1bba747d4e10ca</id>
<content type='text'>
vb2_shared_data struct has many offsets to other objects in the
workbuf.  They are all prefixed with `workbuf_`, e.g.:
  uint32_t workbuf_data_key_offset;
  uint32_t workbuf_data_key_size;

In order to adhere to a hierarchical structure on the workbuf,
remove the workbuf_ prefix from these symbols to reflect the
relationship between vb2_shared_data and its children more
accurately.

Create a helper function vb2_member_of to safely look up a child
of a particular object in the workbuf by offset.  Pointer
arithmetic to find vb2_shared_data children is replaced with
calls to this function.

BUG=b:124141368, chromium:994060
TEST=make clean &amp;&amp; make runtests
BRANCH=none

Change-Id: Ia82417a35d2067ee5e4f42fea0396e6325127223
Signed-off-by: Joel Kitching &lt;kitching@google.com&gt;
Cq-Depend: chromium:1753400
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1718264
Commit-Queue: Joel Kitching &lt;kitching@chromium.org&gt;
Tested-by: Joel Kitching &lt;kitching@chromium.org&gt;
Reviewed-by: Julius Werner &lt;jwerner@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
vb2_shared_data struct has many offsets to other objects in the
workbuf.  They are all prefixed with `workbuf_`, e.g.:
  uint32_t workbuf_data_key_offset;
  uint32_t workbuf_data_key_size;

In order to adhere to a hierarchical structure on the workbuf,
remove the workbuf_ prefix from these symbols to reflect the
relationship between vb2_shared_data and its children more
accurately.

Create a helper function vb2_member_of to safely look up a child
of a particular object in the workbuf by offset.  Pointer
arithmetic to find vb2_shared_data children is replaced with
calls to this function.

BUG=b:124141368, chromium:994060
TEST=make clean &amp;&amp; make runtests
BRANCH=none

Change-Id: Ia82417a35d2067ee5e4f42fea0396e6325127223
Signed-off-by: Joel Kitching &lt;kitching@google.com&gt;
Cq-Depend: chromium:1753400
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1718264
Commit-Queue: Joel Kitching &lt;kitching@chromium.org&gt;
Tested-by: Joel Kitching &lt;kitching@chromium.org&gt;
Reviewed-by: Julius Werner &lt;jwerner@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Fix off-by-one error in array bounds check</title>
<updated>2019-08-16T04:13:20+00:00</updated>
<author>
<name>Jacob Garber</name>
<email>jgarber1@ualberta.ca</email>
</author>
<published>2019-08-13T20:25:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/vboot.git/commit/?id=445e371ebc7afaca6be293f43055eae0fbeb67be'/>
<id>445e371ebc7afaca6be293f43055eae0fbeb67be</id>
<content type='text'>
rptr points to an object with rsize number of bytes. If offset + size ==
rsize, then rptr + offset + size will point to one byte past the end of
the object during the memcpy(). Exclude this case by adding it to the
bounds check. We can also remove the offset &gt; rsize check since it is
subsumed in the other one.

BUG=none
TEST=make clean &amp;&amp; make runtests
BRANCH=none

Change-Id: Iceda658f420babe61bd1d9807efc8333d2044ccc
Signed-off-by: Jacob Garber &lt;jgarber1@ualberta.ca&gt;
Found-by: Coverity CID 198905
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1752766
Reviewed-by: Joel Kitching &lt;kitching@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
rptr points to an object with rsize number of bytes. If offset + size ==
rsize, then rptr + offset + size will point to one byte past the end of
the object during the memcpy(). Exclude this case by adding it to the
bounds check. We can also remove the offset &gt; rsize check since it is
subsumed in the other one.

BUG=none
TEST=make clean &amp;&amp; make runtests
BRANCH=none

Change-Id: Iceda658f420babe61bd1d9807efc8333d2044ccc
Signed-off-by: Jacob Garber &lt;jgarber1@ualberta.ca&gt;
Found-by: Coverity CID 198905
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1752766
Reviewed-by: Joel Kitching &lt;kitching@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vboot: properly check failure from VbExGetLocalizationCount</title>
<updated>2019-08-13T13:03:55+00:00</updated>
<author>
<name>Joel Kitching</name>
<email>kitching@google.com</email>
</author>
<published>2019-08-01T04:45:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/vboot.git/commit/?id=7ceb2ae796e6cd2b38a3344cffc8aa93032345ec'/>
<id>7ceb2ae796e6cd2b38a3344cffc8aa93032345ec</id>
<content type='text'>
Check the return value and result of calling
VbExGetLocalizationCount.  If something is awry,
fall back to using one language entry.

BUG=b:124141368
TEST=make clean &amp;&amp; make runtests
BRANCH=none

Change-Id: Ieeea54bfed303a98d16f15aceab47f1ffdd10d6d
Signed-off-by: Joel Kitching &lt;kitching@google.com&gt;
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1729773
Commit-Queue: Joel Kitching &lt;kitching@chromium.org&gt;
Tested-by: Joel Kitching &lt;kitching@chromium.org&gt;
Reviewed-by: Julius Werner &lt;jwerner@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Check the return value and result of calling
VbExGetLocalizationCount.  If something is awry,
fall back to using one language entry.

BUG=b:124141368
TEST=make clean &amp;&amp; make runtests
BRANCH=none

Change-Id: Ieeea54bfed303a98d16f15aceab47f1ffdd10d6d
Signed-off-by: Joel Kitching &lt;kitching@google.com&gt;
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1729773
Commit-Queue: Joel Kitching &lt;kitching@chromium.org&gt;
Tested-by: Joel Kitching &lt;kitching@chromium.org&gt;
Reviewed-by: Julius Werner &lt;jwerner@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vboot/secdata: remove retries from rollback functions</title>
<updated>2019-08-13T08:27:53+00:00</updated>
<author>
<name>Joel Kitching</name>
<email>kitching@google.com</email>
</author>
<published>2019-08-01T08:46:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/vboot.git/commit/?id=7ad9f51996d9d950dfbf6c11c82144f7026a68aa'/>
<id>7ad9f51996d9d950dfbf6c11c82144f7026a68aa</id>
<content type='text'>
Assume that transport-layer communication to Cr50 is reliable.
No need for retries on reads/writes, or verification after write.

BUG=b:124141368, chromium:972956
TEST=make clean &amp;&amp; make runtests
BRANCH=none

Change-Id: Ie57d1eeaa44c338bca289e371c516540aacf9437
Signed-off-by: Joel Kitching &lt;kitching@google.com&gt;
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1729713
Tested-by: Joel Kitching &lt;kitching@chromium.org&gt;
Reviewed-by: Julius Werner &lt;jwerner@chromium.org&gt;
Commit-Queue: Joel Kitching &lt;kitching@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Assume that transport-layer communication to Cr50 is reliable.
No need for retries on reads/writes, or verification after write.

BUG=b:124141368, chromium:972956
TEST=make clean &amp;&amp; make runtests
BRANCH=none

Change-Id: Ie57d1eeaa44c338bca289e371c516540aacf9437
Signed-off-by: Joel Kitching &lt;kitching@google.com&gt;
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1729713
Tested-by: Joel Kitching &lt;kitching@chromium.org&gt;
Reviewed-by: Julius Werner &lt;jwerner@chromium.org&gt;
Commit-Queue: Joel Kitching &lt;kitching@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vboot: replace VBERROR_INVALID_PARAMETER with vboot2 equivalent</title>
<updated>2019-08-13T08:23:57+00:00</updated>
<author>
<name>Joel Kitching</name>
<email>kitching@google.com</email>
</author>
<published>2019-07-30T02:13:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/vboot.git/commit/?id=9cced0d0ee574caad85c856519e0399f5e1f569d'/>
<id>9cced0d0ee574caad85c856519e0399f5e1f569d</id>
<content type='text'>
Replace vboot1-style VBERROR_INVALID_PARAMETER with vboot2 equivalent
VB2_ERROR_INVALID_PARAMETER.

BUG=b:124141368, chromium:988410
TEST=make clean &amp;&amp; make runtests
BRANCH=none

Change-Id: I46227cd3a7d7ce84654a0093f9d64883c9563381
Signed-off-by: Joel Kitching &lt;kitching@google.com&gt;
Cq-Depend: chromium:1728116
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1728294
Commit-Queue: Joel Kitching &lt;kitching@chromium.org&gt;
Tested-by: Joel Kitching &lt;kitching@chromium.org&gt;
Reviewed-by: Julius Werner &lt;jwerner@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace vboot1-style VBERROR_INVALID_PARAMETER with vboot2 equivalent
VB2_ERROR_INVALID_PARAMETER.

BUG=b:124141368, chromium:988410
TEST=make clean &amp;&amp; make runtests
BRANCH=none

Change-Id: I46227cd3a7d7ce84654a0093f9d64883c9563381
Signed-off-by: Joel Kitching &lt;kitching@google.com&gt;
Cq-Depend: chromium:1728116
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1728294
Commit-Queue: Joel Kitching &lt;kitching@chromium.org&gt;
Tested-by: Joel Kitching &lt;kitching@chromium.org&gt;
Reviewed-by: Julius Werner &lt;jwerner@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vboot: replace VBERROR_SIMULATED with VB2_ERROR_MOCK</title>
<updated>2019-08-13T08:23:56+00:00</updated>
<author>
<name>Joel Kitching</name>
<email>kitching@google.com</email>
</author>
<published>2019-07-29T10:55:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/vboot.git/commit/?id=166a07d1d64a9aed1bfecc8ba0cd73354a8dbd60'/>
<id>166a07d1d64a9aed1bfecc8ba0cd73354a8dbd60</id>
<content type='text'>
Replace vboot1-style VBERROR_SIMULATED with VB2_ERROR_MOCK.

BUG=b:124141368, chromium:988410
TEST=make clean &amp;&amp; make runtests
BRANCH=none

Change-Id: I9f7a21b957097672883a428a5210c14a27852085
Signed-off-by: Joel Kitching &lt;kitching@google.com&gt;
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1722917
Commit-Queue: Joel Kitching &lt;kitching@chromium.org&gt;
Tested-by: Joel Kitching &lt;kitching@chromium.org&gt;
Reviewed-by: Julius Werner &lt;jwerner@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace vboot1-style VBERROR_SIMULATED with VB2_ERROR_MOCK.

BUG=b:124141368, chromium:988410
TEST=make clean &amp;&amp; make runtests
BRANCH=none

Change-Id: I9f7a21b957097672883a428a5210c14a27852085
Signed-off-by: Joel Kitching &lt;kitching@google.com&gt;
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1722917
Commit-Queue: Joel Kitching &lt;kitching@chromium.org&gt;
Tested-by: Joel Kitching &lt;kitching@chromium.org&gt;
Reviewed-by: Julius Werner &lt;jwerner@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vboot: replace VBERROR_UNKNOWN with VB2_ERROR_UNKNOWN</title>
<updated>2019-08-13T08:23:55+00:00</updated>
<author>
<name>Joel Kitching</name>
<email>kitching@google.com</email>
</author>
<published>2019-07-29T10:53:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/vboot.git/commit/?id=9908a9a305699bbca42d0fcff88008ebea522b66'/>
<id>9908a9a305699bbca42d0fcff88008ebea522b66</id>
<content type='text'>
Replace vboot1-style VBERROR_UNKNOWN with VB2_ERROR_UNKNOWN.

BUG=b:124141368, chromium:988410
TEST=make clean &amp;&amp; make runtests
BRANCH=none

Change-Id: Icd2158e328142cff69ce94b5396ab021a1f7839c
Signed-off-by: Joel Kitching &lt;kitching@google.com&gt;
Cq-Depend: chromium:1728115
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1722916
Commit-Queue: Joel Kitching &lt;kitching@chromium.org&gt;
Tested-by: Joel Kitching &lt;kitching@chromium.org&gt;
Reviewed-by: Julius Werner &lt;jwerner@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace vboot1-style VBERROR_UNKNOWN with VB2_ERROR_UNKNOWN.

BUG=b:124141368, chromium:988410
TEST=make clean &amp;&amp; make runtests
BRANCH=none

Change-Id: Icd2158e328142cff69ce94b5396ab021a1f7839c
Signed-off-by: Joel Kitching &lt;kitching@google.com&gt;
Cq-Depend: chromium:1728115
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1722916
Commit-Queue: Joel Kitching &lt;kitching@chromium.org&gt;
Tested-by: Joel Kitching &lt;kitching@chromium.org&gt;
Reviewed-by: Julius Werner &lt;jwerner@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vboot: replace VBERROR_SUCCESS with VB2_SUCCESS</title>
<updated>2019-08-13T08:23:54+00:00</updated>
<author>
<name>Joel Kitching</name>
<email>kitching@google.com</email>
</author>
<published>2019-07-29T10:51:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/vboot.git/commit/?id=cf49e7b6ae5abee0552b596ec11b695b5d15853c'/>
<id>cf49e7b6ae5abee0552b596ec11b695b5d15853c</id>
<content type='text'>
Replace vboot1-style VBERROR_SUCCESS with VB2_SUCCESS
(trivial change since both are equal values).

BUG=b:124141368, chromium:988410
TEST=make clean &amp;&amp; make runtests
BRANCH=none

Change-Id: I46e02471a031e9f36ec869d11d0b957d1c1b5769
Signed-off-by: Joel Kitching &lt;kitching@google.com&gt;
Cq-Depend: chromium:1728114
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1722915
Commit-Queue: Joel Kitching &lt;kitching@chromium.org&gt;
Tested-by: Joel Kitching &lt;kitching@chromium.org&gt;
Reviewed-by: Julius Werner &lt;jwerner@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace vboot1-style VBERROR_SUCCESS with VB2_SUCCESS
(trivial change since both are equal values).

BUG=b:124141368, chromium:988410
TEST=make clean &amp;&amp; make runtests
BRANCH=none

Change-Id: I46e02471a031e9f36ec869d11d0b957d1c1b5769
Signed-off-by: Joel Kitching &lt;kitching@google.com&gt;
Cq-Depend: chromium:1728114
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1722915
Commit-Queue: Joel Kitching &lt;kitching@chromium.org&gt;
Tested-by: Joel Kitching &lt;kitching@chromium.org&gt;
Reviewed-by: Julius Werner &lt;jwerner@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vboot: update vboot2 functions to use new vb2_error_t</title>
<updated>2019-08-13T04:36:52+00:00</updated>
<author>
<name>Joel Kitching</name>
<email>kitching@google.com</email>
</author>
<published>2019-07-31T06:12:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/vboot.git/commit/?id=e6700f4c70fe72850ae4f3f5df19c9281ebcefc8'/>
<id>e6700f4c70fe72850ae4f3f5df19c9281ebcefc8</id>
<content type='text'>
To make explicit when vboot2 error codes should be returned,
use the new vb2_error_t type on all functions which return
VB2_ERROR_* constants.

BUG=b:124141368, chromium:988410
TEST=make clean &amp;&amp; make runtests
BRANCH=none

Change-Id: Idd3ee8afe8c78347783ce5fa829cb78f1e5719e2
Signed-off-by: Joel Kitching &lt;kitching@google.com&gt;
Cq-Depend: chromium:1728113, chromium:1728499
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1728292
Reviewed-by: Joel Kitching &lt;kitching@chromium.org&gt;
Commit-Queue: Joel Kitching &lt;kitching@chromium.org&gt;
Tested-by: Joel Kitching &lt;kitching@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To make explicit when vboot2 error codes should be returned,
use the new vb2_error_t type on all functions which return
VB2_ERROR_* constants.

BUG=b:124141368, chromium:988410
TEST=make clean &amp;&amp; make runtests
BRANCH=none

Change-Id: Idd3ee8afe8c78347783ce5fa829cb78f1e5719e2
Signed-off-by: Joel Kitching &lt;kitching@google.com&gt;
Cq-Depend: chromium:1728113, chromium:1728499
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1728292
Reviewed-by: Joel Kitching &lt;kitching@chromium.org&gt;
Commit-Queue: Joel Kitching &lt;kitching@chromium.org&gt;
Tested-by: Joel Kitching &lt;kitching@chromium.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
