summaryrefslogtreecommitdiffstats
path: root/include/asm-ia64/ptrace.h
diff options
context:
space:
mode:
authorPetr Tesarik <ptesarik@suse.cz>2007-12-12 15:23:34 +0100
committerTony Luck <tony.luck@intel.com>2008-02-08 21:01:18 +0100
commit3b2ce0b17824c42bc2e46f7dd903b4acf5e9fff9 (patch)
treeacf3913f8c0a479615060ffed4cec9283047761c /include/asm-ia64/ptrace.h
parent[IA64] Rename TIF_PERFMON_WORK back to TIF_NOTIFY_RESUME (diff)
downloadlinux-3b2ce0b17824c42bc2e46f7dd903b4acf5e9fff9.tar.xz
linux-3b2ce0b17824c42bc2e46f7dd903b4acf5e9fff9.zip
[IA64] Synchronize kernel RSE to user-space and back
This is base kernel patch for ptrace RSE bug. It's basically a backport from the utrace RSE patch I sent out several weeks ago. please review. when a thread is stopped (ptraced), debugger might change thread's user stack (change memory directly), and we must avoid the RSE stored in kernel to override user stack (user space's RSE is newer than kernel's in the case). To workaround the issue, we copy kernel RSE to user RSE before the task is stopped, so user RSE has updated data. we then copy user RSE to kernel after the task is resummed from traced stop and kernel will use the newer RSE to return to user. Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Petr Tesarik <ptesarik@suse.cz> CC: Roland McGrath <roland@redhat.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'include/asm-ia64/ptrace.h')
-rw-r--r--include/asm-ia64/ptrace.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/asm-ia64/ptrace.h b/include/asm-ia64/ptrace.h
index f4ef87a36236..13435f778b0c 100644
--- a/include/asm-ia64/ptrace.h
+++ b/include/asm-ia64/ptrace.h
@@ -292,6 +292,7 @@ struct switch_stack {
unsigned long, long);
extern void ia64_flush_fph (struct task_struct *);
extern void ia64_sync_fph (struct task_struct *);
+ extern void ia64_sync_krbs(void);
extern long ia64_sync_user_rbs (struct task_struct *, struct switch_stack *,
unsigned long, unsigned long);
@@ -303,6 +304,12 @@ struct switch_stack {
extern void ia64_increment_ip (struct pt_regs *pt);
extern void ia64_decrement_ip (struct pt_regs *pt);
+ extern void ia64_ptrace_stop(void);
+ #define arch_ptrace_stop(code, info) \
+ ia64_ptrace_stop()
+ #define arch_ptrace_stop_needed(code, info) \
+ (!test_thread_flag(TIF_RESTORE_RSE))
+
#endif /* !__KERNEL__ */
/* pt_all_user_regs is used for PTRACE_GETREGS PTRACE_SETREGS */