• Home
  • Raw
  • Download

Lines Matching refs:params

18 				   const struct merkle_tree_params *params,  in build_merkle_tree_level()  argument
28 if (WARN_ON(params->block_size != PAGE_SIZE)) /* checked earlier too */ in build_merkle_tree_level()
31 if (level < params->num_levels) { in build_merkle_tree_level()
32 dst_block_num = params->level_start[level]; in build_merkle_tree_level()
59 params->level_start[level - 1] + i); in build_merkle_tree_level()
64 err, params->level_start[level - 1] + i); in build_merkle_tree_level()
69 err = fsverity_hash_page(params, inode, req, src_page, in build_merkle_tree_level()
74 pending_size += params->digest_size; in build_merkle_tree_level()
76 if (level == params->num_levels) /* Root hash? */ in build_merkle_tree_level()
79 if (pending_size + params->digest_size > params->block_size || in build_merkle_tree_level()
83 params->block_size - pending_size); in build_merkle_tree_level()
87 params->log_blocksize); in build_merkle_tree_level()
114 const struct merkle_tree_params *params, in build_merkle_tree() argument
125 memset(root_hash, 0, params->digest_size); in build_merkle_tree()
129 pending_hashes = kmalloc(params->block_size, GFP_KERNEL); in build_merkle_tree()
130 req = ahash_request_alloc(params->hash_alg->tfm, GFP_KERNEL); in build_merkle_tree()
139 blocks = (inode->i_size + params->block_size - 1) >> in build_merkle_tree()
140 params->log_blocksize; in build_merkle_tree()
141 for (level = 0; level <= params->num_levels; level++) { in build_merkle_tree()
142 err = build_merkle_tree_level(inode, level, blocks, params, in build_merkle_tree()
146 blocks = (blocks + params->hashes_per_block - 1) >> in build_merkle_tree()
147 params->log_arity; in build_merkle_tree()
149 memcpy(root_hash, pending_hashes, params->digest_size); in build_merkle_tree()
162 struct merkle_tree_params params = { }; in enable_verity() local
199 err = fsverity_init_merkle_tree_params(&params, inode, in enable_verity()
230 err = build_merkle_tree(inode, &params, desc->root_hash); in enable_verity()
236 params.hash_alg->name, params.digest_size, desc->root_hash); in enable_verity()
260 err = vops->end_enable_verity(filp, desc, desc_size, params.tree_size); in enable_verity()
280 kfree(params.hashstate); in enable_verity()
286 (void)vops->end_enable_verity(filp, NULL, 0, params.tree_size); in enable_verity()