Date: Fri, 8 Dec 2000 03:35:26 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: bright@wintelcom.net (Alfred Perlstein) Cc: mckusick@mckusick.com (Kirk McKusick), arch@FreeBSD.ORG Subject: Re: Getting Kernel Process Information Message-ID: <200012080335.UAA02960@usr08.primenet.com> In-Reply-To: <20001207115616.V16205@fw.wintelcom.net> from "Alfred Perlstein" at Dec 07, 2000 11:56:16 AM
next in thread | previous in thread | raw e-mail | index | archive | help
[ ... reorg of proc structure to keep it from being a PITA ... ] > I completely agree that should be done. My suggestion is to > completely rip out and kernel structs being passed through > this interface, the reason is that we will need mutexes in > a lot of them and we don't want to export that to userland. Let me remind you that copying data out of /dev/kmem into user space from structures like this is inherenetly MP-unsafe. Without holding the mutex, you can not guarantee that the structure contents will not change out from under the user space process while it is in the middle of copying them out. Ignoring the obvious things, like divide-by-zero errors, this is mostly a problem for programs trying to do list traversal, as opposed to particular data objects (unless they contain pointers themselves). Right now, the BGL protects us from this. Please do not build a soloution which will not work on MP systems, once the BGL is removed. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200012080335.UAA02960>