From owner-svn-src-all@FreeBSD.ORG Mon Jun 4 16:25:48 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8BC2F1065677 for ; Mon, 4 Jun 2012 16:25:48 +0000 (UTC) (envelope-from pfg@freebsd.org) Received: from nm25.bullet.mail.sp2.yahoo.com (nm25.bullet.mail.sp2.yahoo.com [98.139.91.95]) by mx1.freebsd.org (Postfix) with SMTP id 2862E8FC15 for ; Mon, 4 Jun 2012 16:25:48 +0000 (UTC) Received: from [98.139.91.69] by nm25.bullet.mail.sp2.yahoo.com with NNFMP; 04 Jun 2012 16:25:42 -0000 Received: from [208.71.42.201] by tm9.bullet.mail.sp2.yahoo.com with NNFMP; 04 Jun 2012 16:25:42 -0000 Received: from [127.0.0.1] by smtp212.mail.gq1.yahoo.com with NNFMP; 04 Jun 2012 16:25:41 -0000 X-Yahoo-Newman-Id: 957978.77072.bm@smtp212.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: .FI5k8EVM1mXDSYyLEF.6GebxAj2PsydTfuwAaL5vJZbe1M BCIlKakYl3RCh1gqW6ywap5dUh6v9RfqugdQnp2LCmHjCDk1NJyu73cSLL9j kGnQCdJ5TjPFHm9Q5iMSiYdvscqojhH0KLj1B2B0NCrtJ9zryLfyMcr1eXe3 bQFPobmN0Zhsrsr6IOoa7SgZQfOn1Gr00whkztlDr1wFAGu5GGS3bMjlstGV GGQ5Zu6ySF8owWC3OH.yY2iFdg0pEVZC8_JN2QRDJehUoZaOADS_lam1SVhe 3yfexEC3ICeCMuARlyNQ33fFwkhMD1oZ1NgD99o3ctPzwMmLhqxiU4OnCQpp Wmcb1m_ro4yEv4NeKk.VvqOFG0.5Mrd0VelvkKBKZwBF.hZ8GVdeW0gZUspb zwAQ4rpLpJREqDiREz30De5CySgMmj08yxphVDWZVuL3_HzXO2G41ExSeaom kz0fBvDPgLJcpuP6YOVv1yDjwFcF47XcfyWpqzoZc860qlaoP3Mzm5ck.rhD .cH4YDjsvy6uSavfFuQfe3VGxGdijC03a.O296Eg14XQ43JEMPThJ4yMdhVK uyt1w8fX_S3oHu6Qtmg-- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Received: from [192.168.10.102] (pfg@200.118.157.7 with plain) by smtp212.mail.gq1.yahoo.com with SMTP; 04 Jun 2012 09:25:41 -0700 PDT Message-ID: <4FCCE183.4060002@FreeBSD.org> Date: Mon, 04 Jun 2012 11:25:39 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120506 Thunderbird/12.0.1 MIME-Version: 1.0 To: "George V. Neville-Neil" References: <201206041615.q54GFeI6051783@svn.freebsd.org> In-Reply-To: <201206041615.q54GFeI6051783@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r236567 - in head/sys/cddl/dev/dtrace: amd64 i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jun 2012 16:25:48 -0000 On 06/04/12 11:15, George V. Neville-Neil wrote: > Author: gnn > Date: Mon Jun 4 16:15:40 2012 > New Revision: 236567 > URL: http://svn.freebsd.org/changeset/base/236567 > > Log: > Integrate a fix for a very odd signal delivery problem found > by Bryan Cantril and others in the Solaris/Illumos version of DTrace. > > Obtained from: https://www.illumos.org/issues/789 > MFC after: 2 weeks And it looks like kern/164724 :) cheers, Pedro. > Modified: > head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c > head/sys/cddl/dev/dtrace/i386/dtrace_subr.c > > Modified: head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c > ============================================================================== > --- head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c Mon Jun 4 16:04:01 2012 (r236566) > +++ head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c Mon Jun 4 16:15:40 2012 (r236567) > @@ -27,6 +27,10 @@ > * Use is subject to license terms. > */ > > +/* > + * Copyright (c) 2011, Joyent, Inc. All rights reserved. > + */ > + > #include > #include > #include > @@ -297,14 +301,15 @@ dtrace_safe_defer_signal(void) > } > > /* > - * If we've executed the original instruction, but haven't performed > - * the jmp back to t->t_dtrace_npc or the clean up of any registers > - * used to emulate %rip-relative instructions in 64-bit mode, do that > - * here and take the signal right away. We detect this condition by > - * seeing if the program counter is the range [scrpc + isz, astpc). > + * If we have executed the original instruction, but we have performed > + * neither the jmp back to t->t_dtrace_npc nor the clean up of any > + * registers used to emulate %rip-relative instructions in 64-bit mode, > + * we'll save ourselves some effort by doing that here and taking the > + * signal right away. We detect this condition by seeing if the program > + * counter is the range [scrpc + isz, astpc). > */ > - if (t->t_dtrace_astpc - rp->r_pc< > - t->t_dtrace_astpc - t->t_dtrace_scrpc - isz) { > + if (rp->r_pc>= t->t_dtrace_scrpc + isz&& > + rp->r_pc< t->t_dtrace_astpc) { > #ifdef __amd64 > /* > * If there is a scratch register and we're on the > > Modified: head/sys/cddl/dev/dtrace/i386/dtrace_subr.c > ============================================================================== > --- head/sys/cddl/dev/dtrace/i386/dtrace_subr.c Mon Jun 4 16:04:01 2012 (r236566) > +++ head/sys/cddl/dev/dtrace/i386/dtrace_subr.c Mon Jun 4 16:15:40 2012 (r236567) > @@ -27,6 +27,10 @@ > * Use is subject to license terms. > */ > > +/* > + * Copyright (c) 2011, Joyent, Inc. All rights reserved. > + */ > + > #include > #include > #include > @@ -298,14 +302,15 @@ dtrace_safe_defer_signal(void) > } > > /* > - * If we've executed the original instruction, but haven't performed > - * the jmp back to t->t_dtrace_npc or the clean up of any registers > - * used to emulate %rip-relative instructions in 64-bit mode, do that > - * here and take the signal right away. We detect this condition by > - * seeing if the program counter is the range [scrpc + isz, astpc). > + * If we have executed the original instruction, but we have performed > + * neither the jmp back to t->t_dtrace_npc nor the clean up of any > + * registers used to emulate %rip-relative instructions in 64-bit mode, > + * we'll save ourselves some effort by doing that here and taking the > + * signal right away. We detect this condition by seeing if the program > + * counter is the range [scrpc + isz, astpc). > */ > - if (t->t_dtrace_astpc - rp->r_pc< > - t->t_dtrace_astpc - t->t_dtrace_scrpc - isz) { > + if (rp->r_pc>= t->t_dtrace_scrpc + isz&& > + rp->r_pc< t->t_dtrace_astpc) { > #ifdef __amd64 > /* > * If there is a scratch register and we're on the