函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\yama\yama_lsm.c Create Date:2022-07-27 21:49:34
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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.

函数原型:static int yama_ptrace_traceme(struct task_struct *parent)

返回类型:int

参数:

类型参数名称
struct task_struct *parent
402  rc等于0
406  :ptrace_scope恒等于YAMA_SCOPE_CAPABILITY
407  如果非has_ns_capability(parent, current_user_ns(), Allow ptrace() of any process )则rc等于负EPERM
409  退出
410  :ptrace_scope恒等于YAMA_SCOPE_NO_ATTACH
411  rc等于负EPERM
412  退出
415  如果rc
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(当前进程)
421  返回:rc