函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:static int yama_task_prctl(int option, unsigned long arg2, unsigned long arg3, unsigned long arg4, unsigned long arg5)

返回类型:int

参数:

类型参数名称
intoption
unsigned longarg2
unsigned longarg3
unsigned longarg4
unsigned longarg5
224  rc等于负ENOSYS
225  myself等于当前进程
228  :option恒等于Set specific pid that is allowed to ptrace the current task.* A value of 0 mean "no process".
235  _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
236  如果非thread_group_leader(myself)则myself等于cu_dereference() - fetch RCU-protected pointer for dereferencing*@p: The pointer to read, prior to dereferencing* This is a simple wrapper around rcu_dereference_check().(线程组主管)
238  get_task_struct(myself)
239  _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()
241  如果arg2恒等于0则
243  rc等于0
244  否则如果arg2恒等于PR_SET_PTRACER_ANYarg2恒等于负1则
246  否则
250  如果非tracer
251  rc等于负EINVAL
252  否则
258  put_task_struct(myself)
259  退出
262  返回:rc