Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\verity\verify.c Create Date:2022-07-28 20:24:57
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:cmp_hashes

Proto:static inline int cmp_hashes(const struct fsverity_info *vi, const u8 *want_hash, const u8 *real_hash, unsigned long index, int level)

Type:int

Parameter:

TypeParameterName
const struct fsverity_info *vi
const u8 *want_hash
const u8 *real_hash
unsigned longindex
intlevel
56  hsize = same as hash_alg->digest_size
58  If memcmp(want_hash, real_hash, hsize) == 0 Then Return 0
61  fsverity_err(inode, "FILE CORRUPTED! index=%lu, level=%d, want_hash=%s:%*phN, real_hash=%s:%*phN", index, level, crypto API name, e.g. sha256 , hsize, want_hash, crypto API name, e.g. sha256 , hsize, real_hash)
66  Return -EBADMSG
Caller
NameDescribe
verify_pageVerify a single data page against the file's Merkle tree