aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-12-19 23:38:47 -0500
committerPaul Mackerras <paulus@samba.org>2005-12-19 23:38:47 -0500
commit3eb6f26bcd0d2ce53498deda988e68d663e1c9c2 (patch)
tree2e52267600ebfe1f97cbab822143197d0a9edaa3 /arch
parent7116317dc9148d783846299fc80a7d377baa6dca (diff)
powerpc: correct register usage in 64-bit syscall exit path
Since we don't restore the volatile registers in the syscall exit path, we need to make sure we don't leak any potentially interesting values from the kernel to userspace. This was already the case for all except r11. This makes it use r11 for an MSR value, so r11 will have an (uninteresting) MSR value in it on return to userspace. Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kernel/entry_64.S4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index 2d22bf03484e..bce33a38399f 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -183,8 +183,8 @@ syscall_exit_trace_cont:
183 ld r13,GPR13(r1) /* returning to usermode */ 183 ld r13,GPR13(r1) /* returning to usermode */
1841: ld r2,GPR2(r1) 1841: ld r2,GPR2(r1)
185 li r12,MSR_RI 185 li r12,MSR_RI
186 andc r10,r10,r12 186 andc r11,r10,r12
187 mtmsrd r10,1 /* clear MSR.RI */ 187 mtmsrd r11,1 /* clear MSR.RI */
188 ld r1,GPR1(r1) 188 ld r1,GPR1(r1)
189 mtlr r4 189 mtlr r4
190 mtcr r5 190 mtcr r5