Lines Matching +full:stop +full:- +full:mode

1 /* SPDX-License-Identifier: GPL-2.0 */
26 * The owner ship rules for task->ptrace which holds the ptrace
27 * flags is simple. When a task is running it owns it's task->ptrace
28 * flags. When the a task is stopped the ptracer owns task->ptrace.
50 /* single stepping state bits (used on ARM and PA-RISC) */
82 * ptrace_may_access - check whether the caller is permitted to access
85 * @mode: selects type of access and caller credentials
90 * be set in @mode to specify whether the access was requested through
95 extern bool ptrace_may_access(struct task_struct *task, unsigned int mode);
99 return !same_thread_group(child->real_parent, child->parent); in ptrace_reparented()
104 if (unlikely(child->ptrace)) in ptrace_unlink()
114 * ptrace_parent - return the task that is tracing the given task
126 if (unlikely(task->ptrace)) in ptrace_parent()
127 return rcu_dereference(task->parent); in ptrace_parent()
132 * ptrace_event_enabled - test whether a ptrace event is enabled
142 return task->ptrace & PT_EVENT_FLAG(event); in ptrace_event_enabled()
146 * ptrace_event - possibly stop for a ptrace event notification
158 current->ptrace_message = message; in ptrace_event()
162 if ((current->ptrace & (PT_PTRACED|PT_SEIZED)) == PT_PTRACED) in ptrace_event()
168 * ptrace_event_pid - possibly stop for a ptrace event notification
190 ns = task_active_pid_ns(rcu_dereference(current->parent)); in ptrace_event_pid()
199 * ptrace_init_task - initialize ptrace state for a new child
210 INIT_LIST_HEAD(&child->ptrace_entry); in ptrace_init_task()
211 INIT_LIST_HEAD(&child->ptraced); in ptrace_init_task()
212 child->jobctl = 0; in ptrace_init_task()
213 child->ptrace = 0; in ptrace_init_task()
214 child->parent = child->real_parent; in ptrace_init_task()
216 if (unlikely(ptrace) && current->ptrace) { in ptrace_init_task()
217 child->ptrace = current->ptrace; in ptrace_init_task()
218 __ptrace_link(child, current->parent, current->ptracer_cred); in ptrace_init_task()
220 if (child->ptrace & PT_SEIZED) in ptrace_init_task()
223 sigaddset(&child->pending.signal, SIGSTOP); in ptrace_init_task()
226 child->ptracer_cred = NULL; in ptrace_init_task()
230 * ptrace_release_task - final ptrace-related cleanup of a zombie being reaped
237 BUG_ON(!list_empty(&task->ptraced)); in ptrace_release_task()
239 BUG_ON(!list_empty(&task->ptrace_entry)); in ptrace_release_task()
250 * is a no-op and the spurious error condition needs to be filtered out by some
251 * other means (e.g., in user-level, by passing an extra argument to the
269 * These do-nothing inlines are used when the arch does not
270 * implement single-step. The kerneldoc comments are here
276 * arch_has_single_step - does this CPU support user-mode single-step?
281 * supports instruction single-step for user mode.
287 * user_enable_single_step - single-step in user-mode task
291 * Set @task so that when it returns to user mode, it will trap after the
301 * user_disable_single_step - cancel user-mode single-step
319 * arch_has_block_step - does this CPU support user-mode block-step?
324 * supports step-until-branch for user mode. It can be a constant or it
330 * user_enable_block_step - step until branch in user-mode task
334 * and will never be called when single-instruction stepping is being used.
335 * Set @task so that when it returns to user mode, it will trap after the
364 * arch_ptrace_stop_needed - Decide whether arch_ptrace_stop() should be called
365 * @code: current->exit_code value ptrace will stop with
366 * @info: siginfo_t pointer (or %NULL) for signal ptrace will stop with
374 * if the thread has not been back to user mode since the last stop, the
378 * may include arch-specific operations necessary prior to a ptrace stop.
385 * arch_ptrace_stop - Do machine-specific work before stopping for ptrace
386 * @code: current->exit_code value ptrace will stop with
387 * @info: siginfo_t pointer (or %NULL) for signal ptrace will stop with
391 * access. The arch can have machine-specific work to be done before
394 * we only do it when the arch requires it for this particular stop, as
406 * on *all* architectures; the only reason to have a per-arch definition