Commit 3eb6f26b authored by Paul Mackerras's avatar Paul Mackerras

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: default avatarPaul Mackerras <paulus@samba.org>
parent 7116317d
...@@ -183,8 +183,8 @@ syscall_exit_trace_cont: ...@@ -183,8 +183,8 @@ syscall_exit_trace_cont:
ld r13,GPR13(r1) /* returning to usermode */ ld r13,GPR13(r1) /* returning to usermode */
1: ld r2,GPR2(r1) 1: ld r2,GPR2(r1)
li r12,MSR_RI li r12,MSR_RI
andc r10,r10,r12 andc r11,r10,r12
mtmsrd r10,1 /* clear MSR.RI */ mtmsrd r11,1 /* clear MSR.RI */
ld r1,GPR1(r1) ld r1,GPR1(r1)
mtlr r4 mtlr r4
mtcr r5 mtcr r5
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment