From owner-svn-src-stable@freebsd.org Mon Jun 4 14:16:02 2018 Return-Path: Delivered-To: svn-src-stable@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 555B3FE5EE8; Mon, 4 Jun 2018 14:16:02 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0678669022; Mon, 4 Jun 2018 14:16:02 +0000 (UTC) (envelope-from markj@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 DCC7A68EC; Mon, 4 Jun 2018 14:16:01 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w54EG1tV041519; Mon, 4 Jun 2018 14:16:01 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w54EG1cO041518; Mon, 4 Jun 2018 14:16:01 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201806041416.w54EG1cO041518@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 4 Jun 2018 14:16:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r334613 - stable/11/sys/cddl/dev/dtrace/aarch64 X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/cddl/dev/dtrace/aarch64 X-SVN-Commit-Revision: 334613 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jun 2018 14:16:02 -0000 Author: markj Date: Mon Jun 4 14:16:01 2018 New Revision: 334613 URL: https://svnweb.freebsd.org/changeset/base/334613 Log: MFC r333570: DTrace aarch64: Avoid calling unwind_frame() in the probe context. Modified: stable/11/sys/cddl/dev/dtrace/aarch64/dtrace_isa.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/dev/dtrace/aarch64/dtrace_isa.c ============================================================================== --- stable/11/sys/cddl/dev/dtrace/aarch64/dtrace_isa.c Mon Jun 4 14:15:03 2018 (r334612) +++ stable/11/sys/cddl/dev/dtrace/aarch64/dtrace_isa.c Mon Jun 4 14:16:01 2018 (r334613) @@ -70,7 +70,7 @@ dtrace_getpcstack(pc_t *pcstack, int pcstack_limit, in { struct unwind_state state; int scp_offset; - register_t sp; + register_t sp, fp; int depth; depth = 0; @@ -88,11 +88,15 @@ dtrace_getpcstack(pc_t *pcstack, int pcstack_limit, in state.pc = (uint64_t)dtrace_getpcstack; while (depth < pcstack_limit) { - if (unwind_frame(&state)) - break; - if (!INKERNEL(state.pc) || !INKERNEL(state.fp)) break; + + fp = state.fp; + state.sp = fp + 0x10; + /* FP to previous frame (X29) */ + state.fp = *(register_t *)(fp); + /* LR (X30) */ + state.pc = *(register_t *)(fp + 8) - 4; /* * NB: Unlike some other architectures, we don't need to