| Function report | 
| Source Code: security\apparmor\policy.c | Create Date:2022-07-28 19:52:00 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:aa_new_null_profile - create or find a null-X learning profile*@parent: profile that caused this profile to be created (NOT NULL)*@hat: true if the null- learning profile is a hat*@base: name to base the null profile off of*@gfp: type of allocation
Proto:struct aa_profile *aa_new_null_profile(struct aa_profile *parent, bool hat, const char *base, gfp_t gfp)
Type:struct aa_profile
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct aa_profile * | parent | |
| bool | hat | |
| const char * | base | |
| gfp_t | gfp | 
| 507 | char * name = NULL | 
| 511 | If base Then | 
| 512 | name = Allocation memory | 
| 514 | If name Then | 
| 521 | name = Allocation memory | 
| 522 | If Not name Then Return NULL | 
| 524 | sprintf(name, "%s//null-%x", hname, atomic_inc_return( & uniq_null)) | 
| 527 | name : | 
| 529 | bname = asename - find the last component of an hname*@name: hname to find the base profile name component of (NOT NULL)* Returns: the tail (base profile name) name component of an hname | 
| 530 | profile = aa_find_child - find a profile by @name in @parent*@parent: profile to search (NOT NULL)*@name: profile name to search for (NOT NULL)* Returns: a refcounted profile or NULL if not found | 
| 534 | profile = aa_alloc_profile - allocate, initialize and return a new profile*@hname: name of the profile (NOT NULL)*@gfp: allocation type* Returns: refcount profile or NULL on failure | 
| 540 | If hat Then flags |= profile is a hat | 
| 542 | path_flags = path_flags | 
| 547 | dfa = aa_get_dfa - increment refcount on dfa @p*@dfa: dfa (MAYBE NULL)* Returns: pointer to @dfa if @dfa is NULL will return NULL* Requires: @dfa must be held with valid refcount when called | 
| 550 | mutex_lock_nested( & lock, level) | 
| 552 | If p Then | 
| 555 | Else | 
| 561 | out : | 
| 564 | Return profile | 
| 566 | fail : | 
| 569 | Return NULL | 
| Name | Describe | 
|---|---|
| build_change_hat | helper fn for change_hat* Returns: label for hat transition OR ERR_PTR. Does NOT return NULL | 
| aa_change_profile | aa_change_profile - perform a one-way profile transition*@fqname: name of profile may include namespace (NOT NULL)*@onexec: whether this transition is to take place immediately or at exec*@flags: flags affecting change behavior | 
| profile_transition | 
| 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 |