Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\yama\yama_lsm.c Create Date:2022-07-28 19:55:12
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

Proto:static int yama_ptrace_access_check(struct task_struct *child, unsigned int mode)

Type:int

Parameter:

TypeParameterName
struct task_struct *child
unsigned intmode
357  rc = 0
360  If mode & PTRACE_MODE_ATTACH Then
364  Break
374  Break
380  Break
381  Case ptrace_scope == YAMA_SCOPE_NO_ATTACH
382  Default
383  rc = -EPERM
384  Break
388  If rc && (mode & PTRACE_MODE_NOAUDIT) == 0 Then defers execution because cmdline access can sleep
391  Return rc