+/*
+ * <linux/tracehook.h> uses these accessors to avoid #ifdef CONFIG_UTRACE.
+ */
+static inline unsigned long tsk_utrace_flags(struct task_struct *tsk)
+{
+ return tsk->utrace_flags;
+}
+static inline struct utrace *tsk_utrace_struct(struct task_struct *tsk)
+{
+ return tsk->utrace;
+}
+static inline void utrace_init_task(struct task_struct *child)
+{
+ child->utrace_flags = 0;
+ child->utrace = NULL;
+}
+
+#else /* !CONFIG_UTRACE */
+
+static unsigned long tsk_utrace_flags(struct task_struct *tsk)
+{
+ return 0;
+}
+static struct utrace *tsk_utrace_struct(struct task_struct *tsk)
+{
+ return NULL;
+}
+static inline void utrace_init_task(struct task_struct *child)
+{
+}
+
+/*
+ * The calls to these should all be in if (0) and optimized out entirely.
+ * We have stubs here only so tracehook.h doesn't need to #ifdef them
+ * to avoid external references in case of unoptimized compilation.
+ */
+static inline int utrace_quiescent(struct task_struct *tsk, void *ignored)
+{
+ BUG();
+ return 0;
+}
+static inline void utrace_release_task(struct task_struct *tsk)
+{
+ BUG();
+}
+static inline int utrace_get_signal(struct task_struct *tsk,
+ struct pt_regs *regs,
+ siginfo_t *info, struct k_sigaction *ka)
+{
+ BUG();
+ return 0;
+}
+static inline void utrace_report_clone(unsigned long clone_flags,
+ struct task_struct *child)
+{
+ BUG();
+}
+static inline void utrace_report_vfork_done(pid_t child_pid)
+{
+ BUG();
+}
+static inline void utrace_report_exit(long *exit_code)
+{
+ BUG();
+}
+static inline void utrace_report_death(struct task_struct *tsk, void *ignored)
+{
+ BUG();
+}
+static inline void utrace_report_delayed_group_leader(struct task_struct *tsk)
+{
+ BUG();
+}
+static inline int utrace_report_jctl(int type)
+{
+ BUG();
+ return 0;
+}
+static inline void utrace_report_exec(struct linux_binprm *bprm,
+ struct pt_regs *regs)
+{
+ BUG();
+}
+static inline void utrace_report_syscall(struct pt_regs *regs, int is_exit)
+{
+ BUG();
+}
+static inline struct task_struct *utrace_tracer_task(struct task_struct *tsk)
+{
+ BUG();
+ return NULL;
+}
+static inline int utrace_allow_access_process_vm(struct task_struct *tsk)
+{
+ BUG();
+ return 0;
+}
+static inline int utrace_unsafe_exec(struct task_struct *tsk)
+{
+ BUG();
+ return 0;
+}
+static inline void utrace_signal_handler_singlestep(struct task_struct *tsk,
+ struct pt_regs *regs)
+{
+ BUG();
+}
+
+#endif /* CONFIG_UTRACE */