diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2015-11-27 07:19:10 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-12-03 02:21:57 -0800 |
commit | d1f1e7722dac34b29a3942919cba8150e9838866 (patch) | |
tree | da7f2d702b7ed8024e722a91cc989529439f0cdc /common/thermal.c | |
parent | 25b573bdae39087b93481b29ca5d8c721f59608b (diff) | |
download | chrome-ec-d1f1e7722dac34b29a3942919cba8150e9838866.tar.gz |
cr50: reduce hash implementation stack requirements
Stack space is pretty tight on cr50, and since there is no need to
support SHA digest sizes in excess of 256 bits, the digest buffer size
should be reduced.
This patch makes the maximum expected digest size dependent on the set
of configured hash algorithms, moves hash size related asserts from
run time to compile time, and passes compile time definition to the
TPM2 library to increase its hash state container (it became too small
when SHA384 was disabled).
The sw context requirements should be reduced, but this is a task for
another day. We also do not have to store a local digest copy if the
API allowed reading a partial digest.
CQ-DEPEND=CL:314883
BRANCH=none
BUG=chrome-os-partner:43025, chromium:564862
TEST=all tests pass:
$ ./test/tpm_test/tpmtest.py
Starting MPSSE at 800 kHz
Connected to device vid:did:rid of 1ae0:0028:00
SUCCESS: AES:ECB common
SUCCESS: AES:ECB128 1
SUCCESS: AES:ECB192 1
SUCCESS: AES:ECB256 1
SUCCESS: AES:ECB256 2
SUCCESS: AES:CTR128I 1
SUCCESS: AES:CTR256I 1
SUCCESS: sha1:single 0
SUCCESS: sha256:single 0
/New max timeout: 1 s
SUCCESS: sha256:finish 1
SUCCESS: sha1:finish 3
SUCCESS: sha256:finish 2
Change-Id: Iaef3a230469de129e72418814e1d113b447c0137
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/314695
Reviewed-by: Nagendra Modadugu <ngm@google.com>
Diffstat (limited to 'common/thermal.c')
0 files changed, 0 insertions, 0 deletions