Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:yama_ptracer_add - add/replace an exception for this tracer/tracee pair*@tracer: the task_struct of the process doing the ptrace*@tracee: the task_struct of the process to be ptraced* Each tracee can have, at most, one tracer registered. Each time this

Proto:static int yama_ptracer_add(struct task_struct *tracer, struct task_struct *tracee)

Type:int

Parameter:

TypeParameterName
struct task_struct *tracer
struct task_struct *tracee
146  added = Allocation memory
147  If Not added Then Return -ENOMEM
150  tracee = tracee
151  tracer = tracer
152  invalid = false
154  spin_lock( & ptracer_relations_lock)
155  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
157  If invalid Then Continue
159  If tracee == tracee Then
160  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.
161  kfree_rcu() - kfree an object after a grace period(relation, rcu)
162  Go to out
166  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
168  out :
169  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
170  spin_unlock( & ptracer_relations_lock)
171  Return 0
Caller
NameDescribe
yama_task_prctlyama_task_prctl - check for Yama-specific prctl operations*@option: operation*@arg2: argument*@arg3: argument*@arg4: argument*@arg5: argument* Return 0 on success, -ve on error. -ENOSYS is returned when Yama* does not handle the given option.