libtpms/tests
Stefan Berger eed97cf008 tpm2: adapt NVRAM offsets and check structure sizes
Make sure that the NVRAM offsets and structure sizes are the same
on all architectures so that we can fill up the NVRAM on one system
and migrate the state to another architecture and it will fit into
the NVRAM space there.

We leave some space for the first few data structures in the NVRAM to
grow. We do this by rounding up the NV_INDEX_RAM_DATA location to the
next kb boundary. This moves it from offset 4356 to 5120 on x86_64 and
from offset 4332 to 5120 on i386. This now leaves us with the same
amount of space for user dynamic NVRAM, which starts beyond offset 5120.

We also pad the OBJECT structure with 4 bytes so that it is the same
size on 32 and 64 bit architectures. This is a data structure that
is used in user dynamic NVRAM and should be the same size on all
architectures so that a full NVRAM always fits.

Also test the size of the NV_INDEX structure, which already has the
same size on all tested architectures (x86_64, i386, arm32, ppc64).

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2018-06-15 18:07:49 -04:00
..
corpus-execute-command tests: add an initial corpus for fuzzing 2018-06-15 18:07:49 -04:00
base64decode.c Add a test case for the TPMLIB_DecodeBlob API 2014-01-08 11:43:37 -05:00
base64decode.sh tests: work around possibly missing tools 2017-10-12 12:46:34 -04:00
freebl_sha1flattensize.c Fix support for ARM64 2014-06-30 15:04:15 -04:00
fuzz.c tests: add fuzz test 2018-06-15 18:07:49 -04:00
Makefile.am tpm2: adapt NVRAM offsets and check structure sizes 2018-06-15 18:07:49 -04:00
nvram_offsets.c tpm2: adapt NVRAM offsets and check structure sizes 2018-06-15 18:07:49 -04:00