函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ame_decrypt() - decrypt a filename* The caller must have allocated sufficient memory for the @oname string.* Return: 0 on success, -errno on failure

函数原型:static int fname_decrypt(struct inode *inode, const struct fscrypt_str *iname, struct fscrypt_str *oname)

返回类型:int

参数:

类型参数名称
struct inode *inode
const struct fscrypt_str *iname
struct fscrypt_str *oname
92  struct skcipher_request * req = NULL
95  ci等于i_crypt_info
96  tfm等于The actual crypto transform used for encryption and decryption
101  req等于skcipher_request_alloc() - allocate request data structure*@tfm: cipher handle to be registered with the request*@gfp: memory allocation flag that is handed to kmalloc by the API call
102  如果非req则返回:负ENOMEM
104  skcipher_request_set_callback() - set asynchronous callback function*@req: request handle*@flags: specify zero or an ORing of the flags* CRYPTO_TFM_REQ_MAY_BACKLOG the request queue may back log and* increase the wait queue beyond the initial maximum
109  fscrypt_generate_iv( & iv, 0, ci)
112  初始化散列表项目
113  初始化散列表项目
114  skcipher_request_set_crypt() - set data buffers*@req: request handle*@src: source scatter / gather list*@dst: destination scatter / gather list*@cryptlen: number of bytes to process from @src*@iv: IV for the cipher operation which must comply with the IV
115  res等于crypto_wait_req(rypto_skcipher_decrypt() - decrypt ciphertext*@req: reference to the skcipher_request handle that holds all information* needed to perform the cipher operation* Decrypt ciphertext data using the skcipher_request handle, & wait)
116  skcipher_request_free() - zeroize and free request data structure*@req: request data structure cipher handle to be freed
117  如果res小于0则
118  fscrypt_err(inode, "Filename decryption failed: %d", res)
119  返回:res
122  len等于字符串长度
123  返回:0
调用者
名称描述
fscrypt_fname_disk_to_usrscrypt_fname_disk_to_usr() - converts a filename from disk space to user* space* The caller must have allocated sufficient memory for the @oname string.* If the key is available, we'll decrypt the disk name; otherwise, we'll encode* it for presentation