函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\yama\yama_lsm.c Create Date:2022-07-27 21:49:08
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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

函数原型:static int yama_ptracer_add(struct task_struct *tracer, struct task_struct *tracee)

返回类型:int

参数:

类型参数名称
struct task_struct *tracer
struct task_struct *tracee
146  added等于开辟内存
147  如果非added则返回:负ENOMEM
150  tracee等于tracee
151  tracer等于tracer
152  invalid = false
154  加自旋锁
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  如果invalid则继续下一循环
159  如果tracee恒等于tracee
160  更新RCU锁项
161  kfree_rcu() - kfree an object after a grace period(relation, rcu)
162  转到:out
166  添加RCU保护项
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  自旋锁解锁
171  返回:0
调用者
名称描述
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.