Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\apparmor\policy.c Create Date:2022-07-28 19:52:01
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__replace_profile - replace @old with @new on a list*@old: profile to be replaced (NOT NULL)*@new: profile to replace @old with (NOT NULL)*@share_proxy: transfer @old->proxy to @new* Will duplicate and refcount elements that @new inherits from @old

Proto:static void __replace_profile(struct aa_profile *old, struct aa_profile *new)

Type:void

Parameter:

TypeParameterName
struct aa_profile *old
struct aa_profile *new
744  If Not list_empty - tests whether a list is empty*@head: the list to test. Then
745  LIST_HEAD(lh)
746  list_splice_init_rcu - splice an RCU-protected list into an existing list,* designed for stacks.*@list: the RCU-protected list to splice*@head: the place in the existing list to splice the first list into
751  list_del_init - deletes entry from list and reinitialize it.*@entry: the element to delete from the list.
752  p = __find_child - find a profile on @head list with a name matching @name*@head: list to search (NOT NULL)*@name: name of profile (NOT NULL)* Requires: rcu_read_lock be held* Returns: unrefcounted profile ptr, or NULL if not found
753  If p Then
756  Continue
762  p = aa_deref_parent(child)
763  cu_assign_pointer() - assign to RCU-protected pointer*@p: pointer to assign to*@v: value to assign (publish)* Assigns the specified value to the specified RCU-protected* pointer, ensuring that any concurrent RCU readers will see* any prior initialization(parent, aa_get_profile - increment refcount on profile @p*@p: profile (MAYBE NULL)* Returns: pointer to @p if @p is NULL will return NULL* Requires: @p must be held with valid refcount when called)
764  list_add_rcu - add a new entry to rcu-protected list*@new: new entry to be added*@head: list head to add it after* Insert a new entry after the specified head
765  aa_put_profile - decrement refcount on profile @p*@p: profile (MAYBE NULL)
769  If Not cu_access_pointer() - fetch RCU pointer with no dereferencing*@p: The pointer to read* Return the value of the specified RCU-protected pointer, but omit the* lockdep checks for being in an RCU read-side critical section(parent) Then
770  parent = aa_deref_parent(old)
771  cu_assign_pointer() - assign to RCU-protected pointer*@p: pointer to assign to*@v: value to assign (publish)* Assigns the specified value to the specified RCU-protected* pointer, ensuring that any concurrent RCU readers will see* any prior initialization(parent, aa_get_profile - increment refcount on profile @p*@p: profile (MAYBE NULL)* Returns: pointer to @p if @p is NULL will return NULL* Requires: @p must be held with valid refcount when called)
773  aa_label_replace - replace a label @old with a new version @new*@old: label to replace*@new: label replacing @old* Returns: true if @old was in tree and replaced* else @old was not in tree, and @new was not inserted
775  Requires: @old->ns->lock held
777  If list_empty - tests whether a list is empty*@head: the list to test. Then
779  list_replace_rcu - replace old entry by new one*@old : the element to be replaced*@new : the new element to insert* The @old entry will be replaced with the @new entry atomically.* Note: @old should not be empty.
780  aa_get_profile - increment refcount on profile @p*@p: profile (MAYBE NULL)* Returns: pointer to @p if @p is NULL will return NULL* Requires: @p must be held with valid refcount when called
781  aa_put_profile - decrement refcount on profile @p*@p: profile (MAYBE NULL)
782  Else __list_remove_profile - remove a profile from the list it is on*@profile: the profile to remove (NOT NULL)* remove a profile from the list, warning generally removal should* be done with __replace_profile as most profile removals are
Caller
NameDescribe
__replace_profile__replace_profile - replace @old with @new on a list*@old: profile to be replaced (NOT NULL)*@new: profile to replace @old with (NOT NULL)*@share_proxy: transfer @old->proxy to @new* Will duplicate and refcount elements that @new inherits from @old
aa_replace_profilesaa_replace_profiles - replace profile(s) on the profile list*@policy_ns: namespace load is occurring on*@label: label that is attempting to load/replace policy*@mask: permission mask*@udata: serialized data stream (NOT NULL)* unpack and replace a profile