| Function report | 
| Source Code: fs\crypto\keyring.c | Create Date:2022-07-28 20:23:53 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:Allocate a new fscrypt_master_key which contains the given secret, set it as* the payload of a new 'struct key' of type fscrypt, and link the 'struct key'* into the given keyring. Synchronized by fscrypt_add_key_mutex.
Proto:static int add_new_master_key(struct fscrypt_master_key_secret *secret, const struct fscrypt_key_specifier *mk_spec, struct key *keyring)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct fscrypt_master_key_secret * | secret | |
| const struct fscrypt_key_specifier * | mk_spec | |
| struct key * | keyring | 
| 332 | mk = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). | 
| 336 | For v1 policy keys: an arbitrary key descriptor which was assigned by* userspace (->descriptor).* For v2 policy keys: a cryptographic hash of this key (->identifier). = mk_spec | 
| 339 | init_rwsem( & mk_secret_sem) | 
| 347 | If err Then Go to out_free_mk | 
| 350 | If err Then Go to out_free_mk | 
| 366 | Go to out_free_mk | 
| 370 | If err Then Go to out_free_mk | 
| 373 | Return 0 | 
| 375 | out_free_mk : | 
| 376 | free_master_key(mk) | 
| 377 | Return err | 
| Name | Describe | 
|---|---|
| add_master_key | 
| 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 |