From owner-cvs-all@FreeBSD.ORG Tue Aug 3 03:08:15 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A84DF16A4CE; Tue, 3 Aug 2004 03:08:15 +0000 (GMT) Received: from ebb.errno.com (ebb.errno.com [66.127.85.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4A63743D5D; Tue, 3 Aug 2004 03:08:15 +0000 (GMT) (envelope-from sam@errno.com) Received: from [66.127.85.91] ([66.127.85.91]) (authenticated bits=0) by ebb.errno.com (8.12.9/8.12.6) with ESMTP id i7338EWi085619 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Mon, 2 Aug 2004 20:08:14 -0700 (PDT) (envelope-from sam@errno.com) From: Sam Leffler Organization: Errno Consulting To: Don Lewis Date: Mon, 2 Aug 2004 20:07:51 -0700 User-Agent: KMail/1.6.1 References: <200408030254.i732sBtS077748@gw.catspoiler.org> In-Reply-To: <200408030254.i732sBtS077748@gw.catspoiler.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200408022007.51603.sam@errno.com> cc: danfe@nsu.ru cc: src-committers@FreeBSD.org cc: jhb@FreeBSD.org cc: cvs-src@FreeBSD.org cc: cvs-all@FreeBSD.org cc: markm@FreeBSD.org Subject: Re: cvs commit: src/sys/alpha/alpha mem.c src/sys/alpha/conf GENERIC src/sys/alpha/include memdev.h src/sys/amd64/amd64 io.c mem.c src/sys/amd64/conf GENERIC NOTES src/sys/amd64/include iodev.h memdev.h src/sys/conf NOTES files files.alpha files.amd64 ... X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Aug 2004 03:08:15 -0000 On Monday 02 August 2004 07:54 pm, Don Lewis wrote: > On 3 Aug, Alexey Dokuchaev wrote: > > On Mon, Aug 02, 2004 at 04:00:00PM -0400, John Baldwin wrote: > >> Why in the world are /dev/null and /dev/zero optional? /dev/[k]mem > >> and /dev/io I can accept for those with uber-high security paranoia, but > >> I can't think of any good reason to have a kernel without /dev/null and > >> /dev/zero. To me it seems that this creates way more foot shooting > >> potential than benefit. It's one thing to have device drivers for > >> hardware that may or may not be present optional, but /dev/null and > >> /dev/zero do not fall into that case. > > > > OTOH, if someone wants to build mega-tight kernel image with everything > > possible taken out by modules, modularizing /dev/null and /dev/zero > > might make some sence. We already have /dev/random as a module anyways. > > You might have trouble doing anything useful on the system without > /dev/null. For instance /bin/sh won't be able to run background jobs, > /bin/csh will close stdin of any background jobs (which might cause > wierd things to happen), users of daemon(3) won't properly disconnect > from the tty which started them, and there are a number of references to > /dev/null in the /etc and /etc/rc.d scripts. > > In the case of i386, the size of the text+data size of null.ko is a > little over 2K. From a quick look at the source, it looks like at least > half of this is the module support code. > > BTW, I think daemon(3) and /bin/csh should check the return value when > they attempt to open(_PATH_DEVNULL, ...). I'd be very surprised if you could do anything useful with a system w/o /dev/null. /dev/zero is getting to be like that too. Folks promoting this for embedded purposes have not tried to squeeze a running system into a few meg (i.e. this change is meaningless in terms of what needs to be done). Sam