aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/tracehook.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/tracehook.h')
-rw-r--r--include/linux/tracehook.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h
index 2d1426f8e33b..8cffd34f88d5 100644
--- a/include/linux/tracehook.h
+++ b/include/linux/tracehook.h
@@ -312,4 +312,23 @@ static inline void tracehook_signal_handler(int sig, siginfo_t *info,
312 ptrace_notify(SIGTRAP); 312 ptrace_notify(SIGTRAP);
313} 313}
314 314
315/**
316 * tracehook_consider_ignored_signal - suppress short-circuit of ignored signal
317 * @task: task receiving the signal
318 * @sig: signal number being sent
319 * @handler: %SIG_IGN or %SIG_DFL
320 *
321 * Return zero iff tracing doesn't care to examine this ignored signal,
322 * so it can short-circuit normal delivery and never even get queued.
323 * Either @handler is %SIG_DFL and @sig's default is ignore, or it's %SIG_IGN.
324 *
325 * Called with @task->sighand->siglock held.
326 */
327static inline int tracehook_consider_ignored_signal(struct task_struct *task,
328 int sig,
329 void __user *handler)
330{
331 return (task_ptrace(task) & PT_PTRACED) != 0;
332}
333
315#endif /* <linux/tracehook.h> */ 334#endif /* <linux/tracehook.h> */