From owner-svn-src-head@freebsd.org Thu Oct 31 11:59:00 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F0D891A58E2; Thu, 31 Oct 2019 11:59:00 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 473kPc6BGTz4BLN; Thu, 31 Oct 2019 11:59:00 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B6F7D22462; Thu, 31 Oct 2019 11:59:00 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x9VBx0kA020964; Thu, 31 Oct 2019 11:59:00 GMT (envelope-from luporl@FreeBSD.org) Received: (from luporl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x9VBx0AK020963; Thu, 31 Oct 2019 11:59:00 GMT (envelope-from luporl@FreeBSD.org) Message-Id: <201910311159.x9VBx0AK020963@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luporl set sender to luporl@FreeBSD.org using -f From: Leandro Lupori Date: Thu, 31 Oct 2019 11:59:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r354213 - head/sys/powerpc/aim X-SVN-Group: head X-SVN-Commit-Author: luporl X-SVN-Commit-Paths: head/sys/powerpc/aim X-SVN-Commit-Revision: 354213 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Oct 2019 11:59:01 -0000 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)