From owner-freebsd-chat Fri Feb 2 13:15:27 2001 Delivered-To: freebsd-chat@freebsd.org Received: from guru.mired.org (okc-65-26-235-186.mmcable.com [65.26.235.186]) by hub.freebsd.org (Postfix) with SMTP id 5616837B4EC for ; Fri, 2 Feb 2001 13:15:07 -0800 (PST) Received: (qmail 33888 invoked by uid 100); 2 Feb 2001 21:15:06 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14971.9050.366271.20250@guru.mired.org> Date: Fri, 2 Feb 2001 15:15:06 -0600 (CST) To: Terry Lambert Cc: jcm@FreeBSD-uk.eu.org (j mckitrick), freebsd-chat@FreeBSD.ORG Subject: Re: software development tools - microsoft and unix In-Reply-To: <200102021957.MAA12520@usr08.primenet.com> References: <20010202134033.A91283@dogma.freebsd-uk.eu.org> <200102021957.MAA12520@usr08.primenet.com> X-Mailer: VM 6.75 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Terry Lambert types: > Right now, neither NT nor FreeBSD support this level of interface > enforcement, though they are protected mode OSs (I personally > would implement them as a "SIGBUG", which was by default > ignored, so that a debugger/audit program could trap the code > problems and report them to the programmer, et least as a UNIX > implementation). The point is rather that this level of > enforcement is completely impossible in a non-protected mode > OS. I've been told that Windows developers have (had?) a version or option to cause the Windows APIs to verify their arguments, and complain if they weren't in the valid range. The problem with using it was that you then couldn't do anything else, because pretty much every application screwed up in some way or another. Hence Bill Gates can claim with a straight face that Windows doesn't have any bugs, it's all application bugs. > It would be really nice, for example, if FreeBSD could turn off > all interfaces which were not common between it and other UNIX > OSs. That would mean that you could immediately switch all > your UNIX developement to FreeBSD, and be certain that the > resulting program would compile and run on all other UNIX > platforms. Well, doing that system-wide sounds a bit painful - how many system applications would quit working? Doing it on a per-binary basis would be nearly as useful, and seems very doable, at least for the kernel. Use the kernel emulator facilities, and add an emulator that traps all non-standard calls. You can then check your programs by running them in that emulator. With a little more work, you could check all the calls and make sure the arguments were valid. Libraries are a bit more interesting. You'd need to verify that only standard library calls were used to insure you didn't use a non-standard library API, and then make sure those library functions didn't use a non-standard system call to avoid catching the kernel trap. That could potentially involve rewriting large chunks of the libraries :-(. http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message