svn commit: r195843 - in head: lib/libkvm sys/kern sys/sys
Brooks Davis
brooks at FreeBSD.org
Fri Sep 4 22:15:26 UTC 2009
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 <brooks at FreeBSD.org> wrote:
>
> > Author: brooks
> > Date: Fri Jul 24 15:03:10 2009
> > New Revision: 195843
> > URL: http://svn.freebsd.org/changeset/base/195843
> >
> > 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)
>
> Hi Brooks,
>
> 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
===================================================================
--- lib/libkvm/kvm_proc.c (revision 196736)
+++ lib/libkvm/kvm_proc.c (working copy)
@@ -151,7 +151,7 @@
kp->ki_cr_flags |= KI_CRF_GRP_OVERFLOW;
}
kp->ki_ngroups = 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 = ucred.cr_uid;
if (ucred.cr_prison != NULL) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-head/attachments/20090904/7d4315e9/attachment.pgp
More information about the svn-src-head
mailing list