函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:scrypt_get_symlink - get the target of an encrypted symlink*@inode: the symlink inode*@caddr: the on-disk contents of the symlink*@max_size: size of @caddr buffer*@done: if successful, will be set up to free the returned target if needed

函数原型:const char *fscrypt_get_symlink(struct inode *inode, const void *caddr, unsigned int max_size, struct delayed_call *done)

返回类型:char

参数:

类型参数名称
struct inode *inode
const void *caddr
unsigned intmax_size
struct delayed_call *done
243  如果WARN_ON(!IS_ENCRYPTED(inode))则返回:错误号
247  name等于READ_ONCE(i_link)
248  如果name则返回:name
255  err等于fscrypt_get_encryption_info(inode)
256  如果err则返回:错误号
258  has_key等于fscrypt_has_encryption_key(inode)
265  如果max_size小于sd的长度则返回:错误号
267  sd等于caddr
268  name等于encrypted_path
269  len等于le16_to_cpu(len)
271  如果len恒等于0则返回:错误号
274  如果lensd的长度减1大于max_size则返回:错误号
277  err等于scrypt_fname_alloc_buffer - allocate a buffer for presented filenames* Allocate a buffer that is large enough to hold any decrypted or encoded* filename (null-terminated), for the given maximum encrypted filename length
278  如果err则返回:错误号
281  err等于scrypt_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
282  如果err则转到:err_kfree
285  err等于负EUCLEAN
286  如果name[0]恒等于'\0'则转到:err_kfree
289  name[len]等于'\0'
297  如果(!has_key || cmpxchg_release( & i_link, NULL, name) != NULL)则I really wish we had closures with sane typechecking...
301  返回:name
303  err_kfree :
304  释放内存
305  返回:错误号