Function report |
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 activity | Download SCCT | Chinese |
Name:defers execution because cmdline access can sleep
Proto:static void report_access(const char *access, struct task_struct *target, struct task_struct *agent)
Type:void
Parameter:
| Type | Parameter | Name |
|---|---|---|
| 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 | If flags & I am a kernel thread Then |
| 86 | pr_notice_ratelimited("ptrace %s of \"%s\"[%d] was attempted by \"%s\"[%d]\n", access, * executable name, excluding path. * - normally initialized setup_new_exec() * - access it with [gs]et_task_comm() * - lock it with task_lock(), process id, get_task_comm(agent_comm, agent), process id) |
| 90 | Return |
| 93 | info = Allocation memory |
| 94 | If Not info Then Return |
| 96 | init_task_work( & work, __report_access) |
| 98 | get_task_struct(agent) |
| 105 | WARN(1, "report_access called from exiting task") |
| 106 | put_task_struct(target) |
| 107 | put_task_struct(agent) |
| Name | Describe |
|---|---|
| yama_ptrace_access_check | yama_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_traceme | yama_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. |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |