aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel/ptrace.c
diff options
context:
space:
mode:
authorTony Luck <tony.luck@intel.com>2005-06-28 11:24:49 -0400
committerTony Luck <tony.luck@intel.com>2005-06-28 11:24:49 -0400
commit54522b6613a03807f057fd567794a31267ef85cb (patch)
treeab0d9d47779769dc5d75810aaff21972958a681f /arch/ia64/kernel/ptrace.c
parent99f95e5286df2f69edab8a04c7080d986ee4233b (diff)
parentf2cbb4f01936a3e4225692e03b084b78c56d386d (diff)
Auto merge with /home/aegl/GIT/ia64-test
Diffstat (limited to 'arch/ia64/kernel/ptrace.c')
-rw-r--r--arch/ia64/kernel/ptrace.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c
index 6d57aebad485..bbb8bc7c0552 100644
--- a/arch/ia64/kernel/ptrace.c
+++ b/arch/ia64/kernel/ptrace.c
@@ -725,12 +725,32 @@ convert_to_non_syscall (struct task_struct *child, struct pt_regs *pt,
725 break; 725 break;
726 } 726 }
727 727
728 /*
729 * Note: at the time of this call, the target task is blocked
730 * in notify_resume_user() and by clearling PRED_LEAVE_SYSCALL
731 * (aka, "pLvSys") we redirect execution from
732 * .work_pending_syscall_end to .work_processed_kernel.
733 */
728 unw_get_pr(&prev_info, &pr); 734 unw_get_pr(&prev_info, &pr);
729 pr &= ~(1UL << PRED_SYSCALL); 735 pr &= ~((1UL << PRED_SYSCALL) | (1UL << PRED_LEAVE_SYSCALL));
730 pr |= (1UL << PRED_NON_SYSCALL); 736 pr |= (1UL << PRED_NON_SYSCALL);
731 unw_set_pr(&prev_info, pr); 737 unw_set_pr(&prev_info, pr);
732 738
733 pt->cr_ifs = (1UL << 63) | cfm; 739 pt->cr_ifs = (1UL << 63) | cfm;
740 /*
741 * Clear the memory that is NOT written on syscall-entry to
742 * ensure we do not leak kernel-state to user when execution
743 * resumes.
744 */
745 pt->r2 = 0;
746 pt->r3 = 0;
747 pt->r14 = 0;
748 memset(&pt->r16, 0, 16*8); /* clear r16-r31 */
749 memset(&pt->f6, 0, 6*16); /* clear f6-f11 */
750 pt->b7 = 0;
751 pt->ar_ccv = 0;
752 pt->ar_csd = 0;
753 pt->ar_ssd = 0;
734} 754}
735 755
736static int 756static int