From owner-freebsd-audit Fri Feb 16 12:18: 4 2001 Delivered-To: freebsd-audit@freebsd.org Received: from mail.gmx.net (pop.gmx.de [194.221.183.20]) by hub.freebsd.org (Postfix) with SMTP id B7ECA37B4EC for ; Fri, 16 Feb 2001 12:18:01 -0800 (PST) Received: (qmail 5930 invoked by uid 0); 16 Feb 2001 20:17:50 -0000 Received: from pc19ebf0c.dip.t-dialin.net (HELO forge.local) (193.158.191.12) by mail.gmx.net (mp009-rz3) with SMTP; 16 Feb 2001 20:17:50 -0000 Received: from thomas by forge.local with local (Exim 3.20 #1) id 14TrKL-0000xR-00 for ; Fri, 16 Feb 2001 21:18:01 +0100 Date: Fri, 16 Feb 2001 21:18:00 +0100 From: Thomas Moestl To: freebsd-audit@freebsd.org Subject: Another set of setgid kmem removing patches Message-ID: <20010216211800.A3084@crow.dom2ip.de> Mail-Followup-To: Thomas Moestl , freebsd-audit@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, here are some more patches to remove setgid kmem, this time from vmstat and iostat. Both vmstat and iostat use now sysctls by default to get all needed information, but will also fully work on crash dumps once again. Both use libdevstat, so this also has been patched to allow fetching all needed data via kvm calls. To accomplish this, two new functions, devstat_setkd and devstat_setfiles, have been added to the interface to set a kvm descriptor or core and/or symbol files respectively. If the handle is non-NULL/the file name pointers are non-NULL, all data will be fetched via kvm in subsequent calls. The default is the old behaviour (using sysctls only). Because any program that links to libdevstat now also needs to link to libkvm the libdevstat major version needed to be bumped (it is 3 now). I'll send this diff to Ken (who is listed as the maintainer) soon (Ken, if you are reading this, please comment on the patch). There is also another kernel diff, this one adds the vm.malloc.buckets, vm.malloc.stats, kern.tk_nin (tty input stats), kern.tk_nout (tty output stats) and vm.zonestats sysctls. It also moves some structure declarations out of #ifdef KERNEL to make them useable for the new kvm stuff. There is also a one-line diff for vinum (the only program in the src/ that linked to libdevstat, but not to libkvm) that adds a simple -lkvm to the Makefile. The new diffs are at: vmstat: http://www.tu-bs.de/~y0015675/vmstat.diff iostat: http://www.tu-bs.de/~y0015675/iostat.diff vinum: http://www.tu-bs.de/~y0015675/vinum.diff libdevstat: http://www.tu-bs.de/~y0015675/libdevstat.diff kernel: http://www.tu-bs.de/~y0015675/sysctl5.diff The previously posted patches are at: http://www.tu-bs.de/~y0015675/sysctl4.diff http://www.tu-bs.de/~y0015675/dmesg.diff http://www.tu-bs.de/~y0015675/sysctl3.diff http://www.tu-bs.de/~y0015675/systat.diff http://www.tu-bs.de/~y0015675/sysctl2.diff http://www.tu-bs.de/~y0015675/top.diff http://www.tu-bs.de/~y0015675/libkvm.diff http://www.tu-bs.de/~y0015675/sysctl.diff Please review and comment. Thanks, - thomas To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message