| Function report | 
| Source Code: fs\crypto\keyring.c | Create Date:2022-07-28 20:23:54 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:Add a master encryption key to the filesystem, causing all files which were* encrypted with it to appear "unlocked" (decrypted) when accessed.* When adding a key for use by v1 encryption policies, this ioctl is
Proto:int fscrypt_ioctl_add_key(struct file *filp, void __user *_uarg)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct file * | filp | |
| void __user * | _uarg | 
| 500 | If copy_from_user( & arg, uarg, size of arg ) Then Return -EFAULT | 
| 503 | If Not valid_key_spec( & key_spec) Then Return -EINVAL | 
| 506 | If raw_size < FSCRYPT_MIN_KEY_SIZE || raw_size > FSCRYPT_MAX_KEY_SIZE Then Return -EINVAL | 
| 516 | If copy_from_user(For v1 policy keys: the raw key. Wiped for v2 policy keys. , raw, Size of the raw key in bytes. Set even if ->raw isn't set. ) Then Go to out_wipe_secret | 
| 532 | If err Then Go to out_wipe_secret | 
| 546 | If err Then Go to out_wipe_secret | 
| 549 | If copy_to_user(identifier, identifier, FSCRYPT_KEY_IDENTIFIER_SIZE) Then Go to out_wipe_secret | 
| 553 | Break | 
| 554 | Default | 
| 560 | err = add_master_key(sb, & secret, & key_spec) | 
| 561 | out_wipe_secret : | 
| 562 | wipe_master_key_secret( & secret) | 
| 563 | Return err | 
| 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 |