Lines Matching full:parent
26 * @parent: Parent domain.
27 * @child: Potential child of @parent.
29 * Checks if the @parent domain is less or equal to (i.e. an ancestor, which
32 static bool domain_scope_le(const struct landlock_ruleset *const parent, in domain_scope_le() argument
37 if (!parent) in domain_scope_le()
41 for (walker = child->hierarchy; walker; walker = walker->parent) { in domain_scope_le()
42 if (walker == parent->hierarchy) in domain_scope_le()
43 /* @parent is in the scoped hierarchy of @child. */ in domain_scope_le()
46 /* There is no relationship between @parent and @child. */ in domain_scope_le()
50 static bool task_is_scoped(const struct task_struct *const parent, in task_is_scoped() argument
57 dom_parent = landlock_get_task_domain(parent); in task_is_scoped()
64 static int task_ptrace(const struct task_struct *const parent, in task_ptrace() argument
68 if (!landlocked(parent)) in task_ptrace()
70 if (task_is_scoped(parent, child)) in task_ptrace()
98 * @parent: Task proposed to be the tracer.
100 * If the parent has Landlock rules, then the current task must have the same
106 static int hook_ptrace_traceme(struct task_struct *const parent) in hook_ptrace_traceme() argument
108 return task_ptrace(parent, current); in hook_ptrace_traceme()