| 函数逻辑报告 | 
| Source Code: fs\crypto\keysetup.c | Create Date:2022-07-29 10:57:34 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:fscrypt_get_encryption_info
函数原型:int fscrypt_get_encryption_info(struct inode *inode)
返回类型:int
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| struct inode * | inode | 
| 362 | struct key * master_key = NULL | 
| 365 | 如果fscrypt_has_encryption_key(inode)则返回:0 | 
| 372 | res等于get_context(inode, & ctx, ctx的长度) | 
| 373 | 如果res小于0则 | 
| 374 | 如果非fscrypt_dummy_context_enabled(inode)或IS_ENCRYPTED(inode)则 | 
| 376 | fscrypt_warn(inode, "Error %d getting encryption context", res) | 
| 379 | 返回:res | 
| 386 | memset(master_key_descriptor, 0x42, FSCRYPT_KEY_DESCRIPTOR_SIZE) | 
| 391 | crypt_info等于Shortcuts | 
| 392 | 如果非crypt_info则返回:负ENOMEM | 
| 398 | 如果res则 | 
| 399 | fscrypt_warn(inode, "Unrecognized or corrupt encryption context") | 
| 401 | 转到:out | 
| 405 | 当:version恒等于FSCRYPT_CONTEXT_V1 | 
| 406 | memcpy(This inode's nonce, copied from the fscrypt_context , nonce, FS_KEY_DERIVATION_NONCE_SIZE) | 
| 408 | 退出 | 
| 409 | 当:version恒等于FSCRYPT_CONTEXT_V2 | 
| 410 | memcpy(This inode's nonce, copied from the fscrypt_context , nonce, FS_KEY_DERIVATION_NONCE_SIZE) | 
| 412 | 退出 | 
| 413 | 默认 | 
| 425 | 如果是错误则 | 
| 429 | WARN_ON(ivsize > FSCRYPT_MAX_IV_SIZE) | 
| 430 | Encryption mode used for this inode. It corresponds to either the* contents or filenames encryption mode, depending on the inode type.等于mode | 
| 436 | 如果(cmpxchg_release( & i_crypt_info, NULL, crypt_info) == NULL)则 | 
| 437 | 如果master_key则 | 
| 443 | 加自旋锁 | 
| 444 | 添加链表项 | 
| 446 | 自旋锁解锁 | 
| 448 | crypt_info = NULL | 
| 450 | res等于0 | 
| 451 | out : | 
| 452 | 如果master_key则 | 
| 460 | put_crypt_info(crypt_info) | 
| 461 | 返回:res | 
| 名称 | 描述 | 
|---|---|
| fscrypt_setup_filename | scrypt_setup_filename() - prepare to search a possibly encrypted directory*@dir: the directory that will be searched*@iname: the user-provided filename being searched for*@lookup: 1 if we're allowed to proceed without the key because it's* ->lookup() or | 
| __fscrypt_prepare_symlink | |
| fscrypt_get_symlink | 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 | 
| fscrypt_has_permitted_context | scrypt_has_permitted_context() - is a file's encryption policy permitted* within its directory?*@parent: inode for parent directory*@child: inode for file being looked up, opened, or linked into @parent* Filesystems must call this before permitting access | 
| fscrypt_inherit_context | scrypt_inherit_context() - Sets a child context from its parent*@parent: Parent inode from which the context is inherited | 
| fscrypt_require_key | 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 | 
| fscrypt_d_revalidate | Validate dentries in encrypted directories to make sure we aren't potentially* caching stale dentries after a key has been added. | 
| 源代码转换工具 开放的插件接口 | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |