aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
authorPetr Tesarik <ptesarik@suse.cz>2008-02-11 16:42:00 -0500
committerTony Luck <tony.luck@intel.com>2008-03-05 18:47:53 -0500
commit08b23d74e07ac053fe4a5d6f4a48e8048fcfe52b (patch)
tree0e758c5d215d7b5865617e542510d33c7e27bc7b /arch/ia64
parent972559a05222c1d7ebd5dcde637542713bb8778d (diff)
[IA64] do not sync RBS when changing PT_AR_BSP or PT_CFM
Syncing is no longer needed, because user RBS is already up-to-date. Actually, if a debugger modified the contents of the original RBS prior to changing PT_AR_BSP, the modifications would get overwritten. Signed-off-by: Petr Tesarik <ptesarik@suse.cz> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/kernel/ptrace.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c
index 9d2591423eb7..54b7ea551559 100644
--- a/arch/ia64/kernel/ptrace.c
+++ b/arch/ia64/kernel/ptrace.c
@@ -1011,14 +1011,9 @@ access_uarea (struct task_struct *child, unsigned long addr,
1011 * the kernel was entered. 1011 * the kernel was entered.
1012 * 1012 *
1013 * Furthermore, when changing the contents of 1013 * Furthermore, when changing the contents of
1014 * PT_AR_BSP (or PT_CFM) we MUST copy any 1014 * PT_AR_BSP (or PT_CFM) while the task is
1015 * users-level stacked registers that are 1015 * blocked in a system call, convert the state
1016 * stored on the kernel stack back to 1016 * so that the non-system-call exit
1017 * user-space because otherwise, we might end
1018 * up clobbering kernel stacked registers.
1019 * Also, if this happens while the task is
1020 * blocked in a system call, which convert the
1021 * state such that the non-system-call exit
1022 * path is used. This ensures that the proper 1017 * path is used. This ensures that the proper
1023 * state will be picked up when resuming 1018 * state will be picked up when resuming
1024 * execution. However, it *also* means that 1019 * execution. However, it *also* means that
@@ -1035,10 +1030,6 @@ access_uarea (struct task_struct *child, unsigned long addr,
1035 urbs_end = ia64_get_user_rbs_end(child, pt, &cfm); 1030 urbs_end = ia64_get_user_rbs_end(child, pt, &cfm);
1036 if (write_access) { 1031 if (write_access) {
1037 if (*data != urbs_end) { 1032 if (*data != urbs_end) {
1038 if (ia64_sync_user_rbs(child, sw,
1039 pt->ar_bspstore,
1040 urbs_end) < 0)
1041 return -1;
1042 if (in_syscall(pt)) 1033 if (in_syscall(pt))
1043 convert_to_non_syscall(child, 1034 convert_to_non_syscall(child,
1044 pt, 1035 pt,
@@ -1058,10 +1049,6 @@ access_uarea (struct task_struct *child, unsigned long addr,
1058 urbs_end = ia64_get_user_rbs_end(child, pt, &cfm); 1049 urbs_end = ia64_get_user_rbs_end(child, pt, &cfm);
1059 if (write_access) { 1050 if (write_access) {
1060 if (((cfm ^ *data) & PFM_MASK) != 0) { 1051 if (((cfm ^ *data) & PFM_MASK) != 0) {
1061 if (ia64_sync_user_rbs(child, sw,
1062 pt->ar_bspstore,
1063 urbs_end) < 0)
1064 return -1;
1065 if (in_syscall(pt)) 1052 if (in_syscall(pt))
1066 convert_to_non_syscall(child, 1053 convert_to_non_syscall(child,
1067 pt, 1054 pt,