diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2022-01-27 20:17:32 +0300 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2022-03-10 22:31:01 +0300 |
commit | 19397e8b546d20226153dafe5dce34c4393752c4 (patch) | |
tree | fc2e6cde6dceecf595b8d5941ad2517d1c79aa7a /include/linux/tracehook.h | |
parent | e783362eb54cd99b2cac8b3a9aeac942e6f6ac07 (diff) | |
download | linux-19397e8b546d20226153dafe5dce34c4393752c4.tar.xz |
ptrace: Move ptrace_report_syscall into ptrace.h
Move ptrace_report_syscall from tracehook.h into ptrace.h where it
belongs.
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lkml.kernel.org/r/20220309162454.123006-1-ebiederm@xmission.com
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'include/linux/tracehook.h')
-rw-r--r-- | include/linux/tracehook.h | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h index 88c007ab5ebc..998bc3863559 100644 --- a/include/linux/tracehook.h +++ b/include/linux/tracehook.h @@ -51,32 +51,6 @@ #include <linux/blk-cgroup.h> struct linux_binprm; -/* - * ptrace report for syscall entry and exit looks identical. - */ -static inline int ptrace_report_syscall(unsigned long message) -{ - int ptrace = current->ptrace; - - if (!(ptrace & PT_PTRACED)) - return 0; - - current->ptrace_message = message; - ptrace_notify(SIGTRAP | ((ptrace & PT_TRACESYSGOOD) ? 0x80 : 0)); - - /* - * this isn't the same as continuing with a signal, but it will do - * for normal use. strace only continues with a signal if the - * stopping signal is not SIGTRAP. -brl - */ - if (current->exit_code) { - send_sig(current->exit_code, current, 1); - current->exit_code = 0; - } - - current->ptrace_message = 0; - return fatal_signal_pending(current); -} /** * tracehook_report_syscall_entry - task is about to attempt a system call |