Architecture Calls Out

<asm/ptrace.h>
<asm/syscall.h>
<linux/tracehook.h>

An arch that has done all these things sets CONFIG_HAVE_ARCH_TRACEHOOK. This is required to enable the utrace code.

<asm/ptrace.h>

arch_has_single_step — does this CPU support user-mode single-step?
arch_has_block_step — does this CPU support user-mode block-step?
user_enable_single_step — single-step in user-mode task
user_enable_block_step — step until branch in user-mode task
user_disable_single_step — cancel user-mode single-step

An arch defines these in <asm/ptrace.h> if it supports hardware single-step or block-step features.

<asm/syscall.h>

An arch provides <asm/syscall.h> that defines these as inlines, or declares them as exported functions. These interfaces are described in the section called “System Call Tracing.

<linux/tracehook.h>

An arch must define TIF_NOTIFY_RESUME and TIF_SYSCALL_TRACE in its <asm/thread_info.h>. The arch code must call the following functions, all declared in <linux/tracehook.h> and described in the section called “Core Calls In”:

  • tracehook_notify_resume

  • tracehook_report_syscall_entry

  • tracehook_report_syscall_exit

  • tracehook_signal_handler