函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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

函数原型:int fscrypt_fname_disk_to_usr(struct inode *inode, unsigned int hash, unsigned int minor_hash, const struct fscrypt_str *iname, struct fscrypt_str *oname)

返回类型:int

参数:

类型参数名称
struct inode *inode
unsigned inthash
unsigned intminor_hash
const struct fscrypt_str *iname
struct fscrypt_str *oname
255  qname等于FSTR_TO_QSTR(iname)
258  如果fscrypt_is_dot_dotdot( & qname)则
259  name[0]等于'.'
260  name[len - 1]等于'.'
261  len等于len
262  返回:0
265  如果len小于ld names; don't add anything new here! 则返回:负EUCLEAN
268  如果fscrypt_has_encryption_key(inode)则返回:ame_decrypt() - decrypt a filename* The caller must have allocated sufficient memory for the @oname string.* Return: 0 on success, -errno on failure
271  如果len小于等于FSCRYPT_FNAME_MAX_UNDIGESTED_SIZE
272  len等于ase64_encode() -* Encodes the input string using characters from the set [A-Za-z0-9+,].* The encoded string is roughly 4/3 times the size of the input string.* Return: length of the encoded string
274  返回:0
276  如果hash
277  hash等于hash
278  minor_hash等于minor_hash
279  否则
280  hash等于0
281  minor_hash等于0
283  memcpy(digest, FSCRYPT_FNAME_DIGEST(name, len), FSCRYPT_FNAME_DIGEST_SIZE)
286  name[0]等于'_'
287  len等于1加ase64_encode() -* Encodes the input string using characters from the set [A-Za-z0-9+,].* The encoded string is roughly 4/3 times the size of the input string.* Return: length of the encoded string
289  返回:0
调用者
名称描述
fscrypt_get_symlinkscrypt_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