From owner-freebsd-ppc@freebsd.org Wed Feb 21 15:56:32 2018 Return-Path: Delivered-To: freebsd-ppc@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD83BF0FE35 for ; Wed, 21 Feb 2018 15:56:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 09C7682EC4 for ; Wed, 21 Feb 2018 15:56:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 428696084 for ; Wed, 21 Feb 2018 15:56:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w1LFuVXj031574 for ; Wed, 21 Feb 2018 15:56:31 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w1LFuVaI031573 for freebsd-ppc@FreeBSD.org; Wed, 21 Feb 2018 15:56:31 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: freebsd-ppc@FreeBSD.org Subject: [Bug 225321] dtrace/powerpc64: System crash Date: Wed, 21 Feb 2018 15:56:31 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: breno.leitao@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-ppc@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Feb 2018 15:56:32 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D225321 --- Comment #4 from Breno Leitao --- Hi, I created a patch that I think it makes sense. I think that the problem we are not using the temporary stack properly, sin= ce it is defined on the bottom of the stack, as showed: #define TMPSTKSZ 16384 /* 16K temporary stack */ GLOBAL(tmpstk) .space TMPSTKSZ TOC_ENTRY(tmpstk) So, the tmpstk is pointing to the bottom of the stack (higher address) in t= he TOC. Later, in the dbtrap: section, we get tmpstk and increase TMPSTKSZ, which is going to get in a different area. If the above is correct, we have two solutions: 1) Move the TOC_ENTRY to the TOP of the stack, something as (not validated): #define TMPSTKSZ 16384 /* 16K temporary stack */ GLOBAL(tmpstk) TOC_ENTRY(tmpstk) .space TMPSTKSZ 2) Does not increment the tmpstk pointer, since we are on the bottom of the stack already: index 7ef41d90ffe..2307ec4307c 100644 --- a/sys/powerpc/aim/trap_subr64.S +++ b/sys/powerpc/aim/trap_subr64.S @@ -805,9 +805,9 @@ dbtrap: andi. %r1,%r1,0xff00 mtsprg3 %r1 ld %r1,TRAP_TOCBASE(0) /* get new SP */ ld %r1,TOC_REF(tmpstk)(%r1) - addi %r1,%r1,(TMPSTKSZ-48) + addi %r1,%r1,-48 Does it make any sense? --=20 You are receiving this mail because: You are the assignee for the bug.=