From owner-freebsd-current Fri Oct 25 6:52:17 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C9BC237B401 for ; Fri, 25 Oct 2002 06:52:15 -0700 (PDT) Received: from mail.speakeasy.net (mail15.speakeasy.net [216.254.0.215]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0772043E6A for ; Fri, 25 Oct 2002 06:52:15 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 4957 invoked from network); 25 Oct 2002 13:52:14 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail15.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 25 Oct 2002 13:52:14 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.6/8.12.6) with ESMTP id g9PDq4n5074995; Fri, 25 Oct 2002 09:52:05 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <1035510912.33175.5.camel@shumai.marcuscom.com> Date: Fri, 25 Oct 2002 09:52:08 -0400 (EDT) From: John Baldwin To: Joe Marcus Clarke Subject: Re: libgtop port and v_tag changes Cc: current@FreeBSD.ORG, Nate Lawson Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 25-Oct-2002 Joe Marcus Clarke wrote: > On Thu, 2002-10-24 at 19:13, Nate Lawson wrote: >> On Thu, 24 Oct 2002, John Baldwin wrote: >> > Speaking of v_tag, can you fix the devel/libgtop port on current? >> > This is the patch I used to get it building the other day: >> > >> > > cat patch-sysdeps_freebsd_procmap.c >> > --- sysdeps/freebsd/procmap.c.orig Tue Oct 15 20:00:35 2002 >> > +++ sysdeps/freebsd/procmap.c Tue Oct 15 20:05:54 2002 >> > @@ -251,6 +251,7 @@ >> > &vnode, sizeof (vnode)) != sizeof (vnode)) >> > glibtop_error_io_r (server, "kvm_read (vnode)"); >> > >> > +#if __FreeBSD_version < 500000 >> > if ((vnode.v_type != VREG) || (vnode.v_tag != VT_UFS) || >> > !vnode.v_data) continue; >> > >> > @@ -261,6 +262,7 @@ >> > >> > maps [i-1].inode = inode.i_number; >> > maps [i-1].device = inode.i_dev; >> > +#endif >> > #endif >> > } while (entry.next != first); >> > >> > -- >> > >> > John Baldwin <>< http://www.FreeBSD.org/~jhb/ >> > "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ >> >> I assume Joe has a better version he planned to commit as referenced by >> this email: >> >> <1033747570.319.16.camel@gyros.marcuscom.com> >> >> I like his patch better because it still handles the non CURRENT case. >> Joe? > > I committed my patch to libgtop and libgtop2 a while ago. It should > work on both -CURRENT, not so -CURRENT, and -stable. Checkout patch-ah > in libgtop/files. Works like a champ on -CURRENT from Monday. It does?! v_tag is a pointer to kernel memory, you can't read that from userland! You would get a SIGSEGV and die as soon as you do the 'strcmp()'. That's why I #ifdef'd the whole chunk out. Also, just for the record, my code didn't break the non CURRENT case. :) -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message