Function report |
Source Code:fs\verity\hash_algs.c |
Create Date:2022-07-28 20:24:38 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:sverity_get_hash_alg() - validate and prepare a hash algorithm*@inode: optional inode for logging purposes*@num: the hash algorithm number* Get the struct fsverity_hash_alg for the given hash algorithm number, and
Proto:const struct fsverity_hash_alg *fsverity_get_hash_alg(const struct inode *inode, unsigned int num)
Type:struct fsverity_hash_alg
Parameter:
| Type | Parameter | Name |
|---|---|---|
| const struct inode * | inode | |
| unsigned int | num |
| 48 | fsverity_warn(inode, "Unknown hash algorithm number: %u", num) |
| 55 | If Value is more likely to compile time(tfm != NULL) Then Return alg |
| 61 | tfm = crypto_alloc_ahash(crypto API name, e.g. sha256 , 0, 0) |
| 64 | fsverity_warn(inode, "Missing crypto API support for hash algorithm \"%s\"", crypto API name, e.g. sha256 ) |
| 69 | fsverity_err(inode, "Error allocating hash algorithm \"%s\": %ld", crypto API name, e.g. sha256 , PTR_ERR(tfm)) |
| 81 | pr_info("%s using implementation \"%s\"\n", crypto API name, e.g. sha256 , crypto_ahash_driver_name(tfm)) |
| 85 | If (cmpxchg( & hash tfm, allocated on demand , NULL, tfm) != NULL) Then rypto_free_ahash() - zeroize and free the ahash handle*@tfm: cipher handle to be freed |
| 88 | Return alg |
| 90 | err_free_tfm : |
| Name | Describe |
|---|---|
| fsverity_init_merkle_tree_params | sverity_init_merkle_tree_params() - initialize Merkle tree parameters*@params: the parameters struct to initialize*@inode: the inode for which the Merkle tree is being built*@hash_algorithm: number of hash algorithm to use*@log_blocksize: log base 2 of |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |