aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel/signal.c
diff options
context:
space:
mode:
authorMatthew Chapman <matthewc@hp.com>2005-06-21 19:19:20 -0400
committerTony Luck <tony.luck@intel.com>2005-06-21 19:19:20 -0400
commit4ea78729b8dbfc400fe165a57b90a394a7275a54 (patch)
treecc8d7def737ca5a4189481466d1e4164eef98313 /arch/ia64/kernel/signal.c
parent7b404b3459db1326bbdc7085edb1f58b98da5826 (diff)
[IA64] ptrace and restore_sigcontext() allow ar.rsc.pl==0
This patch fixes handling of accesses to ar.rsc via ptrace & restore_sigcontext [With Thanks to Chris Wright for noticing the restore_sigcontext path] Signed-off-by: Matthew Chapman <matthewc@hp.com> Acked-by: David Mosberger <davidm@hpl.hp.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/kernel/signal.c')
-rw-r--r--arch/ia64/kernel/signal.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/ia64/kernel/signal.c b/arch/ia64/kernel/signal.c
index 499b7e5317cf..edd9f07860b2 100644
--- a/arch/ia64/kernel/signal.c
+++ b/arch/ia64/kernel/signal.c
@@ -94,7 +94,7 @@ sys_sigaltstack (const stack_t __user *uss, stack_t __user *uoss, long arg2,
94static long 94static long
95restore_sigcontext (struct sigcontext __user *sc, struct sigscratch *scr) 95restore_sigcontext (struct sigcontext __user *sc, struct sigscratch *scr)
96{ 96{
97 unsigned long ip, flags, nat, um, cfm; 97 unsigned long ip, flags, nat, um, cfm, rsc;
98 long err; 98 long err;
99 99
100 /* Always make any pending restarted system calls return -EINTR */ 100 /* Always make any pending restarted system calls return -EINTR */
@@ -106,7 +106,7 @@ restore_sigcontext (struct sigcontext __user *sc, struct sigscratch *scr)
106 err |= __get_user(ip, &sc->sc_ip); /* instruction pointer */ 106 err |= __get_user(ip, &sc->sc_ip); /* instruction pointer */
107 err |= __get_user(cfm, &sc->sc_cfm); 107 err |= __get_user(cfm, &sc->sc_cfm);
108 err |= __get_user(um, &sc->sc_um); /* user mask */ 108 err |= __get_user(um, &sc->sc_um); /* user mask */
109 err |= __get_user(scr->pt.ar_rsc, &sc->sc_ar_rsc); 109 err |= __get_user(rsc, &sc->sc_ar_rsc);
110 err |= __get_user(scr->pt.ar_unat, &sc->sc_ar_unat); 110 err |= __get_user(scr->pt.ar_unat, &sc->sc_ar_unat);
111 err |= __get_user(scr->pt.ar_fpsr, &sc->sc_ar_fpsr); 111 err |= __get_user(scr->pt.ar_fpsr, &sc->sc_ar_fpsr);
112 err |= __get_user(scr->pt.ar_pfs, &sc->sc_ar_pfs); 112 err |= __get_user(scr->pt.ar_pfs, &sc->sc_ar_pfs);
@@ -119,6 +119,7 @@ restore_sigcontext (struct sigcontext __user *sc, struct sigscratch *scr)
119 err |= __copy_from_user(&scr->pt.r15, &sc->sc_gr[15], 8); /* r15 */ 119 err |= __copy_from_user(&scr->pt.r15, &sc->sc_gr[15], 8); /* r15 */
120 120
121 scr->pt.cr_ifs = cfm | (1UL << 63); 121 scr->pt.cr_ifs = cfm | (1UL << 63);
122 scr->pt.ar_rsc = rsc | (3 << 2); /* force PL3 */
122 123
123 /* establish new instruction pointer: */ 124 /* establish new instruction pointer: */
124 scr->pt.cr_iip = ip & ~0x3UL; 125 scr->pt.cr_iip = ip & ~0x3UL;