summaryrefslogtreecommitdiff
path: root/lib/variables.c
diff options
context:
space:
mode:
authorChris Coulson <chris.coulson@canonical.com>2019-06-22 15:37:29 +0100
committerPeter Jones <pjones@redhat.com>2020-07-23 20:53:24 -0400
commit9f80be9f16a854e3946568fa92edebe26eb79e78 (patch)
treed94970752f5a560057dd0e9b112c09e1d020bb6d /lib/variables.c
parent6fd8db6bb3b23b9e41f109135253f77263071f46 (diff)
downloadefi-boot-shim-9f80be9f16a854e3946568fa92edebe26eb79e78.tar.gz
efi-boot-shim-9f80be9f16a854e3946568fa92edebe26eb79e78.zip
tpm: Define EFI_VARIABLE_DATA_TREE as packed
tpm_measure_variable() calculates VarLogSize by adding the size of VarName and VarData to the size of EFI_VARIABLE_DATA_TREE, and then subtracting the size of the UnicodeName and VariableData members. This results in a calculation that is 5 bytes larger than necessary because it doesn't take in to account the padding of these members. The effect of this is that shim measures an additional 5 zero bytes when measuring UEFI variables (at least on 64-bit architectures). Byte packing EFI_VARIABLE_DATA_TREE fixes this. Upstream-commit-id: 7e4d3f1c8c7
Diffstat (limited to 'lib/variables.c')
0 files changed, 0 insertions, 0 deletions