函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:defers execution because cmdline access can sleep

函数原型:static void report_access(const char *access, struct task_struct *target, struct task_struct *agent)

返回类型:void

参数:

类型参数名称
const char *access
struct task_struct *target
struct task_struct *agent
80  assert_spin_locked( & Protection against (de-)allocation: mm, files, fs, tty, keyrings, mems_allowed, mempolicy: )
82  如果flags按位与I am a kernel thread
86  pr_notice_ratelimited("ptrace %s of \"%s\"[%d] was attempted by \"%s\"[%d]\n", access, 是否使用FPU, 进程ID, get_task_comm(agent_comm, agent), 进程ID)
90  返回
93  info等于开辟内存
94  如果非info则返回
96  init_task_work( & work, __report_access)
97  get_task_struct(target)
98  get_task_struct(agent)
99  access等于access
100  target等于target
101  agent等于agent
102  如果ask_work_add - ask the @task to execute @work->func()*@task: the task which should run the callback*@work: the callback to run*@notify: send the notification if true* Queue @work for task_work_run() below and notify the @task if @notify.恒等于0则返回
105  WARN(1, "report_access called from exiting task")
106  put_task_struct(target)
107  put_task_struct(agent)
108  释放内存
调用者
名称描述
yama_ptrace_access_checkyama_ptrace_access_check - validate PTRACE_ATTACH calls*@child: task that current task is attempting to ptrace*@mode: ptrace attach mode* Returns 0 if following the ptrace is allowed, -ve on error.
yama_ptrace_tracemeyama_ptrace_traceme - validate PTRACE_TRACEME calls*@parent: task that will become the ptracer of the current task* Returns 0 if following the ptrace is allowed, -ve on error.