Date: Tue, 3 Apr 2018 21:22:43 +0000 (UTC) From: Oleksandr Tymoshenko <gonzo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331952 - stable/11/sys/cddl/dev/fbt/arm Message-ID: <201804032122.w33LMhOD037638@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: gonzo Date: Tue Apr 3 21:22:43 2018 New Revision: 331952 URL: https://svnweb.freebsd.org/changeset/base/331952 Log: MFC r312378 by andrew: Use the kernel stack in the ARM FBT DTrace provider. This is used to find the fifth argument to functions being traced, however there was an error where the userspace stack was being used. This may be invalid leading to a kernel panic if this address is unmapped. Submitted by: Graeme Jenkinson <graeme.jenkinson@cl.cam.ac.uk> Differential Revision: https://reviews.freebsd.org/D9229 MFC commit fields PR: 211389 Modified: stable/11/sys/cddl/dev/fbt/arm/fbt_isa.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/dev/fbt/arm/fbt_isa.c ============================================================================== --- stable/11/sys/cddl/dev/fbt/arm/fbt_isa.c Tue Apr 3 21:17:19 2018 (r331951) +++ stable/11/sys/cddl/dev/fbt/arm/fbt_isa.c Tue Apr 3 21:22:43 2018 (r331952) @@ -61,7 +61,7 @@ fbt_invop(uintptr_t addr, struct trapframe *frame, uin /* Get 5th parameter from stack */ DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT); - fifthparam = *(register_t *)frame->tf_usr_sp; + fifthparam = *(register_t *)frame->tf_svc_sp; DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT | CPU_DTRACE_BADADDR); dtrace_probe(fbt->fbtp_id, frame->tf_r0,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201804032122.w33LMhOD037638>