aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ia64/thread_info.h
diff options
context:
space:
mode:
authorPetr Tesarik <ptesarik@suse.cz>2007-12-12 09:23:34 -0500
committerTony Luck <tony.luck@intel.com>2008-02-08 15:01:18 -0500
commit3b2ce0b17824c42bc2e46f7dd903b4acf5e9fff9 (patch)
treeacf3913f8c0a479615060ffed4cec9283047761c /include/asm-ia64/thread_info.h
parent5aa92ffda1b6244b4a248df0b95c07d183ab96d2 (diff)
[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/thread_info.h')
-rw-r--r--include/asm-ia64/thread_info.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/asm-ia64/thread_info.h b/include/asm-ia64/thread_info.h
index 5a2c47957069..93d83cbe0c8c 100644
--- a/include/asm-ia64/thread_info.h
+++ b/include/asm-ia64/thread_info.h
@@ -94,6 +94,7 @@ extern void tsk_clear_notify_resume(struct task_struct *tsk);
94#define TIF_MCA_INIT 18 /* this task is processing MCA or INIT */ 94#define TIF_MCA_INIT 18 /* this task is processing MCA or INIT */
95#define TIF_DB_DISABLED 19 /* debug trap disabled for fsyscall */ 95#define TIF_DB_DISABLED 19 /* debug trap disabled for fsyscall */
96#define TIF_FREEZE 20 /* is freezing for suspend */ 96#define TIF_FREEZE 20 /* is freezing for suspend */
97#define TIF_RESTORE_RSE 21 /* user RBS is newer than kernel RBS */
97 98
98#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) 99#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
99#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) 100#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
@@ -107,6 +108,7 @@ extern void tsk_clear_notify_resume(struct task_struct *tsk);
107#define _TIF_MCA_INIT (1 << TIF_MCA_INIT) 108#define _TIF_MCA_INIT (1 << TIF_MCA_INIT)
108#define _TIF_DB_DISABLED (1 << TIF_DB_DISABLED) 109#define _TIF_DB_DISABLED (1 << TIF_DB_DISABLED)
109#define _TIF_FREEZE (1 << TIF_FREEZE) 110#define _TIF_FREEZE (1 << TIF_FREEZE)
111#define _TIF_RESTORE_RSE (1 << TIF_RESTORE_RSE)
110 112
111/* "work to do on user-return" bits */ 113/* "work to do on user-return" bits */
112#define TIF_ALLWORK_MASK (_TIF_SIGPENDING|_TIF_NOTIFY_RESUME|_TIF_SYSCALL_AUDIT|\ 114#define TIF_ALLWORK_MASK (_TIF_SIGPENDING|_TIF_NOTIFY_RESUME|_TIF_SYSCALL_AUDIT|\