函数逻辑报告

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_encrypt() - encrypt a filename* The output buffer must be at least as large as the input buffer.* Any extra space is filled with NUL padding before encryption.* Return: 0 on success, -errno on failure

函数原型:int fname_encrypt(struct inode *inode, const struct qstr *iname, u8 *out, unsigned int olen)

返回类型:int

参数:

类型参数名称
struct inode *inode
const struct qstr *iname
u8 *out
unsigned intolen
40  struct skcipher_request * req = NULL
42  ci等于i_crypt_info
43  tfm等于The actual crypto transform used for encryption and decryption
52  如果WARN_ON(olen < len)则返回:负ENOBUFS
54  memcpy(out, name, len)
55  memset(out + len, 0, olen - len)
58  fscrypt_generate_iv( & iv, 0, ci)
61  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
62  如果非req则返回:负ENOMEM
64  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
67  初始化散列表项目
68  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
71  res等于crypto_wait_req(rypto_skcipher_encrypt() - encrypt plaintext*@req: reference to the skcipher_request handle that holds all information* needed to perform the cipher operation* Encrypt plaintext data using the skcipher_request handle, & wait)
72  skcipher_request_free() - zeroize and free request data structure*@req: request data structure cipher handle to be freed
73  如果res小于0则
74  fscrypt_err(inode, "Filename encryption failed: %d", res)
75  返回:res
78  返回:0
调用者
名称描述
fscrypt_setup_filenamescrypt_setup_filename() - prepare to search a possibly encrypted directory*@dir: the directory that will be searched*@iname: the user-provided filename being searched for*@lookup: 1 if we're allowed to proceed without the key because it's* ->lookup() or
__fscrypt_encrypt_symlink