Date: Fri, 11 Jul 2008 15:52:32 -0400 From: Andrew Gallatin <gallatin@cs.duke.edu> To: Stacey Son <sson@freebsd.org> Cc: freebsd-arch@freebsd.org Subject: Re: ksyms pseudo driver Message-ID: <20080711155232.A96384@grasshopper.cs.duke.edu> In-Reply-To: <4875A5D2.8030902@freebsd.org>; from sson@freebsd.org on Thu, Jul 10, 2008 at 01:01:31AM -0500 References: <4875A5D2.8030902@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Stacey Son [sson@freebsd.org] wrote: > > The reason I created this driver is for dtrace and the port of the > opensolaris lockstat(1M) command to FreeBSD. The ksyms driver allows a > process to get a quick > snapshot of the kernel symbol table including the symbols from any > loaded modules. Very cool! After doing some Solaris work, I've really missed lockstat! This would also be useful for hwpmc. > its already opened snapshot first. Of course, this requires the read() > handler to bounce the buffer into the kernel first before it is written > back out to userspace. (Maybe there is a simple way to do an userspace > to userspace copy instead?) The reason I went to all this trouble is to > keep /dev/ksyms from turning into an easy way to exhaust all the kernel > memory (unintentionally or intentionally). Instead of doing the copy in the kernel, can you just have a simple ioctl which returns the address and size of the snapshot? Then the userspace side can do the copy itself. Drew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080711155232.A96384>