Function report |
Source Code:kernel\ptrace.c |
Create Date:2022-07-28 09:13:14 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Returns 0 on success, -errno on denial.
Proto:static int __ptrace_may_access(struct task_struct *task, unsigned int mode)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
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 | If Not (mode & PTRACE_MODE_FSCREDS) == Not (mode & PTRACE_MODE_REALCREDS) Then |
303 | If same_thread_group(task, current process) Then Return 0 |
306 | If mode & PTRACE_MODE_FSCREDS Then |
307 | caller_uid = UID for VFS ops |
308 | caller_gid = GID for VFS ops |
309 | Else |
322 | If uid_eq(caller_uid, effective UID of the task ) && uid_eq(caller_uid, saved UID of the task ) && uid_eq(caller_uid, real UID of the task ) && gid_eq(caller_gid, effective GID of the task ) && gid_eq(caller_gid, saved GID of the task ) && gid_eq(caller_gid, real GID of the task ) Then Go to ok |
329 | If ptrace_has_cap(cred, user_ns the caps and keyrings are relative to. , mode) Then Go to ok |
332 | Return -EPERM |
333 | ok : |
344 | smp_rmb() |
346 | If mm && get_dumpable(mm) != Dump as user of process && Not ptrace_has_cap(cred, user_ns, mode) Then Return -EPERM |
351 | Return security_ptrace_access_check(task, mode) |
Name | Describe |
---|---|
ptrace_may_access | |
ptrace_attach |
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 |