diff options
Diffstat (limited to 'arch/x86/include/asm/ptrace.h')
| -rw-r--r-- | arch/x86/include/asm/ptrace.h | 17 | 
1 files changed, 16 insertions, 1 deletions
diff --git a/arch/x86/include/asm/ptrace.h b/arch/x86/include/asm/ptrace.h index 942a08623a1..6205f0c434d 100644 --- a/arch/x86/include/asm/ptrace.h +++ b/arch/x86/include/asm/ptrace.h @@ -60,7 +60,6 @@ struct pt_regs {  #endif /* !__i386__ */ -#include <linux/init.h>  #ifdef CONFIG_PARAVIRT  #include <asm/paravirt_types.h>  #endif @@ -232,6 +231,22 @@ static inline unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs,  #define ARCH_HAS_USER_SINGLE_STEP_INFO +/* + * When hitting ptrace_stop(), we cannot return using SYSRET because + * that does not restore the full CPU state, only a minimal set.  The + * ptracer can change arbitrary register values, which is usually okay + * because the usual ptrace stops run off the signal delivery path which + * forces IRET; however, ptrace_event() stops happen in arbitrary places + * in the kernel and don't force IRET path. + * + * So force IRET path after a ptrace stop. + */ +#define arch_ptrace_stop_needed(code, info)				\ +({									\ +	set_thread_flag(TIF_NOTIFY_RESUME);				\ +	false;								\ +}) +  struct user_desc;  extern int do_get_thread_area(struct task_struct *p, int idx,  			      struct user_desc __user *info);  | 
