瀏覽代碼

powerpc: Clear MSR_RI during RTAS calls

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>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Anton Blanchard 15 年之前
父節點
當前提交
44c9f3cc1a
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      arch/powerpc/kernel/entry_64.S

+ 1 - 2
arch/powerpc/kernel/entry_64.S

@@ -791,9 +791,8 @@ _GLOBAL(enter_rtas)
 	
 	
         li      r9,1
         li      r9,1
         rldicr  r9,r9,MSR_SF_LG,(63-MSR_SF_LG)
         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
 	andc	r6,r0,r9
-	ori	r6,r6,MSR_RI
 	sync				/* disable interrupts so SRR0/1 */
 	sync				/* disable interrupts so SRR0/1 */
 	mtmsrd	r0			/* don't get trashed */
 	mtmsrd	r0			/* don't get trashed */