Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Dec 2009 15:20:09 -0600
From:      Brooks Davis <brooks@FreeBSD.org>
To:        Dmitry Pryanishnikov <lynx.ripe@gmail.com>
Cc:        svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: svn commit: r195843 - in head: lib/libkvm sys/kern sys/sys
Message-ID:  <20091210212009.GB23550@lor.one-eyed-alien.net>
In-Reply-To: <4B146423.2090703@gmail.com>
References:  <4B146423.2090703@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--+g7M9IMkV8truYOl
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Dec 01, 2009 at 02:32:35AM +0200, Dmitry Pryanishnikov wrote:
>=20
> Hello!
>=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.
>>     This fixes procstat -s.
>>     Approved by: re (kib)
>>=20
>> Modified:
>>   head/lib/libkvm/kvm_proc.c
>>   head/sys/kern/kern_proc.c
>>   head/sys/sys/user.h
>>=20
>> Modified: head/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=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
>> --- head/lib/libkvm/kvm_proc.c	Fri Jul 24 14:57:02 2009	(r195842)
>> +++ head/lib/libkvm/kvm_proc.c	Fri Jul 24 15:03:10 2009	(r195843)
>> @@ -145,8 +145,14 @@ kvm_proclist(kd, what, arg, p, bp, maxcn
>>  			kp->ki_svuid =3D ucred.cr_svuid;
>>  			kp->ki_rgid =3D ucred.cr_rgid;
>>  			kp->ki_svgid =3D ucred.cr_svgid;
>> -			kp->ki_ngroups =3D ucred.cr_ngroups;
>> -			kp->ki_groups =3D ucred.cr_groups;
>> +			kp->ki_cr_flags =3D ucred.cr_flags;
>> +			if (ucred.cr_ngroups > KI_NGROUPS) {
>> +				kp->ki_ngroups =3D KI_NGROUPS;
>> +				kp->ki_cr_flags |=3D KI_CRF_GRP_OVERFLOW;
>> +			}
>> +				kp->ki_ngroups =3D ucred.cr_ngroups;
>=20
>   It seems that 'else' is missing after closing brace of this 'if'? With =
the
> code as is, 'kp->ki_ngroups =3D KI_NGROUPS;' is effectively NO-OP...

Yikes, you're right.  Sorry I took so long to fix this.  I'll MFC in
about a week.

-- Brooks

--+g7M9IMkV8truYOl
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iD8DBQFLIWYIXY6L6fI4GtQRArJqAJ9zqdPxxNUN2nmb+oVinJ5QDVUa9ACg3UrH
61YErVplE9LCo1ronCKvBk0=
=bNfj
-----END PGP SIGNATURE-----

--+g7M9IMkV8truYOl--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091210212009.GB23550>