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_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.

Proto:static int yama_ptrace_traceme(struct task_struct *parent)

Type:int

Parameter:

TypeParameterName
struct task_struct *parent
402  rc = 0
406  Case ptrace_scope == YAMA_SCOPE_CAPABILITY
407  If Not has_ns_capability(parent, current_user_ns(), Allow ptrace() of any process ) Then rc = -EPERM
409  Break
410  Case ptrace_scope == YAMA_SCOPE_NO_ATTACH
411  rc = -EPERM
412  Break
415  If rc Then
416  Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring* subscriptions and synchronises with wait4(). Also used in procfs. Also* pins the final release of task.io_context. Also protects ->cpuset and* ->cgroup.subsys[]. And ->vfork_done.
417  defers execution because cmdline access can sleep
418  task_unlock(current process)
421  Return rc