函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__fscrypt_encrypt_symlink

函数原型:int __fscrypt_encrypt_symlink(struct inode *inode, const char *target, unsigned int len, struct fscrypt_str *disk_link)

返回类型:int

参数:

类型参数名称
struct inode *inode
const char *target
unsigned intlen
struct fscrypt_str *disk_link
172  iname等于QSTR_INIT(target, len)
176  err等于scrypt_require_key - require an inode's encryption key*@inode: the inode we need the key for* If the inode is encrypted, set up its encryption key if not already done
177  如果err则返回:err
180  如果name
182  sd等于name
183  否则
184  sd等于开辟内存
185  如果非sd则返回:负ENOMEM
188  ciphertext_len等于lensd的长度
189  len等于cpu_to_le16(ciphertext_len)
191  err等于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
192  如果err则转到:err_free_sd
200  encrypted_path[ciphertext_len]等于'\0'
203  err等于负ENOMEM
204  i_link等于kmemdup - duplicate region of memory*@src: memory region to duplicate*@len: memory region length*@gfp: GFP mask to use* Return: newly allocated copy of @src or %NULL in case of error
205  如果非i_link则转到:err_free_sd
208  如果非namename等于sd
210  返回:0
212  err_free_sd :
213  如果非name释放内存
215  返回:err
调用者
名称描述
fscrypt_encrypt_symlinkscrypt_encrypt_symlink - encrypt the symlink target if needed*@inode: symlink inode*@target: plaintext symlink target*@len: length of @target excluding null terminator*@disk_link: (in/out) the on-disk symlink target being prepared* If the symlink target