Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Oct 2019 11:59:00 +0000 (UTC)
From:      Leandro Lupori <luporl@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r354213 - head/sys/powerpc/aim
Message-ID:  <201910311159.x9VBx0AK020963@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: luporl
Date: Thu Oct 31 11:59:00 2019
New Revision: 354213
URL: https://svnweb.freebsd.org/changeset/base/354213

Log:
  [PPC64] Fix trapstk overflow
  
  In some scenarios, the 4K trapstk may overflow, corrupting tmpstk.
  
  This was observed during remote debugging, with the following steps:
  
  At remote host (R):
  - enter kdb during boot
  - switch to gdb backend
  
  At local host (L):
  - attach gdb to R
  - try to read an invalid memory position
  
  At R:
  - a DSI trap occurs and kdb restarts (all this occurs on trapstk)
  - while printing the stacktrace, trapstk overflows and corrupts tmpstk
  
  Reviewed by:	jhibbits
  Differential Revision:	https://reviews.freebsd.org/D22200

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

Modified: head/sys/powerpc/aim/locore64.S
==============================================================================
--- head/sys/powerpc/aim/locore64.S	Thu Oct 31 11:31:13 2019	(r354212)
+++ head/sys/powerpc/aim/locore64.S	Thu Oct 31 11:59:00 2019	(r354213)
@@ -66,7 +66,7 @@ TOC_ENTRY(tmpstk)
 TOC_ENTRY(can_wakeup)
 
 #ifdef KDB
-#define TRAPSTKSZ       4096            /* 4k trap stack */
+#define TRAPSTKSZ       8192            /* 8k trap stack */
 GLOBAL(trapstk)
         .space        TRAPSTKSZ
 TOC_ENTRY(trapstk)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201910311159.x9VBx0AK020963>