From owner-svn-src-all@FreeBSD.ORG Wed Feb 10 09:15:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 886A71065670; Wed, 10 Feb 2010 09:15:29 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id F24638FC19; Wed, 10 Feb 2010 09:15:28 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o1A9FMXx029299 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 10 Feb 2010 11:15:22 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id o1A9FMOF066212; Wed, 10 Feb 2010 11:15:22 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id o1A9FMSW066211; Wed, 10 Feb 2010 11:15:22 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 10 Feb 2010 11:15:22 +0200 From: Kostik Belousov To: Marcel Moolenaar Message-ID: <20100210091522.GW9991@deviant.kiev.zoral.com.ua> References: <201002090552.o195qZcD074581@svn.freebsd.org> <20100209095722.GQ9991@deviant.kiev.zoral.com.ua> <65DCE552-7EFD-48F2-85A4-EA0F1F0638EE@mac.com> <20100209184043.GV9991@deviant.kiev.zoral.com.ua> <896B58E6-12EA-48AB-86C2-5BA9F0C59512@mac.com> <86989446-64EF-411F-8E25-173DB6AEE10B@mac.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9+ohdFDUqiMJzwPo" Content-Disposition: inline In-Reply-To: <86989446-64EF-411F-8E25-173DB6AEE10B@mac.com> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r203696 - in head: lib/libc/sys sys/kern sys/sys 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: Wed, 10 Feb 2010 09:15:29 -0000 --9+ohdFDUqiMJzwPo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 09, 2010 at 04:11:43PM -0800, Marcel Moolenaar wrote: >=20 > On Feb 9, 2010, at 11:17 AM, Marcel Moolenaar wrote: >=20 > > Action items: > >=20 > >>>> - vmspace should be referenced by vmspace_acquire_ref() > >>>> - vm_map should be read-locked before iterating the map entries. > >=20 > > I'll implement it and send a patch for review to avoid unnecessary > > repository churn... >=20 > Please review attached patch. I have a sample session of how > a debugger can use the information (see XXX lines): >=20 > hob% /usr/obj/nfs/bsddbg/trunk/bdb/bdb images/abort/abort > [cursor=3D0x2000000000000560:0] > bdb> run > process 1539 created > process 1539 stopped with signal 5 > XXX: 1: 0x2000000000000000-0x2000000000001fff, 5, 0 37 `/nfs/bsddbg/trunk= /images/abort/abort` > XXX: 2: 0x2000000000010000-0x2000000000011fff, 3, 0 0 `` > XXX: 3: 0x2000000040010000-0x2000000040077fff, 5, 0 21 `/libexec/ld-elf.s= o.1` > XXX: 4: 0x2000000040086000-0x2000000040089fff, 3, 0x66000 21 `/libexec/ld= -elf.so.1` > XXX: 5: 0x200000004008a000-0x2000000040091fff, 3, 0 0 `` > XXX: 6: 0x8000000000000000-0x800000000001ffff, 3, 0 0 `` > XXX: 7: 0x9ffffffffffe0000-0x9fffffffffffffff, 3, 0 0 `` > 0x200000004001c560: { // MFB; > > alloc r2 =3D ar.pfs, 0x0, 0x3, 0x3, 0x0 > nop.f 0x0 > nop.b 0x0 ;; > } > [cursor=3D0x200000004001c560:0] > bdb> step > process 1575 stopped with signal 5 > 0x200000004001c560: { // MFB; > alloc r2 =3D ar.pfs, 0x0, 0x3, 0x3, 0x0 > > nop.f 0x0 > nop.b 0x0 ;; > } > [cursor=3D0x200000004001c560:1] > bdb> continue > process 1539 stopped with signal 6 > XXX: 1: 0x2000000000000000-0x2000000000001fff, 5, 0 37 `/nfs/bsddbg/trunk= /images/abort/abort` > XXX: 2: 0x2000000000010000-0x2000000000011fff, 3, 0 0 `` > XXX: 3: 0x2000000040010000-0x2000000040077fff, 5, 0 21 `/libexec/ld-elf.s= o.1` > XXX: 4: 0x200000004007e000-0x2000000040085fff, 3, 0x6000 0 `` > XXX: 5: 0x2000000040086000-0x2000000040089fff, 3, 0x66000 21 `/libexec/ld= -elf.so.1` > XXX: 6: 0x200000004008a000-0x2000000040099fff, 3, 0 0 `` > XXX: 7: 0x200000004009c000-0x20000000402e1fff, 5, 0 15 `/lib/libc.so.7` > XXX: 8: 0x20000000402e2000-0x20000000402effff, 0, 0x246000 0 `` > XXX: 9: 0x20000000402f0000-0x20000000402fdfff, 3, 0x244000 15 `/lib/libc.= so.7` > XXX: 10: 0x20000000402fe000-0x2000000040319fff, 3, 0x262000 0 `` > XXX: 11: 0x2000000040328000-0x2000000040339fff, 3, 0xe000 0 `` > XXX: 12: 0x8000000000000000-0x800000000001ffff, 3, 0 0 `` > XXX: 13: 0x9ffffffffffe0000-0x9fffffffffffffff, 3, 0 0 `` > 0x20000000402a0c40: { // MBB; > > cmp.eq p0, p6 =3D r0, r10 > (p6) br.sptk.few 20000000400ded00 > br.ret.sptk.few rp ;; > } > [cursor=3D0x20000000402a0c40:0] > bdb>=20 Vnode locks are before vm map locks in global lock order. vn_fullpath() may need to lock vnodes to call VOP_VPTOCNP(). I think you should (and can) drop both vm map lock and vmspace reference much earlier. Would it be cleaner to use explicitely sized types for compat32 structure members ? Comparing ptrace_vm_entry with kinfo_vmentry, I think that it might be good idea to add fsid and inode number to ptrace_vm_entry, to give at least some information when vn_fullpath failed. --9+ohdFDUqiMJzwPo Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktyeSoACgkQC3+MBN1Mb4hpNQCfZznT84jUVPvxedAC5ho2rrWV AKIAoNpmf7HEP6/ZSCALTDz1cmmU1zvb =YVn5 -----END PGP SIGNATURE----- --9+ohdFDUqiMJzwPo--