diff options
author | Julius Werner <jwerner@chromium.org> | 2021-04-02 15:58:05 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-04-06 07:48:58 +0000 |
commit | fccf1221a23d3fe5ca57cff6bb6a71d75e67041f (patch) | |
tree | a9620c9e1498815a16182bfb1e17846abfeb36ce /src/commonlib/bsd/include | |
parent | eca99af22918d1fe8775ed7d299d235147d82228 (diff) |
cbfs: Add file data hashing for CONFIG_CBFS_VERIFICATION
This patch adds file data hashing for CONFIG_CBFS_VERIFICATION. With
this, all CBFS accesses using the new CBFS APIs (cbfs_load/_map/_alloc
and variants) will be fully verified when verification is enabled. (Note
that some use of legacy APIs remains and thus the CBFS_VERIFICATION
feature is not fully finished.)
Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: Ic9fff279f69cf3b7c38a0dc2ff3c970eaa756aa8
Reviewed-on: https://review.coreboot.org/c/coreboot/+/52084
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/commonlib/bsd/include')
-rw-r--r-- | src/commonlib/bsd/include/commonlib/bsd/cbfs_mdata.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/commonlib/bsd/include/commonlib/bsd/cbfs_mdata.h b/src/commonlib/bsd/include/commonlib/bsd/cbfs_mdata.h index df13427c5f..ed5c378973 100644 --- a/src/commonlib/bsd/include/commonlib/bsd/cbfs_mdata.h +++ b/src/commonlib/bsd/include/commonlib/bsd/cbfs_mdata.h @@ -24,4 +24,7 @@ union cbfs_mdata { else caller is responsible for checking the |len| field to avoid reading out-of-bounds. */ const void *cbfs_find_attr(const union cbfs_mdata *mdata, uint32_t attr_tag, size_t size_check); +/* Returns pointer to CBFS file hash structure in metadata attributes, or NULL if invalid. */ +const struct vb2_hash *cbfs_file_hash(const union cbfs_mdata *mdata); + #endif /* _COMMONLIB_BSD_CBFS_MDATA_H_ */ |