函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:fscrypt_generate_iv

函数原型:void fscrypt_generate_iv(union fscrypt_iv *iv, u64 lblk_num, const struct fscrypt_info *ci)

返回类型:void

参数:

类型参数名称
union fscrypt_iv *iv
u64lblk_num
const struct fscrypt_info *ci
76  flags等于Return the flags (FSCRYPT_POLICY_FLAG*) of a valid encryption policy
78  memset(iv, 0, ivsize)
80  如果flags按位与FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64
81  WARN_ON_ONCE((u32)lblk_num != lblk_num)
82  lblk_num或等于Stat data, not accessed from path walking 左移32位
83  否则如果flags按位与FSCRYPT_POLICY_FLAG_DIRECT_KEY
84  memcpy( per-file nonce; only set in DIRECT_KEY mode , This inode's nonce, copied from the fscrypt_context , FS_KEY_DERIVATION_NONCE_SIZE)
86  logical block number within the file 等于The following macros are to be defined by (lblk_num)
调用者
名称描述
fscrypt_crypt_blockEncrypt or decrypt a single filesystem block of file contents
fname_encryptame_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
fname_decryptame_decrypt() - decrypt a filename* The caller must have allocated sufficient memory for the @oname string.* Return: 0 on success, -errno on failure