Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\crypto\fname.c Create Date:2022-07-28 20:23:37
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

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

Proto:static int fname_decrypt(struct inode *inode, const struct fscrypt_str *iname, struct fscrypt_str *oname)

Type:int

Parameter:

TypeParameterName
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  If Not req Then Return -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  sg_init_one - Initialize a single entry sg list*@sg: SG entry*@buf: Virtual address for IO*@buflen: IO length
113  sg_init_one - Initialize a single entry sg list*@sg: SG entry*@buf: Virtual address for IO*@buflen: IO length
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  If res < 0 Then
118  fscrypt_err(inode, "Filename decryption failed: %d", res)
119  Return res
122  len = Find the length of a length-limited string
123  Return 0
Caller
NameDescribe
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