函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\verity\verify.c Create Date:2022-07-29 10:58:43
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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

函数原型:static void hash_at_level(const struct merkle_tree_params *params, unsigned long dindex, unsigned int level, unsigned long *hindex, unsigned int *hoffset)

返回类型:void

参数:

类型参数名称
const struct merkle_tree_params *params
unsigned longdindex
unsigned intlevel
unsigned long *hindex
unsigned int *hoffset
32  position等于dindex右移levellog2(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)
调用者
名称描述
verify_pageVerify a single data page against the file's Merkle tree