* [PATCH] Clear MSR_RI during RTAS calls
@ 2010-02-08 5:37 Anton Blanchard
2010-02-08 5:43 ` Anton Blanchard
0 siblings, 1 reply; 2+ messages in thread
From: Anton Blanchard @ 2010-02-08 5:37 UTC (permalink / raw)
To: benh, paulus; +Cc: linuxppc-dev
RTAS should never cause an exception but if it does (for example accessing
outside our RMO) then we might go a long way through the kernel before
oopsing. If we unset MSR_RI we should at least stop things on exception
exit.
Signed-off-by: Anton Blanchard <anton@samba.org>
---
The setting of MSR_RI during RTAS calls went in ages ago (2003), and I'm
not sure why. Clearly an exception inside RTAS is fatal since we most likely
have a bad r13.
Index: powerpc.git/arch/powerpc/kernel/entry_64.S
===================================================================
--- powerpc.git.orig/arch/powerpc/kernel/entry_64.S 2010-02-08 12:25:51.543072119 +1100
+++ powerpc.git/arch/powerpc/kernel/entry_64.S 2010-02-08 12:26:56.043513290 +1100
@@ -791,9 +791,8 @@ _GLOBAL(enter_rtas)
li r9,1
rldicr r9,r9,MSR_SF_LG,(63-MSR_SF_LG)
- ori r9,r9,MSR_IR|MSR_DR|MSR_FE0|MSR_FE1|MSR_FP
+ ori r9,r9,MSR_IR|MSR_DR|MSR_FE0|MSR_FE1|MSR_FP|MSR_RI
andc r6,r0,r9
- ori r6,r6,MSR_RI
sync /* disable interrupts so SRR0/1 */
mtmsrd r0 /* don't get trashed */
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Clear MSR_RI during RTAS calls
2010-02-08 5:37 [PATCH] Clear MSR_RI during RTAS calls Anton Blanchard
@ 2010-02-08 5:43 ` Anton Blanchard
0 siblings, 0 replies; 2+ messages in thread
From: Anton Blanchard @ 2010-02-08 5:43 UTC (permalink / raw)
To: benh, paulus; +Cc: linuxppc-dev
> The setting of MSR_RI during RTAS calls went in ages ago (2003), and I'm
> not sure why. Clearly an exception inside RTAS is fatal since we most likely
> have a bad r13.
I wrote the r13 comment without thinking :) Regardless I think we want
to catch any RTAS exception ASAP.
Anton
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-02-08 5:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-08 5:37 [PATCH] Clear MSR_RI during RTAS calls Anton Blanchard
2010-02-08 5:43 ` Anton Blanchard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).