diff options
author | Tony Luck <tony.luck@intel.com> | 2005-05-17 18:53:14 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2005-05-17 18:53:14 -0400 |
commit | 325a479c4c110db278ef3361460a48c4093252cc (patch) | |
tree | bcfbf4d0647d9442045639a5c19da59d55190e81 /arch/ia64/kernel | |
parent | ebcc80c1b6629a445f7471cc1ddb48faf8a84e70 (diff) | |
parent | 7f9eaedf894dbaa08c157832e9a6c9c03ffed1ed (diff) |
Merge with temp tree to get David's gdb inferior calls patch
Diffstat (limited to 'arch/ia64/kernel')
-rw-r--r-- | arch/ia64/kernel/entry.S | 2 | ||||
-rw-r--r-- | arch/ia64/kernel/ptrace.c | 27 | ||||
-rw-r--r-- | arch/ia64/kernel/sys_ia64.c | 14 |
3 files changed, 25 insertions, 18 deletions
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S index 4517d4ab5ef1..9353adc18956 100644 --- a/arch/ia64/kernel/entry.S +++ b/arch/ia64/kernel/entry.S | |||
@@ -1411,7 +1411,7 @@ sys_call_table: | |||
1411 | data8 sys_msgrcv | 1411 | data8 sys_msgrcv |
1412 | data8 sys_msgctl | 1412 | data8 sys_msgctl |
1413 | data8 sys_shmget | 1413 | data8 sys_shmget |
1414 | data8 ia64_shmat | 1414 | data8 sys_shmat |
1415 | data8 sys_shmdt // 1115 | 1415 | data8 sys_shmdt // 1115 |
1416 | data8 sys_shmctl | 1416 | data8 sys_shmctl |
1417 | data8 sys_syslog | 1417 | data8 sys_syslog |
diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c index 55789fcd7210..9e730c7bf0cd 100644 --- a/arch/ia64/kernel/ptrace.c +++ b/arch/ia64/kernel/ptrace.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/user.h> | 17 | #include <linux/user.h> |
18 | #include <linux/security.h> | 18 | #include <linux/security.h> |
19 | #include <linux/audit.h> | 19 | #include <linux/audit.h> |
20 | #include <linux/signal.h> | ||
20 | 21 | ||
21 | #include <asm/pgtable.h> | 22 | #include <asm/pgtable.h> |
22 | #include <asm/processor.h> | 23 | #include <asm/processor.h> |
@@ -704,12 +705,32 @@ convert_to_non_syscall (struct task_struct *child, struct pt_regs *pt, | |||
704 | break; | 705 | break; |
705 | } | 706 | } |
706 | 707 | ||
708 | /* | ||
709 | * Note: at the time of this call, the target task is blocked | ||
710 | * in notify_resume_user() and by clearling PRED_LEAVE_SYSCALL | ||
711 | * (aka, "pLvSys") we redirect execution from | ||
712 | * .work_pending_syscall_end to .work_processed_kernel. | ||
713 | */ | ||
707 | unw_get_pr(&prev_info, &pr); | 714 | unw_get_pr(&prev_info, &pr); |
708 | pr &= ~(1UL << PRED_SYSCALL); | 715 | pr &= ~((1UL << PRED_SYSCALL) | (1UL << PRED_LEAVE_SYSCALL)); |
709 | pr |= (1UL << PRED_NON_SYSCALL); | 716 | pr |= (1UL << PRED_NON_SYSCALL); |
710 | unw_set_pr(&prev_info, pr); | 717 | unw_set_pr(&prev_info, pr); |
711 | 718 | ||
712 | pt->cr_ifs = (1UL << 63) | cfm; | 719 | pt->cr_ifs = (1UL << 63) | cfm; |
720 | /* | ||
721 | * Clear the memory that is NOT written on syscall-entry to | ||
722 | * ensure we do not leak kernel-state to user when execution | ||
723 | * resumes. | ||
724 | */ | ||
725 | pt->r2 = 0; | ||
726 | pt->r3 = 0; | ||
727 | pt->r14 = 0; | ||
728 | memset(&pt->r16, 0, 16*8); /* clear r16-r31 */ | ||
729 | memset(&pt->f6, 0, 6*16); /* clear f6-f11 */ | ||
730 | pt->b7 = 0; | ||
731 | pt->ar_ccv = 0; | ||
732 | pt->ar_csd = 0; | ||
733 | pt->ar_ssd = 0; | ||
713 | } | 734 | } |
714 | 735 | ||
715 | static int | 736 | static int |
@@ -1481,7 +1502,7 @@ sys_ptrace (long request, pid_t pid, unsigned long addr, unsigned long data) | |||
1481 | case PTRACE_CONT: | 1502 | case PTRACE_CONT: |
1482 | /* restart after signal. */ | 1503 | /* restart after signal. */ |
1483 | ret = -EIO; | 1504 | ret = -EIO; |
1484 | if (data > _NSIG) | 1505 | if (!valid_signal(data)) |
1485 | goto out_tsk; | 1506 | goto out_tsk; |
1486 | if (request == PTRACE_SYSCALL) | 1507 | if (request == PTRACE_SYSCALL) |
1487 | set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | 1508 | set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); |
@@ -1520,7 +1541,7 @@ sys_ptrace (long request, pid_t pid, unsigned long addr, unsigned long data) | |||
1520 | /* let child execute for one instruction */ | 1541 | /* let child execute for one instruction */ |
1521 | case PTRACE_SINGLEBLOCK: | 1542 | case PTRACE_SINGLEBLOCK: |
1522 | ret = -EIO; | 1543 | ret = -EIO; |
1523 | if (data > _NSIG) | 1544 | if (!valid_signal(data)) |
1524 | goto out_tsk; | 1545 | goto out_tsk; |
1525 | 1546 | ||
1526 | clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | 1547 | clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); |
diff --git a/arch/ia64/kernel/sys_ia64.c b/arch/ia64/kernel/sys_ia64.c index 3ac216e1c8bb..a8cf6d8a509c 100644 --- a/arch/ia64/kernel/sys_ia64.c +++ b/arch/ia64/kernel/sys_ia64.c | |||
@@ -93,20 +93,6 @@ sys_getpagesize (void) | |||
93 | } | 93 | } |
94 | 94 | ||
95 | asmlinkage unsigned long | 95 | asmlinkage unsigned long |
96 | ia64_shmat (int shmid, void __user *shmaddr, int shmflg) | ||
97 | { | ||
98 | unsigned long raddr; | ||
99 | int retval; | ||
100 | |||
101 | retval = do_shmat(shmid, shmaddr, shmflg, &raddr); | ||
102 | if (retval < 0) | ||
103 | return retval; | ||
104 | |||
105 | force_successful_syscall_return(); | ||
106 | return raddr; | ||
107 | } | ||
108 | |||
109 | asmlinkage unsigned long | ||
110 | ia64_brk (unsigned long brk) | 96 | ia64_brk (unsigned long brk) |
111 | { | 97 | { |
112 | unsigned long rlim, retval, newbrk, oldbrk; | 98 | unsigned long rlim, retval, newbrk, oldbrk; |