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:hash_at_level() - compute the location of the block's hash at the given level*@params: (in) the Merkle tree parameters*@dindex: (in) the index of the data block being verified*@level: (in) the level of hash we want (0 is leaf level)*@hindex: (out) the

Proto:static void hash_at_level(const struct merkle_tree_params *params, unsigned long dindex, unsigned int level, unsigned long *hindex, unsigned int *hoffset)

Type:void

Parameter:

TypeParameterName
const struct merkle_tree_params *params
unsigned longdindex
unsigned intlevel
unsigned long *hindex
unsigned int *hoffset
32  position = dindex >> level * log2(hashes_per_block)
35  hindex = Starting block index for each tree level, ordered from leaf level (0)* to root level ('num_levels - 1')[level] + (position >> log2(hashes_per_block) )
38  hoffset = (position & (1 << log2(hashes_per_block) ) - 1 ) << log2(block_size) - log2(hashes_per_block)
Caller
NameDescribe
verify_pageVerify a single data page against the file's Merkle tree