From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 22:15:26 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6715E106568F; Fri, 4 Sep 2009 22:15:26 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (cl-162.ewr-01.us.sixxs.net [IPv6:2001:4830:1200:a1::2]) by mx1.freebsd.org (Postfix) with ESMTP id C5F3A8FC1C; Fri, 4 Sep 2009 22:15:25 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.3/8.14.3) with ESMTP id n84MEW2u098663; Fri, 4 Sep 2009 17:14:32 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.3/8.14.3/Submit) id n84MEWUp098662; Fri, 4 Sep 2009 17:14:32 -0500 (CDT) (envelope-from brooks) Date: Fri, 4 Sep 2009 17:14:32 -0500 From: Brooks Davis To: Bruce Cran Message-ID: <20090904221432.GC82231@lor.one-eyed-alien.net> References: <200907241503.n6OF3ATP013228@svn.freebsd.org> <20090829201228.00005860@unknown> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pAwQNkOnpTn9IO2O" Content-Disposition: inline In-Reply-To: <20090829201228.00005860@unknown> User-Agent: Mutt/1.5.17 (2007-11-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (lor.one-eyed-alien.net [127.0.0.1]); Fri, 04 Sep 2009 17:14:32 -0500 (CDT) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r195843 - in head: lib/libkvm sys/kern sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 22:15:26 -0000 --pAwQNkOnpTn9IO2O Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Aug 29, 2009 at 08:12:28PM +0100, Bruce Cran wrote: > On Fri, 24 Jul 2009 15:03:10 +0000 (UTC) > Brooks Davis wrote: >=20 > > Author: brooks > > Date: Fri Jul 24 15:03:10 2009 > > New Revision: 195843 > > URL: http://svn.freebsd.org/changeset/base/195843 > >=20 > > Log: > > Revert the changes to struct kinfo_proc in r194498. Instead, fill > > in up to 16 (KI_NGROUPS) values and steal a bit from ki_cr_flags > > (all bits currently unused) to indicate overflow with the new flag > > KI_CRF_GRP_OVERFLOW. > > =20 > > This fixes procstat -s. > > =20 > > Approved by: re (kib) >=20 > Hi Brooks, >=20 > This checkin appears to have broken crash dump support: the bcopy in > kvm_proc.c crashes when running "ps -ax -M /var/crash/vmcore.x > -N /boot/kernel/kernel", apparently because ucred.cr_groups isn't valid. > Does it need converted using KVM_READ first? Sorry for the delay, I believe you are correct we need to use kvm_read here instead of the bcopy. Do you still have a core handy you can test a patch against? The following should do it. -- Brooks Index: lib/libkvm/kvm_proc.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- lib/libkvm/kvm_proc.c (revision 196736) +++ lib/libkvm/kvm_proc.c (working copy) @@ -151,7 +151,7 @@ kp->ki_cr_flags |=3D KI_CRF_GRP_OVERFLOW; } kp->ki_ngroups =3D ucred.cr_ngroups; - bcopy(ucred.cr_groups, kp->ki_groups, + kvm_read(kd, (u_long)ucred.cr_groups, kp->ki_groups, kp->ki_ngroups * sizeof(gid_t)); kp->ki_uid =3D ucred.cr_uid; if (ucred.cr_prison !=3D NULL) { --pAwQNkOnpTn9IO2O Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iD8DBQFKoZFIXY6L6fI4GtQRAmtzAJ0W2fEL0TMPA4pKQAgDTlqxNxsXFwCfcSCp cYjMVqpg0YNDcMZxkINYOZc= =3Uaj -----END PGP SIGNATURE----- --pAwQNkOnpTn9IO2O--