From: Al Viro Date: Sun, 30 Sep 2012 17:12:36 +0000 (-0400) Subject: new helper: current_pt_regs() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a3460a59747cfddfa7be4758e5ef08bf5d751d59;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git new helper: current_pt_regs() Normally (and that's the default) it's just task_pt_regs(current). However, if an architecture can optimize that, it can do so by making a macro of its own available from asm/ptrace.h. More importantly, some architectures have task_pt_regs() working only for traced tasks blocked on signal delivery. current_pt_regs() needs to work for *all* processes, so before those architectures start using stuff relying on current_pt_regs() they'll need a properly working variant. Signed-off-by: Al Viro --- diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index 597e4fdb97fe..07fd922d6928 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h @@ -403,6 +403,10 @@ static inline void user_single_step_siginfo(struct task_struct *tsk, #define arch_ptrace_stop(code, info) do { } while (0) #endif +#ifndef current_pt_regs +#define current_pt_regs() task_pt_regs(current) +#endif + extern int task_current_syscall(struct task_struct *target, long *callno, unsigned long args[6], unsigned int maxargs, unsigned long *sp, unsigned long *pc);