Author: jhibbits
Date: Fri Mar  8 04:20:33 2019
New Revision: 344916
URL: https://svnweb.freebsd.org/changeset/base/344916

Log:
  powerpc64: Fix early exit with invalid kernel SLB entries
  
  The check for early exit should be checking the SLB entry itself.  As
  currently written it was checking the address of the SLB, which is always
  non-zero, so would go through the kernel SR restore loop regardless.
  
  Submitted by: mmacy
  MFC after:    2 weeks

Modified:
  head/sys/powerpc/aim/trap_subr64.S

Modified: head/sys/powerpc/aim/trap_subr64.S
==============================================================================
--- head/sys/powerpc/aim/trap_subr64.S  Fri Mar  8 03:59:53 2019        
(r344915)
+++ head/sys/powerpc/aim/trap_subr64.S  Fri Mar  8 04:20:33 2019        
(r344916)
@@ -89,7 +89,7 @@ restore_kernsrs:
        GET_CPUINFO(%r28)
        addi    %r28,%r28,PC_KERNSLB
        ld      %r29,16(%r28)           /* One past USER_SLB_SLOT */
-       cmpdi   %r28,0
+       cmpdi   %r29,0
        beqlr                           /* If first kernel entry is invalid,
                                         * SLBs not in use, so exit early */
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to