函数逻辑报告 |
Source Code:kernel\ptrace.c |
Create Date:2022-07-27 10:13:08 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:Returns 0 on success, -errno on denial.
函数原型:static int __ptrace_may_access(struct task_struct *task, unsigned int mode)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct task_struct * | task | |
unsigned int | mode |
283 | cred等于current_cred - Access the current task's subjective credentials* Access the subjective credentials of the current task. RCU-safe,* since nobody else can modify it.() |
288 | 如果非mode按位与PTRACE_MODE_FSCREDS的值恒等于非mode按位与PTRACE_MODE_REALCREDS的值则 |
303 | 如果same_thread_group(task, 当前进程)则返回:0 |
306 | 如果mode按位与PTRACE_MODE_FSCREDS则 |
307 | caller_uid等于 UID for VFS ops |
308 | caller_gid等于 GID for VFS ops |
309 | 否则 |
318 | caller_uid等于进程uid |
319 | caller_gid等于进程gid |
322 | 如果uid_eq(caller_uid, 有效uid)且uid_eq(caller_uid, 保留uid)且uid_eq(caller_uid, 进程uid)且gid_eq(caller_gid, 有效gid)且gid_eq(caller_gid, 保留gid)且gid_eq(caller_gid, 进程gid)则转到:ok |
332 | 返回:负EPERM |
333 | ok : |
344 | smp_rmb() |
346 | 如果mm且get_dumpable(mm)不等于Dump as user of process 且非ptrace_has_cap(cred, user_ns, mode)则返回:负EPERM |
351 | 返回:security_ptrace_access_check(task, mode) |
名称 | 描述 |
---|---|
ptrace_may_access | |
ptrace_attach |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |