Date: Fri, 2 Feb 2001 15:15:06 -0600 (CST) From: Mike Meyer <mwm@mired.org> To: Terry Lambert <tlambert@primenet.com> Cc: jcm@FreeBSD-uk.eu.org (j mckitrick), freebsd-chat@FreeBSD.ORG Subject: Re: software development tools - microsoft and unix Message-ID: <14971.9050.366271.20250@guru.mired.org> In-Reply-To: <200102021957.MAA12520@usr08.primenet.com> References: <20010202134033.A91283@dogma.freebsd-uk.eu.org> <200102021957.MAA12520@usr08.primenet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Terry Lambert <tlambert@primenet.com> 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 :-(. <mike -- Mike Meyer <mwm@mired.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14971.9050.366271.20250>