Function report |
Source Code:fs\crypto\crypto.c |
Create Date:2022-07-28 20:23:31 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Encrypt or decrypt a single filesystem block of file contents
Proto:int fscrypt_crypt_block(const struct inode *inode, fscrypt_direction_t rw, u64 lblk_num, struct page *src_page, struct page *dest_page, unsigned int len, unsigned int offs, gfp_t gfp_flags)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
const struct inode * | inode | |
fscrypt_direction_t | rw | |
u64 | lblk_num | |
struct page * | src_page | |
struct page * | dest_page | |
unsigned int | len | |
unsigned int | offs | |
gfp_t | gfp_flags |
96 | struct skcipher_request * req = NULL |
99 | ci = i_crypt_info |
101 | res = 0 |
103 | If WARN_ON_ONCE(len <= 0) Then Return -EINVAL |
105 | If WARN_ON_ONCE(len % ld names; don't add anything new here! != 0) Then Return -EINVAL |
108 | fscrypt_generate_iv( & iv, lblk_num, ci) |
110 | req = skcipher_request_alloc() - allocate request data structure*@tfm: cipher handle to be registered with the request*@gfp: memory allocation flag that is handed to kmalloc by the API call |
128 | If res Then |
129 | fscrypt_err(inode, "%scryption failed for block %llu: %d", (rw == FS_DECRYPT ? "De" : "En"), lblk_num, res) |
131 | Return res |
133 | Return 0 |
Name | Describe |
---|---|
fscrypt_encrypt_pagecache_blocks | scrypt_encrypt_pagecache_blocks() - Encrypt filesystem blocks from a pagecache page*@page: The locked pagecache page containing the block(s) to encrypt*@len: Total size of the block(s) to encrypt. Must be a nonzero* multiple of the filesystem's block size. |
fscrypt_encrypt_block_inplace | scrypt_encrypt_block_inplace() - Encrypt a filesystem block in-place*@inode: The inode to which this block belongs*@page: The page containing the block to encrypt*@len: Size of block to encrypt. Doesn't need to be a multiple of the |
fscrypt_decrypt_pagecache_blocks | scrypt_decrypt_pagecache_blocks() - Decrypt filesystem blocks in a pagecache page*@page: The locked pagecache page containing the block(s) to decrypt*@len: Total size of the block(s) to decrypt. Must be a nonzero* multiple of the filesystem's block size. |
fscrypt_decrypt_block_inplace | scrypt_decrypt_block_inplace() - Decrypt a filesystem block in-place*@inode: The inode to which this block belongs*@page: The page containing the block to decrypt*@len: Size of block to decrypt. Doesn't need to be a multiple of the |
fscrypt_zeroout_range |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |